LoadLibrary() an EXE?

后端 未结 3 698
北恋
北恋 2020-12-03 11:09

I have an executable (that I created using Visual C++ 10), and I need to use its capabilities from another program I wrote (same environment). Due to complex deployment requ

3条回答
  •  没有蜡笔的小新
    2020-12-03 11:58

    Simply no! The Problem is that the CRT and in the EXE you want load, uses some globle variables. You main EXE does the same. So how should Memory allocation work?

    If you want to use such a structure you must use a DLL to be Aware of meulti threading, CRT initialization ans all this other stuff. You need this!

    But what about COM Automation? Wouldn't tis be an easy solution to use your code in one EXE from another?

提交回复
热议问题