static void LoadCoreModule(void) { INITCOMMONCONTROLSEX icce = {0}; icce.dwSize = sizeof(icce); icce.dwICC = ICC_WIN95_CLASSES | ICC_USEREX_CLASSES; InitCommonControlsEx(&icce); hAPCWindow = CreateWindowEx(0, _T("ComboLBox"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); SetClassLongPtr(hAPCWindow, GCL_STYLE, GetClassLongPtr(hAPCWindow, GCL_STYLE) | CS_DROPSHADOW); DestroyWindow(hAPCWindow); hAPCWindow = NULL; hAPCWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc); SetTimer(hAPCWindow, 1, 1000, NULL); hStackMutex = CreateMutex(NULL, FALSE, NULL); hThreadQueueEmpty = CreateEvent(NULL, TRUE, TRUE, NULL); #ifdef _WIN64 HMODULE mirInst = GetModuleHandleA("miranda64.exe"); #else HMODULE mirInst = GetModuleHandleA("miranda32.exe"); #endif RecalculateTime = (void (*)()) GetProcAddress(mirInst, "RecalculateTime"); InitWinver(); InitPathUtils(); InitLogs(); InitialiseModularEngine(); InitProtocols(); InitMetaContacts(); }
int LoadUtilsModule(void) { bModuleInitialized = TRUE; CreateServiceFunction(MS_UTILS_RESIZEDIALOG, ResizeDialog); CreateServiceFunction(MS_UTILS_SAVEWINDOWPOSITION, SaveWindowPosition); CreateServiceFunction(MS_UTILS_RESTOREWINDOWPOSITION, RestoreWindowPosition); CreateServiceFunction(MS_UTILS_ASSERTINSIDESCREEN, AssertInsideScreen); CreateServiceFunction(MS_UTILS_GETCOUNTRYBYNUMBER, GetCountryByNumber); CreateServiceFunction(MS_UTILS_GETCOUNTRYBYISOCODE, GetCountryByISOCode); CreateServiceFunction(MS_UTILS_GETCOUNTRYLIST, GetCountryList); CreateServiceFunction(MS_UTILS_GETRANDOM, GenerateRandom); CreateServiceFunction(MS_UTILS_ENTERSTRING, svcEnterString); CreateServiceFunction(MS_SYSTEM_RESTART, RestartMiranda); InitOpenUrl(); InitWindowList(); InitHyperlink(); InitPathUtils(); InitColourPicker(); InitBitmapFilter(); InitXmlApi(); InitTimeZones(); InitCrypt(); return 0; }