NPError NPP_Initialize(void) { // called immediately after the plugin DLL is loaded _Module.Lock(); //x SCENG_Init(); ::InitCommonControls(); return NPERR_NO_ERROR; }
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { ATLTRACE("DllMain\n"); if (dwReason == DLL_PROCESS_ATTACH) { _Module.Init(ObjectMap, hInstance); DisableThreadLibraryCalls(hInstance); // If this is loaded, always try to lock itself in the memory _Module.Lock(); } else if (dwReason == DLL_PROCESS_DETACH) { _Module.Term(); } return TRUE; // ok }