Click to See Complete Forum and Search --> : MIDL-generated proxy DLL sources don't link


a71104
March 29th, 2008, 01:04 PM
hi everybody, this is the first time i actually do some COM programming and i'm facing some problems. i'm using C++ and pure Win32, no ATL for now (though i'll probably port), and my program is made up of two executables, both single-apartment threaded, one of which is an out-of-process server that must provide some objects to the other one, the client; so, if i've understood correctly, the objects must be marshaled.

following some MSDN sample IDL code i wrote the necessary interface definition and MIDL generated me an header and a couple of sources that, i presume, must be used to build the proxy DLL used for marshaling my objects through my two apartments (the two single-threaded processes). the header works fine (contains the definitions exactly as i wanted them) and the DLL source files perfectly compile, but they don't link; i get some "unresolved external symbols": _CStdStubBuffer_DebugServerRelease@8, _CStdStubBuffer_DebugServerQueryInterface@8, some other _CStdStubBuffer_Xxx, followed by an implementation of IUnknown (_IUnknown_Release_Proxy@4, _IUnknown_AddRef_Proxy@4, _IUnknown_QueryInterface_Proxy@12), and eventually the system implementation of COM in-process server DLL default functions (NdrDllMain, NdrDllRegisterServer...).

what do i have to link? or am i doing anything wrong? i just defined three interfaces in an IDL file, gave that file to MIDL, and tried to compile what MIDL spat out; let me know if you need any other information to tell me how to solve :)

thank you guys.