Пример #1
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

#ifdef _DEBUG
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

	CoInitialize(NULL);

	hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
	hOptionsInit = HookEvent(ME_OPT_INITIALISE, Options::InitOptions);

	hServiceUpload = CreateServiceFunction(MS_FTPFILE_UPLOAD, UploadService);
	hServiceShowManager = CreateServiceFunction(MS_FTPFILE_SHOWMANAGER, ShowManagerService);
	hServiceContactMenu = CreateServiceFunction(MS_FTPFILE_CONTACTMENU, ContactMenuService);
	hServiceMainMenu = CreateServiceFunction(MS_FTPFILE_MAINMENU, MainMenuService);

	InitIcolib();
	InitHotkeys();

	opt.loadOptions();
	deleteTimer.init();
	ftpList.init();
	
	return 0;
}
Пример #2
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	g_wMaskAdv = db_get_w(NULL,MOD_NAME,"optsmaskadv",0);
	g_bOldSetting = db_get_b(NULL, MOD_NAME, "OldSetting", 0);

	if ((g_bOldSetting & OLD_POPUP) && !(g_wMaskAdv & OPT_RESTORE)) // Restore popup settings if Miranda was crushed or killed in hidden mode and "Restore hiding on startup after failure" option is disabled
	{
		if (db_get_b(NULL, "Popup", "ModuleIsEnabled", 1) == 0)
			db_set_b(NULL, "Popup", "ModuleIsEnabled", 1);
		if (db_get_b(NULL, "YAPP", "Enabled", 1) == 0)
			db_set_b(NULL, "YAPP", "Enabled", 1);
	}
	if (g_wMaskAdv & OPT_HIDEONSTART && db_get_b(NULL, "Popup", "ModuleIsEnabled", 0)) // hack for disabling popup on startup if "Hide Miranda on startup" is enabled
	{
		g_bOldSetting |= OLD_POPUP;
		db_set_b(NULL, "Popup", "ModuleIsEnabled", 0);
	}

	Icon_Register(g_hInstance, "BossKey", iconList, SIZEOF(iconList));

	g_hHideService = CreateServiceFunction(MS_BOSSKEY_HIDE,BossKeyHideMiranda); // Create service

	HookEvent(ME_SYSTEM_MODULESLOADED,MirandaLoaded);
	return 0;
}
Пример #3
0
extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	PROTOCOLDESCRIPTOR pd = { 0 };
	pd.cbSize = sizeof(pd);
	pd.szName = "YAHOO";
	pd.type = PROTOTYPE_PROTOCOL;
	pd.fnInit = (pfnInitProto)yahooProtoInit;
	pd.fnUninit = (pfnUninitProto)yahooProtoUninit;
	Proto_RegisterModule(&pd);

	NETLIBUSER nlu = { 0 };
	nlu.cbSize = sizeof(nlu);
	nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_HTTPCONNS;
	nlu.szSettingsModule = "YAHOO/libyahoo2";
	nlu.ptszDescriptiveName = TranslateT("YAHOO plugin HTTP connections");
	g_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);

	YmsgrLinksInit();
	/**
	 * Register LibYahoo2 callback functions
	 */
	register_callbacks();

	return 0;
}
Пример #4
0
extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);

	CMenuItem mi;
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
Пример #5
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();
	mir_getTMI(&tmi);

	srand(time(NULL));
	_tzset();

	// Register the module
	PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
	pd.szName = ICQ_PROTOCOL_NAME;
	pd.type = PROTOTYPE_PROTOCOL;
	pd.fnInit = icqProtoInit;
	pd.fnUninit = icqProtoUninit;
	CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);

	// Initialize charset conversion routines
	InitI18N();

	// Register static services
	CreateServiceFunction(ICQ_DB_GETEVENTTEXT_MISSEDMESSAGE, icq_getEventTextMissedMessage);

	// Init extra statuses
	InitXStatusIcons();
	HookEvent(ME_SKIN2_ICONSCHANGED, OnReloadIcons);

	HookEvent(ME_SYSTEM_MODULELOAD, ModuleLoad);
	HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);

	hExtraXStatus = ExtraIcon_Register("xstatus", LPGEN("ICQ xStatus"), "icq_xstatus13");

	g_MenuInit();
	return 0;
}
Пример #6
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
	HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);

	hProtoAck = HookEvent(ME_PROTO_ACK, MirandaUtils::onProtoAck);

	//Ensure that the common control DLL is loaded. needed to use ICC_LISTVIEW_CLASSES control in options TODO move to InitOptions();?
	INITCOMMONCONTROLSEX icex = {0};
	icex.dwSize = sizeof(icex);
	icex.dwICC = ICC_LISTVIEW_CLASSES;
	InitCommonControlsEx(&icex);

	mirfoxMiranda.getMirfoxData().Plugin_Terminated = false;
	mirfoxMiranda.getMirfoxData().setPluginState(MFENUM_PLUGIN_STATE_INIT);
	mirfoxMiranda.onMirandaInterfaceLoad();
	InitOptions();
	
	if (mirfoxMiranda.getMirfoxData().getPluginState() != MFENUM_PLUGIN_STATE_ERROR){
		mirfoxMiranda.getMirfoxData().setPluginState(MFENUM_PLUGIN_STATE_WORK);
	}  /*else {
		mirfoxMiranda.onMirandaInterfaceUnload();
		DeinitOptions();
	} */ //TODO
	
	return 0;
}
Пример #7
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	InitCommonControls();

	g_hSendWindowList = WindowList_Create();
	g_hRecvWindowList = WindowList_Create();

	//init hooks
	HookEvent(ME_SYSTEM_MODULESLOADED, HookModulesLoaded);
	HookEvent(ME_DB_EVENT_ADDED, HookDBEventAdded);
	HookEvent(ME_DB_CONTACT_DELETED, HookContactDeleted);
	HookEvent(ME_DB_CONTACT_SETTINGCHANGED, HookContactSettingChanged);

	//create services
	CreateServiceFunction(MS_CONTACTS_SEND, ServiceSendCommand);
	CreateServiceFunction(MS_CONTACTS_RECEIVE, ServiceReceiveCommand);

	//define event sounds
	SkinAddNewSoundEx("RecvContacts", LPGEN("Incoming Contacts"), LPGEN("Events"), "contacts.wav");
	SkinAddNewSoundEx("SentContacts", LPGEN("Outgoing Contacts"), LPGEN("Events"), "ocontacts.wav");
	return 0;
}
Пример #8
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP( &pluginInfoEx );
	mir_getCLI();

	if ( db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) ||
		  db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))
		db_set_w(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE);

	// docking
	if (db_get_b(NULL, MODULENAME, SETTING_SETDOCKED, 0)) {
		int docked = db_get_b(NULL, MODULENAME, SETTING_DOCKED, DOCKED_NONE);
		if ( docked == DOCKED_LEFT || docked == DOCKED_RIGHT )
			docked = -docked;

		db_set_b(NULL, MODULE_CLIST, SETTING_DOCKED, (BYTE)docked);
	}

	// Create service functions; the get functions are created here; they don't rely on commonstatus
	hGetProfileService = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
	hGetProfileCountService = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
	hGetProfileNameService = CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);

	LoadProfileModule();

	// protocols must be loaded first
	InitCommonStatus();
	hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, CSModuleLoaded);
	return 0;
}
Пример #9
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();
	hmiranda = GetModuleHandle(NULL);

	INITCOMMONCONTROLSEX ctrls = {0};
	ctrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
	ctrls.dwICC = ICC_DATE_CLASSES;
	InitCommonControlsEx(&ctrls);

	hRichedDll = LoadLibrary(_T("Msftedit.dll"));
	if (!hRichedDll) {
		if (MessageBox(0, TranslateT("Miranda could not load the Notes & Reminders plugin, Msftedit.dll is missing. If you are using WINE, please make sure you have Msftedit.dll installed. Press 'Yes' to continue loading Miranda."), _T(SECTIONNAME), MB_YESNO | MB_ICONINFORMATION) != IDYES)
			return 1;
		return 0;
	}

	InitServices();
	WS_Init();

	hkModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
	InitIcons();

	return 0;
}
Пример #10
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	return LoadSendRecvMessageModule();
}
Пример #11
0
extern "C" int __declspec(dllexport) Load()
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	Icon_RegisterT(hInst, _T(MODULE), g_iconList, _countof(g_iconList));
	LoadMenus();
	InitOptions();

	for (int i = 0; i < _countof(s_fonts); i++) {
		LOGFONT lf;
		SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, FALSE);
		if (i == FLT_FONTID_OFFINVIS || i == FLT_FONTID_INVIS)
			lf.lfItalic = !lf.lfItalic;

		COLORREF defColor = GetSysColor((i == FLT_FONTID_NOTONLIST) ? COLOR_3DSHADOW : COLOR_WINDOWTEXT);

		char szId[20];
		mir_snprintf(szId, "Font%d", i);
		FontService_RegisterFont(MODULE, szId, LPGENT("Floating contacts"), s_fonts[i], NULL, NULL, i + 1, false, &lf, defColor);
	}

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreshutdown);
	return 0;
}
Пример #12
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	if (!g_speak_config)
	{
		g_speak_config = new SpeakConfig(g_hInst);

		// expose to allow miranda + plugins to access my speak routines
		CreateServiceFunction(MS_SPEAK_STATUS, status);
		CreateServiceFunction(MS_SPEAK_MESSAGE, message);
	}

	if (!g_speak_announce)
	{
		g_speak_announce = new SpeakAnnounce(g_hInst);

		// tap into contact setting change event
		g_event_status_change = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, eventStatusChange);

		// a new message event has occured
		g_event_message_added = HookEvent(ME_DB_EVENT_ADDED, eventMessageAdded);

		// a messaging protocol changed state
		g_protocol_ack = HookEvent(ME_PROTO_ACK, protocolAck);

	}

	// a option dialog box request has occured
	g_dialog_options_initialise = HookEvent(ME_OPT_INITIALISE, dialogOptionsInitialise);

	return 0;
}
Пример #13
0
extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer", Toggle);

	CMenuItem mi;

	SET_UID(mi, 0xac1c64a, 0x82ca, 0x4845, 0x86, 0x89, 0x59, 0x76, 0x12, 0x74, 0x72, 0x7b);
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xb290cccd, 0x4ecc, 0x475e, 0x87, 0xcb, 0x51, 0xf4, 0x3b, 0xc3, 0x44, 0x9c);
	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
Пример #14
0
extern "C" int __declspec(dllexport) Load(void)
{
	CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	iCodePage = Langpack_GetDefaultCodePage();

	InitTranslations();
	InitMessagePump();
	InitOptions();

	// for compatibility with mToolTip status tooltips
	hShowTipService = CreateServiceFunction("mToolTip/ShowTip", ShowTip);

	hShowTipWService = CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);

	hHideTipService = CreateServiceFunction("mToolTip/HideTip", HideTip);

	hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
	hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	hSettingChangedEvent = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
	hEventDeleted = HookEvent(ME_DB_EVENT_DELETED, EventDeleted);

	return 0;
}
Пример #15
0
extern "C" int __declspec(dllexport) Load()
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	// Load plugin options from DB
	hForwardFrom = (MCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
	hForwardTo = (MCONTACT)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);

	iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);

	DBVARIANT dbv;
	if (!db_get_ts(NULL, "yaRelay", "ForwardTemplate", &dbv)){
		_tcsncpy(tszForwardTemplate, dbv.ptszVal, SIZEOF(tszForwardTemplate));
		db_free(&dbv);
	}
	else _tcsncpy(tszForwardTemplate, _T("%u: %m"), MAXTEMPLATESIZE-1);

	iSplit          = db_get_dw(NULL, "yaRelay", "Split", 0);
	iSplitMaxSize   = db_get_dw(NULL, "yaRelay", "SplitMaxSize", 100);
	iSendParts      = db_get_dw(NULL, "yaRelay", "SendParts", 0);
	iMarkRead       = db_get_dw(NULL, "yaRelay", "MarkRead", 0);
	iSendAndHistory = db_get_dw(NULL, "yaRelay", "SendAndHistory", 1);

	// hook events
	HookEvent(ME_DB_EVENT_ADDED, MessageEventAdded);
	HookEvent(ME_OPT_INITIALISE, OptionsInit);
	HookEvent(ME_PROTO_ACK, ProtoAck);
	return 0;
}
Пример #16
0
extern "C" int __declspec(dllexport) CListInitialise()
{
	mir_getCLI();

	coreCli = *pcli;

	pcli->hInst = g_hInst;
	pcli->pfnPaintClc = PaintClc;
	pcli->pfnContactListWndProc = ContactListWndProc;
	pcli->pfnContactListControlWndProc = ContactListControlWndProc;
	pcli->pfnRebuildEntireList = RebuildEntireList;
	pcli->pfnSetGroupExpand = SetGroupExpand;
	pcli->pfnRecalcScrollBar = RecalcScrollBar;
	pcli->pfnScrollTo = ScrollTo;
	pcli->pfnLoadClcOptions = LoadClcOptions;
	pcli->pfnGetRowHeight = GetRowHeight;
	pcli->pfnSortCLC = SortCLC;

	CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
	HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccountsChanged);
	HookEvent(ME_OPT_INITIALISE, OnOptsInit);

	InitCustomMenus();
	return 0;
}
Пример #17
0
extern "C" int __declspec(dllexport) Load(void)
{
    mir_getLP(&pluginInfo);
    mir_getCLI();

    HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);

    Icon_Register(g_hInstance, MOD_NAME, iconList, _countof(iconList), "nas");

    InitCommonControls();
    InitOptions(); // must be called before we hook CallService

    if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
        TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T(""));
        if (Str.GetLen())
            db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext")));

        Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T(""));
        if (Str.GetLen())
            db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext")));
    }
    if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
        db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
        db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 2);
    }
    return 0;
}
Пример #18
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	use_raw_ping = false;
	db_set_b(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping);

	DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0);
	hWakeEvent = CreateEvent(NULL, FALSE, FALSE, _T("Local\\ThreadWaitEvent"));

	// create services before loading options - so we can have the 'getlogfilename' service!
	CreatePluginServices();

	LoadOptions();

	SkinAddNewSound("PingTimeout", "Ping Timout", 0);
	SkinAddNewSound("PingReply", "Ping Reply", 0);

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);

	HookEvent(ME_OPT_INITIALISE, PingOptInit);

	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);

	Icon_Register(hInst, LPGEN("Ping"), iconList, _countof(iconList));

	HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);

	return 0;
}
Пример #19
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	LoadUserOnlineModule();
	return 0;
}
Пример #20
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
	return 0;
}
Пример #21
0
extern "C" int __declspec(dllexport) CListInitialise()
{
	int rc = 0;

	OutputDebugStringA("CListInitialise ClistMW\r\n");
	mir_getLP( &pluginInfo );
	mir_getCLI();

	PreloadCLCModule();

	pcli->hInst = g_hInst;
	pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
	pcli->pfnCalcEipPosition = CalcEipPosition;
	pcli->pfnCheckCacheItem = CheckPDNCE;
	pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
	pcli->pfnCompareContacts = CompareContacts;
	pcli->pfnCreateClcContact = fnCreateClcContact;
	pcli->pfnCreateCacheItem = fnCreateCacheItem;
	pcli->pfnFindItem = FindItem;
	pcli->pfnFreeCacheItem = FreeDisplayNameCacheItem;
	pcli->pfnGetDefaultFontSetting = GetDefaultFontSetting;
	pcli->pfnGetRowsPriorTo = GetRowsPriorTo;
	pcli->pfnGetRowByIndex = GetRowByIndex;
	pcli->pfnHitTest = HitTest;
	pcli->pfnPaintClc = PaintClc;
	pcli->pfnRebuildEntireList = RebuildEntireList;
	pcli->pfnRecalcScrollBar = RecalcScrollBar;
	pcli->pfnScrollTo = ScrollTo;

	saveIconFromStatusMode = pcli->pfnIconFromStatusMode;
	pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;

	saveAddGroup = pcli->pfnAddGroup; pcli->pfnAddGroup = AddGroup;
	saveAddInfoItemToGroup = pcli->pfnAddInfoItemToGroup; pcli->pfnAddInfoItemToGroup = AddInfoItemToGroup;
	saveAddItemToGroup = pcli->pfnAddItemToGroup; pcli->pfnAddItemToGroup = AddItemToGroup;
	saveRemoveItemFromGroup = pcli->pfnRemoveItemFromGroup; pcli->pfnRemoveItemFromGroup = RemoveItemFromGroup;
	saveFreeContact = pcli->pfnFreeContact; pcli->pfnFreeContact = FreeContact;
	saveFreeGroup = pcli->pfnFreeGroup; pcli->pfnFreeGroup = FreeGroup;
	saveContactListControlWndProc = pcli->pfnContactListControlWndProc; pcli->pfnContactListControlWndProc = ContactListControlWndProc;
	saveTrayIconProcessMessage = pcli->pfnTrayIconProcessMessage; pcli->pfnTrayIconProcessMessage = TrayIconProcessMessage;
	saveContactListWndProc = pcli->pfnContactListWndProc; pcli->pfnContactListWndProc = ContactListWndProc;
	saveLoadClcOptions = pcli->pfnLoadClcOptions; pcli->pfnLoadClcOptions = LoadClcOptions;
	saveSortCLC = pcli->pfnSortCLC; pcli->pfnSortCLC = SortCLC;

	memset(&SED,0,sizeof(SED));
	CreateServiceFunction(CLUI_SetDrawerService,SetDrawer);

	rc = LoadContactListModule();
	if (rc == 0)
		rc = LoadCLCModule();

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
	BGModuleLoad();

	OutputDebugStringA("CListInitialise ClistMW...Done\r\n");

	return rc;
}
Пример #22
0
extern "C" __declspec(dllexport) int Load()
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	logmsg("Load");
	hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
	return 0;
}
Пример #23
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	HookEvent(ME_SYSTEM_MODULESLOADED, PluginInit);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
	return 0;
}
Пример #24
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getTMI(&tmi);
	mir_getCLI();

	LoadHelpModule();
	return 0;
}
Пример #25
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	if ( IsWinVer7Plus())
		CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface);

	LoadSendRecvFileModule();
	return 0;
}
Пример #26
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&sPluginInfo);
	mir_getCLI();

	g_pTooltipNotify = new CTooltipNotify();
	assert(g_pTooltipNotify!=0);
	
	g_hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	return 0;
}
Пример #27
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
 	mir_getCLI();

	if (InitServer())
		MessageBox(0, TranslateT("Could not initialize CmdLine plugin property"), TranslateT("Error"), MB_ICONEXCLAMATION | MB_OK);

	HookEvents();
	return 0;
}
Пример #28
0
extern "C" __declspec(dllexport) int Load(void)
{
	// set the memory manager
	mir_getLP(&pluginInfo);
	mir_getCLI();

	if (IsWinVer7Plus())
		CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface);

	return OnLoadModule();
}
Пример #29
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	CreateServiceFunction(MS_SESSIONS_SHOWFAVORITESMENU, BuildFavMenu);
	CreateServiceFunction(MS_SESSIONS_OPENMANAGER, OpenSessionsManagerWindow);
	CreateServiceFunction(MS_SESSIONS_RESTORELASTSESSION, LoadLastSession/*LoadSession*/);
	CreateServiceFunction(MS_SESSIONS_SAVEUSERSESSION, SaveUserSessionHandles);
	CreateServiceFunction(MS_SESSIONS_CLOSESESSION, CloseCurrentSession);

	HANDLE hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
	if (hEvent != 0) {
		CreateServiceFunction(MS_SESSIONS_LAUNCHME, LaunchSessions);
		CallService(MS_SYSTEM_WAITONHANDLE, (WPARAM)hEvent, (LPARAM)MS_SESSIONS_LAUNCHME);
	}

	g_ses_count = db_get_b(0, MODNAME, "UserSessionsCount", 0);
	if (!g_ses_count)
		g_ses_count = db_get_b(0, "Sessions (Unicode)", "UserSessionsCount", 0);
	g_ses_limit = db_get_b(0, MODNAME, "TrackCount", 10);
	g_bExclHidden = db_get_b(NULL, MODNAME, "ExclHidden", 0) != 0;
	g_bWarnOnHidden = db_get_b(NULL, MODNAME, "WarnOnHidden", 0) != 0;
	g_bOtherWarnings = db_get_b(NULL, MODNAME, "OtherWarnings", 1) != 0;
	g_bCrashRecovery = db_get_b(NULL, MODNAME, "CrashRecovery", 0) != 0;

	if (g_bCrashRecovery)
		g_bIncompletedSave = !db_get_b(NULL, MODNAME, "lastSaveCompleted", 0) != 0;

	if (g_bIncompletedSave) {
		int i = 0;
		memset(session_list_recovered, 0, sizeof(session_list_recovered));

		for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
			if (db_get_b(hContact, MODNAME, "wasInLastSession", 0))
				session_list_recovered[i++] = hContact;
	}

	if (!session_list_recovered[0])
		g_bIncompletedSave = FALSE;

	db_set_b(NULL, MODNAME, "lastSaveCompleted", 0);

	if (!db_get_b(NULL, MODNAME, "lastempty", 1) || g_bIncompletedSave)
		isLastTRUE = TRUE;

	HookEvent(ME_SYSTEM_MODULESLOADED, PluginInit);
	HookEvent(ME_SYSTEM_OKTOEXIT, OkToExit);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, SessionPreShutdown);

	// Icons
	Icon_Register(g_hInst, MODNAME, iconList, _countof(iconList));
	return 0;
}
Пример #30
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	GetWindowsVersion();
	OpenKeyboardDevice();

	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreshutdown);
	return 0;
}