Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
What is equivalent of #ifdef ... #endif flags in .odl files? Is it possible that in odl file, we shall have interface methods which are compiled conditionally ?

e.g.
interface {

methods:
   HRESULT func1([in] inputvar, [out] outvar);
   HRESULT func2([in] inputvar, [out] outvar);
   
   #ifdef THIRDPARTYDLL
   HRESULT func11([in] inputvar, [out] outvar);
   HRESULT func21([in] inputvar, [out] outvar);
   #endif
}

I am using a third-party library for which I have limited run-time and developer licenses. Some of the interface methods are in direct support of library methods.

On some machines where I have license installed, I want to compile with flag on and on other machines, I want to compile with flag off.

How this can be achieved? Also, it is possible to use a flag which defined in source files, in IDL file? In visual studio, there are facilities for defining pre-processor in project. But set of preprocessors for C/C++ source files and for MIDL files is different? can they be shared or can they be inherited from some common place?
Posted
Updated 23-Mar-11 1:24am
v4

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900