Change IDL Header File

I am working on an old C ++ COM project, which I am moving to Visual Studio 2010. In the IDL file for this project, I need to reference the ODL file from another C ++ project. My problem is that another project is generating a header file like $ (filename) _h.h. When my IDL file generates its header file, it generates the ODL file name as $ filename.h and cannot link to the correct file.

In other words, in my IDL file ("MyIDLFile.idl") I have a statement like

import "MyODLFile.odl"

which in the generated file ("MyIDLFile.h") becomes

include "MyODLFile.h"

when i need it to generate

include "MyODLFile_h.h"

How to specify the name of the file I want to create an IDL in the import statement?

+5
source share
2 answers

I'm not sure what you mean in the import statement, but what you are looking for can be found in the Properties project. Go to the properties window (Alt-F7) and in the section "Configuration Properties / MIDL / Output" you will have the opportunity to declare the header file that you want to create. Since your project is outdated, it might be easier to just remove the “_h” from the header file name (for example, $ (project_name) .h instead of $ (ProjectName) _h.h). See http://support.microsoft.com/kb/321274 for more information.

+2
source

, -, , , "_i" idl , EquipmentConstants_i.idl

Microsoft / , (midl/header switch).

0

All Articles