Importing foreign types in IDL File
-
Hello Folks! ;) I'm trying to build a DCOM server that interfaces a foreign API (National Instruments IMAQ Vision, for precision). I implemented my ATL object, created interface, and added methods.... some of them use, in parameters, native types defined in the API library (I got a LIB + 1 .H files), so I wrote, at the beginning of my IDL file: import "nivision.h"; and continued adding methods. When I compiled, I got MIDL errors indicating redefinitions on 80% of typedefs in .H file. What's wrong? Me, probably?:laugh: I can post or send code, if needed. Thanks in advance, Morenz
-
Hello Folks! ;) I'm trying to build a DCOM server that interfaces a foreign API (National Instruments IMAQ Vision, for precision). I implemented my ATL object, created interface, and added methods.... some of them use, in parameters, native types defined in the API library (I got a LIB + 1 .H files), so I wrote, at the beginning of my IDL file: import "nivision.h"; and continued adding methods. When I compiled, I got MIDL errors indicating redefinitions on 80% of typedefs in .H file. What's wrong? Me, probably?:laugh: I can post or send code, if needed. Thanks in advance, Morenz
Yep, it was me, in part :laugh: The other part goes to National Instruments, which header file I had to modify by 80%, commenting out redefinitions (they referred 'em as "forward delarations"... in fact in an MFC app worked well, but MIDL compiler was not so happy... Now I'm trying to obtain from NI a "simpler" way to make an ATL server with their types without destroying their headers.... :laugh: Bye Morenz