Hi all,
I have been having a prolonged encounter with the beast known as COM Interop...
I am currently trying to generate a .tlb from a .idl file generated by the OLE/COM Object Viewer. However when trying to run Midl.exe to compile it I get an error:
.\Sim.API.IDL(236) : error MIDL2025 : syntax error : expecting a type s
pecification near "ImportFileStatus"
My .idl file is more that 1000 lines long so I don't particularly want to post it here however, I believe the Part of interest is:
typedef [uuid(980B172E-19C1-389A-BB74-29A54737C5B4), version(1.0) ,
custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "Sim.API.ImportFileResult")
]
struct tagImportFileResult {
ImportFileStatus _status;
LPSTR _message;
} ImportFileResult;
Then Several lines later...
typedef [uuid(A4B9A0FF-A2D4-3EC5-AB7E-69311B9122C8), version(1.0) ,
custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "Sim.API.ImportFileStatus")
]
enum {
ImportFileStatus_Success = 0,
ImportFileStatus_VersionMismatch = 1,
ImportFileStatus_Failure = 2
} ImportFileStatus;
I have a Feeling that these should be revered in order to fix the Type specification error. However if I do this I get a new problem.
midl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored :
Could not set UUID : tagImportFileResult (0x800288C6)
I am pretty unfamiliar with the idl format and with the use of midl.exe, perhaps there is something blatantly wrong with what I am doing?
As always any help would be greatly appreciated :)