RE: [GD-Windows] GetProcAddress()
Brought to you by:
vexxed72
|
From: Wayne C. <wc...@re...> - 2001-10-16 18:16:48
|
> Now i've created a function called MyDLLFunc(). If i want to
> access this
> function in my main app using GetProcAddress() i specify
> "MyDLLFunc" as
> function name, but this fails. After looking into the listing
> of the dll i
> gave it a try to use " ?MyDLLFunc@@YAXXZ " as name. That
> worked. How on
> earth am i supposed to export 20 functions in a decent
> manner? Look them up
> all up in the listing? I must be doing something wrong. Could
> anyone help me
> out?
The function is being exported with C++ decoration on the names, the easiest
way to avoid this is by externing them as C functions....
extern "C"
{
// exported functions....
};
Most headers I've seen wrap the 'extern "C"' in a #ifdef cplusplus or
something similar but as I always use C++ I just put the extern "C" in
there. Enjoy your exporting ;)
Wayne
-Virus scanned and cleared ok
|