Re: GetProcAddress Exception in XP
The following line is where the library is freed in XP, but not 2000:
if (!lpfnDllFunc18)
FreeLibrary(hCustVerCtrlDLL); //THIS IS WHERE IT IS FREEING THE LIB IN XP
"Igor Tandetnik" wrote:
MSDevelOlap <MSDevelOlap@discussions.microsoft.com> wrote:
I have an application that works in 2000, but is having trouble
linking to a DLL in XP.
Precisely what kind of trouble? What fails, with what error code?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
I have an application that works in 2000, but is having trouble
linking to a DLL in XP. The code is as follows:
typedef UINT (*LPFNDLLFUNC18)(long,UINT);
LPFNDLLFUNC18 lpfnDllFunc18;
UINT uiReturnVal;
lpfnDllFunc18 = (LPFNDLLFUNC18)GetProcAddres hCustVerCtrlDLL,"GetMyFunction");
if (!lpfnDllFunc18)
FreeLibrary(hCustVerCtrlDLL); //THIS IS WHERE IT IS FREEING THE LIB IN XP
else
{
uiReturnVal = lpfnDllFunc18( 0,0);
if ( uiReturnVal == 0 ){
SetLibrary(FALSE);
} else if ( uiReturnVal == 1 ){
SetLibrary(TRUE);
} else {
SetLibrary(FALSE);
}
}
What could be causing the differences in 2000 and XP?
What dependencies are there for the GetProcAddress function?
Any help is appreciated.