MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / DllMain

Function DllMain

pluginManager/src/PluginManager.cpp:84–132  ·  view source on GitHub ↗

main function of dll */

Source from the content-addressed store, hash-verified

82
83/* main function of dll */
84BOOL APIENTRY DllMain( HANDLE hModule,
85 DWORD reasonForCall,
86 LPVOID /*lpReserved*/ )
87{
88 g_hModule = hModule;
89 g_options.moduleInfo.setHModule(static_cast<HMODULE>(hModule));
90
91 switch (reasonForCall)
92 {
93 case DLL_PROCESS_ATTACH:
94 {
95 /* Set function pointers */
96 funcItem[0]._pFunc = doPluginManagerDlg;
97 funcItem[1]._pFunc = doAboutDlg;
98
99 /* Fill menu names */
100 _tcscpy_s(funcItem[0]._itemName, 64, _T("&Show Plugin Manager"));
101 _tcscpy_s(funcItem[1]._itemName, 64, _T("&About"));
102
103
104 /* Set shortcuts */
105 funcItem[0]._pShKey = NULL;
106 funcItem[1]._pShKey = NULL;
107#ifdef ALLOW_OVERRIDE_XML_URL
108 funcItem[2]._pFunc = doReloadXml;
109 _tcscpy_s(funcItem[2]._itemName, 64, _T("&Refresh XML"));
110 funcItem[2]._pShKey = NULL;
111#endif
112
113 DownloadManager::setUserAgent(_T("Notepad++/Plugin-Manager;v") _T(PLUGINMANAGERVERSION_STRING));
114 break;
115 }
116 case DLL_PROCESS_DETACH:
117 {
118 delete funcItem[0]._pShKey;
119
120 /* save settings */
121 saveSettings();
122 break;
123 }
124 case DLL_THREAD_ATTACH:
125 break;
126
127 case DLL_THREAD_DETACH:
128 break;
129 }
130
131 return TRUE;
132}
133
134extern "C" __declspec(dllexport) void setInfo(NppData notpadPlusData)
135{

Callers

nothing calls this directly

Calls 2

saveSettingsFunction · 0.85
setHModuleMethod · 0.80

Tested by

no test coverage detected