CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GetProcAddress
At 03:35 PM 5/22/98 -0400, you wrote:
>typedef void __stdcall (*TDLLProc)();
>FReleasingDLL = (TDLLProc)GetProcAddress(FHandle,"ReleasingDLL");
>
>void __export __stdcall _ReleasingDLL()
>added this -------------^
>
>Now everything works but I wanna know why the heck (use stronger expletive
>if you prefer) C++ is name mangling my string constants???
Thanks to those responding on this issue and offering alternative ways to
redefine ReleasingDLL in my DLLs. These are certainly useful, but
unfortunately, this is not where the problem lies.
The problem is with Builder changing a hard coded value, "ReleasingDLL" in
the ProcAddress to "_ReleasingDLL". In other words, Builder is prepending
an underscore to a string constant. As a result, I have to add an
underscore to my function declarations within my DLLs.
In my opinion, the compiler should *not* modify a programmer's declared
string constants. What happens if I want to use GetProcAddress on a DLL
that I don't have source code to and it's functions are not defined with
leading underscores??
Michael
W Komornicki's Home Page |
Main Index |
Thread Index