Hi,
Here is the code that I use to load a library into my application.
void CSIULibTestDlg::OnPrint()
{
HMODULE hMPU = NULL;
DWORD error;
wchar_t Buffer[100];
// LoadLibrary
if( hMPU = LoadLibrary( _T("MPU-L465.dll")) ){
}
else{
error = GetLastError();
swprintf(Buffer, L"Fail to load MPU-L465.dll error = %d", error);
MessageBox( Buffer, _T("Error!"), MB_OK);
}
}
----------
Problem: I would get error = 126 (The specified module could not be found).
I test my application by compiling with eVC++ 3.0. SDK PocketPC2002.
My PocketPC is IPAQ PocketPC 2002.
The "MPU-L465.dll" is WinCE.NET library.
The Application loads into my IPAQ locates at Windows\StartMenu\TestLib.exe
I put the "MPU-L465.dll" at the same location Windows\StartMenu\MPU-L465.dll
Does anyone know why I get error 126? And what is the solution to avoid
this?
Thanks a million.