#if !defined(AFX_MRA_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_) #define AFX_MRA_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define _CRT_SECURE_NO_WARNINGS #pragma warning(disable:4267) //#define CRTDLL #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WINVER 0x0502 #define _WIN32_WINNT 0x0502 #include #include #include #include #include #include #include #pragma comment(lib,"Crypt32.lib") #pragma comment(lib,"shlwapi.lib") #pragma comment(lib,"ws2_32.lib") #pragma comment(lib,"mswsock.lib") #include #include #include #include #include #define bzero(pvDst, count) memset(pvDst, 0, count) #include "../../plugins/zlib/src/zlib.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "resource.h" #include "..\xstatus_MRA\src\resource.h" #include "Sdk/DebugFunctions.h" #include "Sdk/SocketFunctions.h" #include "Sdk/MemoryFind.h" #include "Sdk/MemoryFindByte.h" #include "Sdk/BuffToLowerCase.h" #include "Sdk/StrHexToNum.h" #include "Sdk/timefuncs.h" #include "Sdk/InternetTime.h" #include "Sdk/ListMT.h" #include "Sdk/FIFOMT.h" #include "Sdk/RC4.h" #include "Sdk/SHA1.h" // LPS struct MRA_LPS { size_t dwSize; union { LPSTR lpszData; LPWSTR lpwszData; }; }; // GUID struct MRA_GUID { DWORD id[4]; }; struct MRA_ADDR_LIST_ITEM { DWORD dwPort; DWORD dwAddr; }; struct MRA_ADDR_LIST { DWORD dwAddrCount; MRA_ADDR_LIST_ITEM *pMailAddress; }; ///////////////////////////////////////////////////////////////////////////// struct BinBuffer { BinBuffer(LPBYTE data, size_t len) : m_data(data), m_len(len) {} LPBYTE m_data; size_t m_len; }; BinBuffer& operator >>(BinBuffer&, DWORD&); BinBuffer& operator >>(BinBuffer&, DWORDLONG&); BinBuffer& operator >>(BinBuffer&, MRA_GUID&); BinBuffer& operator >>(BinBuffer&, CMStringA&); BinBuffer& operator >>(BinBuffer&, CMStringW&); ///////////////////////////////////////////////////////////////////////////// #include "MraConstans.h" #include "MraProto.h" // структура содержащая информацию по построению меню или расширеных иконок struct GUI_DISPLAY_ITEM { LPSTR lpszName; // имя сервиса, оно же имя в иколибе LPWSTR lpwszDescr; // текстовое описание отображаемое юзеру LONG defIcon; // иконка из ресурсов CMraProto::MyServiceFunc lpFunc; // функция вызываемая меню HANDLE hIconHandle; }; // структура содержащая информацию о сервисах/функциях struct SERVICE_ITEM { LPSTR lpszName; // имя сервиса, оно же имя в иколибе CMraProto::MyServiceFunc lpFunc; // функция вызываемая }; extern GUI_DISPLAY_ITEM gdiMenuItems[]; extern GUI_DISPLAY_ITEM gdiContactMenuItems[]; extern GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[]; #include "proto.h" #include "MraSendCommand.h" #include "MraMRIMProxy.h" #include "MraSendQueue.h" #include "MraFilesQueue.h" #include "MraPopup.h" #include "MraAvatars.h" #include "MraIcons.h" #include "MraSelectEMail.h" #include "MraAntiSpam.h" #include "MraMPop.h" #include "MraChat.h" ///////////////////////////////////////////////////////////////////////////////////////// // plugin options struct MRA_SETTINGS { HANDLE hHeap; HINSTANCE hInstance; HMODULE hDLLXStatusIcons; DWORD dwGlobalPluginRunning; bool bChatExist; size_t dwMirWorkDirPathLen; WCHAR szMirWorkDirPath[MAX_FILEPATH]; }; extern MRA_SETTINGS masMraSettings; ///////////////////////////////////////////////////////////////////////////////////////// // External variables extern LIST g_Instances; extern HANDLE hXStatusAdvancedStatusIcons[]; INT_PTR LoadModules(); void UnloadModules(); void InitExtraIcons(); CMStringA MraGetSelfVersionString(); #define GetContactNameA(Contact) (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, 0) #define GetContactNameW(Contact) (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)Contact, GCDNF_UNICODE) #define GetStatusModeDescriptionA(Status) (LPSTR)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)Status, 0) #define GetStatusModeDescriptionW(Status) (LPWSTR)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)Status, GSMDF_UNICODE) #define SetBit(bytes, bitpos) bytes |= (1<