Calling GlobalLock inside an DLL has problem?
-
HI. I can't understand something. I have a DLL which has a class that calls a function that is the following: DWORD dwLen = GlobalSize(m_hDevMode); BYTE* lp = (BYTE*)GlobalLock(m_hDevMode); file->Write(&dwLen,sizeof(dwLen)); file->Write(lp,dwLen); file->Write(&dwLen,sizeof(dwLen)); GlobalUnlock(m_hDevMode); Now, when I put the .h and .cpp file of the class directly in my application directory and use the class, it works fine. But when I call the class and this function exporting/using it from the DLL, it gives me warnings and does not work. It will comile but when I run the function that calls this function, it does not work. Can anyone helpl shed some light on this? Or how would I "fix" this? Thanks ahead of time.
-
HI. I can't understand something. I have a DLL which has a class that calls a function that is the following: DWORD dwLen = GlobalSize(m_hDevMode); BYTE* lp = (BYTE*)GlobalLock(m_hDevMode); file->Write(&dwLen,sizeof(dwLen)); file->Write(lp,dwLen); file->Write(&dwLen,sizeof(dwLen)); GlobalUnlock(m_hDevMode); Now, when I put the .h and .cpp file of the class directly in my application directory and use the class, it works fine. But when I call the class and this function exporting/using it from the DLL, it gives me warnings and does not work. It will comile but when I run the function that calls this function, it does not work. Can anyone helpl shed some light on this? Or how would I "fix" this? Thanks ahead of time.
Stan the man wrote:
But when I call the class and this function exporting/using it from the DLL, it gives me warnings
And what are those warnings ?
Stan the man wrote:
and does not work.
Can you explain this ?
Prasad Notifier using ATL | Operator new[],delete[][^]