Question

I am working on a few projects that are using COM and I've run into a problem. I am using an external .idl that's compiled and imported so my project only has the library in it's .idl.

Now when I compile the project's internal idl that only contains the library, no dlldata.c file is generated under x32 configuration. However if I compile the project and it's .idls under x64 configuration, a dlldata.c file is generated and the project works fine.

I've tried going through all the options from Visual Studio for MIDL to no avail. Apparently I can only solve this by adding a dummy interface which is something I do not want to do.

Is there another solution to generate the dlldata.c file under x32 configuration without adding a dummy interface?

Was it helpful?

Solution

I found the solution. It seems you have to be very careful with Pre-Build Events for external .idls. Even the platform matters. Compiling with /env win32 and /env x64 parameters to MIDL for each configuration respectively solved my problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top