views:

144

answers:

2

Hi, 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!

+1  A: 

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 */
}
Mladen Jankovic
A: 

Would the NoExplorer registry key also work?

EricLaw -MSFT-