Currently I'm using LoadLibrary() to load a DLL I compiled. However, I'm finding that GetProcAddress() will not work unless an EXP file is bundled with the DLL.
Is there a way of getting GetProcAddress() to work with non-mangled names, but without having to have a DEF or EXP file? Could the export information perhaps be embedded in the DLL itself?
I plan to send these extensions (dlls) to other clients, and I want to avoid sending EXP or DEF files with it since this is a potential security risk, it exposes the addresses of functions. I realize this can be obtained through other facilities, but I don't want to make it THAT easy.
My goal is to simply send a DLL (by itself) and have the application be able to import functions from it using non-mangled function names.
Is there a way of getting GetProcAddress() to work with non-mangled names,
That is not the way GetProcAddress() works. It is a very simple function -- whatever function name is exported from the DLL, that is the name that GetProcAddress() recognizes. GetProcAddress() needs no EXP files, as it knows nothing about these files.
GetProcAddress() doesn't care what compiler, what computer language, or what options were used to create the DLL. The DLL contains exported function names, and whatever those names are, when you call GetProcAddress(), the name you give it must match exactly with the name that shows up in the DLL's export table.
If you load the DLL into Dependency Walker, look at the names of the exported functions. Those names are the ones that are valid when calling GetProcAddress().
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.