Difference in using a COM object from a DLL vs in an exe for an MFC based app

  Kiến thức lập trình

I have been working on a bit of software which interfaces with an SDK which communicates with a COM object (an external device). This SDK requires an MFC dialog and requires a window handle to work.

This is where it gets dicey. I have it working perfectly in MFC as an exe, and it connects to the COM object OK. However, when I compile it as a DLL and load the DLL from another console project, the SDK stalls on a function (my guess is that there’s an issue with the COM object). Note that the MFC dialog and interface still works OK.

I don’t have access to the code of the SDK, but from a conceptual point of view, what is different about loading a DLL with an MFC app versus running an exe that would cause this issue?

As far as I know, there shouldn’t be any huge difference between the two. I’ve also enabled MFC in the console app that calls the dll

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT