EKarim
asked on
LoadLibrary() fails to 16-bit DLL or Windows driver
I had a 16-bit application which uses LoadLibrary() to load a printer driver(HPPCL5MS.drv) and it worked fine. I converted the application to 32-bit. The application fails to load HPPCL5MS.DRV using LoadLibrary() in Win95. GetLastEror() return error 31. Can someone help me on this?
Hare is part of the code:
HINSTANCE hPrintDriver;
hPrintDriver = LoadLibrary("c:\\windows\\ system\\hp pcl5ms.drv ");
if (hPrintDriver == NULL)
{
dwLastError = GetLastError();
ASSERT(FALSE);//ERROR OCCURRED.
return;
}
//
// Get a DEVMODE structure
//
LPFNDEVMODE lpfnDevMode = (LPFNDEVMODE)GetProcAddres s(hPrintDr iver, "ExtDeviceMode");
Hare is part of the code:
HINSTANCE hPrintDriver;
hPrintDriver = LoadLibrary("c:\\windows\\
if (hPrintDriver == NULL)
{
dwLastError = GetLastError();
ASSERT(FALSE);//ERROR OCCURRED.
return;
}
//
// Get a DEVMODE structure
//
LPFNDEVMODE lpfnDevMode = (LPFNDEVMODE)GetProcAddres
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER