Hi All,
I am currently working on a Windows mobile 5.0 application.I have made a dll which contains a string table.I want to load strings from that table using a function named
TCHAR* CResAssembly::GetResString(HINSTANCE &hInst,DWORD nStringID)
{
if(!nStringID) return NULL; if(!LoadString(hInst,nStringID,m_szLoadedString,MAX_PATH)){
DWORD err = GetLastError();
return NULL;}
return m_szLoadedString;}
this function internally calls Loadstring() Function.I am using load time dynamic linking.So i don't have the first parameter that is "HINSTANCE".When i am loding the dll using loadlibrary and passing the retuned value to GetResString function then i am getting the correct value of the string.But i don't want to use run time dynamic linking.And in load time dynamic linking i am not getting the value because i don't have the correct HINSTANCE.
The error i am gettin is 1814 i.e. resource does not exist.I am getting this error due to incorrect HINSTANCE.
Plz help me as soon as possible if anyone can.
Thanx
Puru

Loading Resources From DLL
learnerplates
Use GetModuleHandle before calling LoadString.
See http://msdn2.microsoft.com/en-us/library/ms683199.aspx
Thanks,
Achal
VSD, Microsoft