Re: GetProcAddress() refused to return address
- From: "Jo" <JoJoTwilligo@xxxxxxxxxxx>
- Date: 20 Sep 2006 10:43:58 -0700
Igor Tandetnik wrote:
Jo <JoJoTwilligo@xxxxxxxxxxx> wrote:
I'm still a little concerned about the declarations though. Before
I had:
typedef int (CALLBACK* _OpenFileType)(LPCTSTR);
according to all the tutorials, but then I got an error, which
suspected I had a declaration mismatch. So I took out the CALLBACK and
it worked fine. I want to be sure that I have it right. Exactly how
should I declare the function type if the above declaration was used
in implicit linking?
I recommend putting CALLBACK back in. CALLBACK is a macro that expands
to __stdcall. Without it, by default you would have __cdecl calling
convention. __cdecl is basically only supported by C and C++ compilers,
whereas __stdcall would allow your DLL to be used from pretty much any
language capable of targeting Windows (almost all functions in Win32 API
use __stdcall calling convetion, so it's a de facto standard).
I don't have that option. The DLL was written w/__cdecl functions,
so I can't use __stdcall.
.
- Follow-Ups:
- Re: GetProcAddress() refused to return address
- From: Igor Tandetnik
- Re: GetProcAddress() refused to return address
- References:
- GetProcAddress() refused to return address
- From: Jo
- Re: GetProcAddress() refused to return address
- From: Igor Tandetnik
- Re: GetProcAddress() refused to return address
- From: Jo
- Re: GetProcAddress() refused to return address
- From: Igor Tandetnik
- GetProcAddress() refused to return address
- Prev by Date: Re: Strange delete memory failure
- Next by Date: Re: DLL and synchronizing global data
- Previous by thread: Re: GetProcAddress() refused to return address
- Next by thread: Re: GetProcAddress() refused to return address
- Index(es):
Relevant Pages
|