Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transform an IDL from CORBA to be compiled for DCOM (usind midl)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have an IDL defining an interface written on VC++ for ACE ORB (TAO) IDL Compiler. I want to redefine the interface for compiling it with Microsoft IDL compiler. As you may understand I get lots of syntax errors and since I am a newbie it gets difficult. Any suggestion, ideas ??
Thanks!
 
all interfaces in MIDL must be inherited from other interface. So you shouuld inherit them at least from IUnknown:
interface xxx:IUnknown{};
instead of module{}; you will use library{};
the main object there is coclass. Each interface/library/object must have a GUID. Library also require version number. John Fill
1c.bmp


ivfmd@mail.md
 
I have done this and all the changes as far as the syntax errors concerned...
But after that instead of it being compiled... I get this error :
"idl : error MIDL9008 : internal compiler problem 0xc0000005 - the compiler cannot continue for an unknown reason. See documentation for suggestions on how to find a workaround.
Error executing midl.exe."
which drives me to a deadend...
If you have anything in mind please help me...
Thanks...
 
could you show me a piece of code you convert and you converted? John Fill
1c.bmp


ivfmd@mail.md
 
Below is part of the code of the IDL file in CORBA and I want to convert it to DCOM:
typedef string<10> ConceptCode;
typedef sequence<ConceptCode> ConceptCodeSeq;
typedef string<12> CodingSchemeId;
typedef sequence<CodingSchemeId> CodingSchemeIdSeq;

struct QualifiedCode
{
CodingSchemeId coding_scheme_id;
ConceptCode a_code;
};

and this is what I have done up to now with more convertions in the rest of the code:
typedef string ConceptCode;
typedef sequence ConceptCodeSeq;
typedef string CodingSchemeId;
typedef sequence CodingSchemeIdSeq;

typedef struct _QualifiedCode
{
CodingSchemeId coding_scheme_id;
ConceptCode a_code;

}QualifiedCode ;

But I now get the following error:
Processing C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\msxml.idl
msxml.idl
C:\terminology DCOM\IDL\IDL.idl(20) : error MIDL2009 : undefined symbol : [ Field 'coding_scheme_id' of Struct '_QualifiedCode' ( Type 'QualifiedCode' ) ]
C:\terminology DCOM\IDL\IDL.idl(20) : error MIDL2009 : undefined symbol : [ Field 'a_code' of Struct '_QualifiedCode' ( Type 'QualifiedCode' ) ]
C:\terminology DCOM\IDL\IDL.idl(36) : error MIDL2009 : undefined symbol : [ Parameter 'qc' of Procedure 'Descr' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(36) : warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'qc' of Procedure 'Descr' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(39) : error MIDL2011 : unresolved type declaration : QualifiedCode [ Parameter 'qc' of Procedure 'Parent' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(39) : error MIDL2009 : undefined symbol : [ Parameter 'qc' of Procedure 'Parent' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(39) : warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'qc' of Procedure 'Parent' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(40) : error MIDL2011 : unresolved type declaration : QualifiedCode [ Parameter 'qc' of Procedure 'Childs' ( Interface 'ICS' ) ]
C:\terminology DCOM\IDL\IDL.idl(40) : error MIDL2009 : undefined symbol : [ Parameter 'qc' of Procedure 'Childs' ( Interface 'ICS' ) ]

First of all I'm not sure if the changes I have made will have the same results, but I can not examine that since I don't get any results...(I mean it does not compiles...)
Thanks for your help!
 
sequence and string are not supported by MIDL if they are noot defined in some wais. Use BSTR, VARIANT or char*, wchar_t*, int*, void*... John Fill
1c.bmp


ivfmd@mail.md
 
Thanks for your help!
I think I'm getting somewhere!!! :)
By the way, may I ask where are u from? age? university?
 
:)I'm from Moldova, 27 years old. I finished the biology but I'm working like a cpp programmer in an american company. John Fill
1c.bmp


ivfmd@mail.md
 
Thanks for your help... but after succeeding in compiling it...
I found a tool that automatically generates microsoft IDL files from any other IDL files!
Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top