I am trying to learn COM from the book "Inside COM". I am using Visual C++.NET to do the examples. Anyway the following:
static HMODULE g_hModule = NULL ; // DLL module handle
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
void* lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hModule = hModule ;
}
return TRUE ;
}
is giving the following error:
f:\VC\Source\Seven Com\Cmpnt\Cmpnt.cpp(324) : error C2440: '=' : cannot convert from 'HANDLE' to 'HMODULE'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
Any assistance would be greatly appreciated.
Everything I know I learned from The Grateful Dead and Buffy The Vampire Slayer
Charlie
static HMODULE g_hModule = NULL ; // DLL module handle
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
void* lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hModule = hModule ;
}
return TRUE ;
}
is giving the following error:
f:\VC\Source\Seven Com\Cmpnt\Cmpnt.cpp(324) : error C2440: '=' : cannot convert from 'HANDLE' to 'HMODULE'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
Any assistance would be greatly appreciated.
Everything I know I learned from The Grateful Dead and Buffy The Vampire Slayer
Charlie