IE bandobject appearing in desktop taskbar
-
23-08-2019 - |
Question
i have created an IE bandobject (toolbar) that sits in IE and works well, however it also appears in the XP taskbar menu under toolbars. does anyone know how to prevent this behaivour?
Thanks!
Solution
You should check in DllMain what process tries to load dll and return FALSE if it's not IE. For instance:
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance,
DWORD dwReason, LPVOID lpReserved)
{
if( dwReason == DLL_PROCESS_ATTACH )
{
TCHAR processExe[ MAX_PATH ];
GetModuleFileName( NULL, processExe, MAX_PATH );
_tcslwr_s( processExe, MAX_PATH - 1 );
if ( _tcsstr( processExe, _T( "explorer.exe" ) ) )
return FALSE;
}
/* rest of DllMain */
}
OTHER TIPS
Would the NoExplorer registry key also work?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow