summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_clist.h8
-rw-r--r--include/m_cluiframes.h2
-rw-r--r--include/m_database.h13
-rw-r--r--include/m_db_int.h6
-rw-r--r--include/m_genmenu.h6
-rw-r--r--include/m_hotkeys.h2
-rw-r--r--include/m_icolib.h20
-rw-r--r--include/m_langpack.h6
-rw-r--r--include/m_netlib.h4
-rw-r--r--include/m_options.h6
-rw-r--r--include/m_protocols.h6
-rw-r--r--include/m_protoint.h2
-rw-r--r--include/m_protomod.h4
-rw-r--r--include/m_skin.h20
-rw-r--r--include/m_system.h8
-rw-r--r--include/m_userinfo.h2
-rw-r--r--include/m_utils.h26
17 files changed, 72 insertions, 69 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index 83bc98ab90..db6fcd3136 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -145,7 +145,7 @@ typedef struct {
#define CMIF_ROOTPOPUP 128 //root item for new popup(save return id for childs)
#define CMIF_CHILDPOPUP 256 //child for rootpopup menu
-__inline static HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddMainMenuItem", 0, (LPARAM)mi);
}
@@ -159,17 +159,17 @@ __inline static HGENMENU Menu_AddMainMenuItem(CLISTMENUITEM *mi)
//displayed in brackets after the menu item text. This only works in debug
//builds.
-__inline static HGENMENU Menu_AddContactMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddContactMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddContactMenuItem", 0, (LPARAM)mi);
}
-__inline static HGENMENU Menu_AddStatusMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddStatusMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddStatusMenuItem", 0, (LPARAM)mi);
}
-__inline static HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddProtoMenuItem", 0, (LPARAM)mi);
}
diff --git a/include/m_cluiframes.h b/include/m_cluiframes.h
index e38b631a69..e2c12f3e72 100644
--- a/include/m_cluiframes.h
+++ b/include/m_cluiframes.h
@@ -286,7 +286,7 @@ typedef struct tagCLISTFrame {
//popupposition=frameid
//contactowner=advanced parameter
-__inline static HGENMENU Menu_AddContextFrameMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddContextFrameMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddContextFrameMenuItem", 0, (LPARAM)mi);
}
diff --git a/include/m_database.h b/include/m_database.h
index e39fb8b884..1b2b1e8453 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -434,6 +434,7 @@ typedef struct {
DWORD cbBlob; //size of pBlob in bytes
PBYTE pBlob; //pointer to buffer containing module-defined event data
} DBEVENTINFO;
+
#define EVENTTYPE_MESSAGE 0
#define EVENTTYPE_URL 1
#define EVENTTYPE_CONTACTS 2 //v0.1.2.2+
@@ -442,6 +443,10 @@ typedef struct {
#define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000
#define MS_DB_EVENT_ADD "DB/Event/Add"
+__forceinline HANDLE DbGetAuthEventContact(DBEVENTINFO* dbei)
+{ return (HANDLE)(*(DWORD*)&dbei->pBlob[sizeof(DWORD)]);
+}
+
/* DB/Event/Delete
Removes a single event from the database
wParam = (WPARAM)(HANDLE)hContact
@@ -499,17 +504,17 @@ typedef struct {
#define MS_DB_EVENT_GETTEXT "DB/Event/GetText"
-__inline static char* DbGetEventTextA(DBEVENTINFO* dbei, int codepage)
+__forceinline char* DbGetEventTextA(DBEVENTINFO* dbei, int codepage)
{ DBEVENTGETTEXT temp = { dbei, DBVT_ASCIIZ, codepage };
return (char*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
}
-__inline static WCHAR* DbGetEventTextW(DBEVENTINFO* dbei, int codepage)
+__forceinline WCHAR* DbGetEventTextW(DBEVENTINFO* dbei, int codepage)
{ DBEVENTGETTEXT temp = { dbei, DBVT_WCHAR, codepage };
return (WCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
}
-__inline static TCHAR* DbGetEventTextT(DBEVENTINFO* dbei, int codepage)
+__forceinline TCHAR* DbGetEventTextT(DBEVENTINFO* dbei, int codepage)
{ DBEVENTGETTEXT temp = { dbei, DBVT_TCHAR, codepage };
return (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp);
}
@@ -540,7 +545,7 @@ Caller must free the result using mir_free
#define MS_DB_EVENT_GETSTRINGT "DB/Event/GetStringT"
-__inline static TCHAR* DbGetEventStringT(DBEVENTINFO* dbei, const char* str)
+__forceinline TCHAR* DbGetEventStringT(DBEVENTINFO* dbei, const char* str)
{
return (TCHAR*)CallService(MS_DB_EVENT_GETSTRINGT, (WPARAM)dbei, (LPARAM)str);
}
diff --git a/include/m_db_int.h b/include/m_db_int.h
index e201626232..df6671a486 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -168,7 +168,7 @@ struct DATABASELINK
#define MS_DB_REGISTER_PLUGIN "DB/RegisterPlugin"
-__inline static void RegisterDatabasePlugin(DATABASELINK* pDescr)
+__forceinline void RegisterDatabasePlugin(DATABASELINK* pDescr)
{ CallService(MS_DB_REGISTER_PLUGIN, 0, (LPARAM)pDescr);
}
@@ -179,7 +179,7 @@ __inline static void RegisterDatabasePlugin(DATABASELINK* pDescr)
#define MS_DB_FIND_PLUGIN "DB/FindPlugin"
-__inline static DATABASELINK* FindDatabasePlugin(const TCHAR* ptszFileName)
+__forceinline DATABASELINK* FindDatabasePlugin(const TCHAR* ptszFileName)
{ return (DATABASELINK*)CallService(MS_DB_FIND_PLUGIN, 0, (LPARAM)ptszFileName);
}
@@ -190,7 +190,7 @@ __inline static DATABASELINK* FindDatabasePlugin(const TCHAR* ptszFileName)
#define MS_DB_GET_CURRENT "DB/GetCurrentDb"
-__inline static MIDatabase* GetCurrentDatabase(void)
+__forceinline MIDatabase* GetCurrentDatabase(void)
{ return (MIDatabase*)CallService(MS_DB_GET_CURRENT, 0, 0);
}
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index 8c181912a8..ef05806534 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -120,7 +120,7 @@ int lParam;
//wParam=lpGroupMenuParam, params to call when exec menuitem
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-__inline static HGENMENU Menu_AddSubGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddSubGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddSubGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
}
@@ -144,7 +144,7 @@ __inline static HGENMENU Menu_AddSubGroupMenuItem(lpGroupMenuParam gmp, CLISTMEN
//wParam=lpGroupMenuParam, params to call when exec menuitem
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-__inline static HGENMENU Menu_AddGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
}
@@ -172,7 +172,7 @@ __inline static HGENMENU Menu_AddGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUIT
//wParam=0
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-__inline static HGENMENU Menu_AddTrayMenuItem(CLISTMENUITEM *mi)
+__forceinline HGENMENU Menu_AddTrayMenuItem(CLISTMENUITEM *mi)
{ mi->hLangpack = hLangpack;
return (HGENMENU)CallService("CList/AddTrayMenuItem", 0, (LPARAM)mi);
}
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h
index 7bd596b3ed..d15c14a993 100644
--- a/include/m_hotkeys.h
+++ b/include/m_hotkeys.h
@@ -68,7 +68,7 @@ Registers new hotkey
Returns 0 on failure or hotkey atom id on success
*/
-__inline static INT_PTR Hotkey_Register(HOTKEYDESC *hk)
+__forceinline INT_PTR Hotkey_Register(HOTKEYDESC *hk)
{
return CallService("CoreHotkeys/Register", (WPARAM)hLangpack, (LPARAM)hk);
}
diff --git a/include/m_icolib.h b/include/m_icolib.h
index 1ec7ee74f7..5137f39edf 100644
--- a/include/m_icolib.h
+++ b/include/m_icolib.h
@@ -75,7 +75,7 @@ typedef struct {
// lParam = (LPARAM)(SKINICONDESC*)sid;
// returns a handle to the newly added item
-__inline static HANDLE Skin_AddIcon(SKINICONDESC* si)
+__forceinline HANDLE Skin_AddIcon(SKINICONDESC* si)
{ return (HANDLE)CallService("Skin2/Icons/AddIcon", hLangpack, (LPARAM)si);
}
@@ -88,7 +88,7 @@ __inline static HANDLE Skin_AddIcon(SKINICONDESC* si)
//
#define MS_SKIN2_REMOVEICON "Skin2/Icons/RemoveIcon"
-__inline static void Skin_RemoveIcon(const char* szIconName)
+__forceinline void Skin_RemoveIcon(const char* szIconName)
{ CallService(MS_SKIN2_REMOVEICON, 0, (LPARAM)szIconName);
}
@@ -101,9 +101,9 @@ __inline static void Skin_RemoveIcon(const char* szIconName)
#define MS_SKIN2_GETICON "Skin2/Icons/GetIcon"
#ifdef __cplusplus
-__inline static HICON Skin_GetIcon(const char* szIconName, int size=0)
+__forceinline HICON Skin_GetIcon(const char* szIconName, int size=0)
#else
-__inline static HICON Skin_GetIcon(const char* szIconName, int size)
+__forceinline HICON Skin_GetIcon(const char* szIconName, int size)
#endif
{ return (HICON)CallService(MS_SKIN2_GETICON, size, (LPARAM)szIconName);
}
@@ -115,7 +115,7 @@ __inline static HICON Skin_GetIcon(const char* szIconName, int size)
//
#define MS_SKIN2_GETICONHANDLE "Skin2/Icons/GetIconHandle"
-__inline static HANDLE Skin_GetIconHandle(const char* szIconName)
+__forceinline HANDLE Skin_GetIconHandle(const char* szIconName)
{ return (HANDLE)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)szIconName);
}
@@ -128,9 +128,9 @@ __inline static HANDLE Skin_GetIconHandle(const char* szIconName)
#define MS_SKIN2_GETICONBYHANDLE "Skin2/Icons/GetIconByHandle"
#ifdef __cplusplus
-__inline static HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size=0)
+__forceinline HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size=0)
#else
-__inline static HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size)
+__forceinline HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size)
#endif
{ return (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, size, (LPARAM)hIcolibIcon);
}
@@ -151,14 +151,14 @@ __inline static HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size)
//
#define MS_SKIN2_RELEASEICON "Skin2/Icons/ReleaseIcon"
-__inline static void Skin_ReleaseIcon(const char* szIconName)
+__forceinline void Skin_ReleaseIcon(const char* szIconName)
{ CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szIconName);
}
#ifdef __cplusplus
-__inline static void Skin_ReleaseIcon(HICON hIcon)
+__forceinline void Skin_ReleaseIcon(HICON hIcon)
#else
-__inline static void Skin_ReleaseIcon2(HICON hIcon)
+__forceinline void Skin_ReleaseIcon2(HICON hIcon)
#endif
{ CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
}
diff --git a/include/m_langpack.h b/include/m_langpack.h
index 8235beb005..9edfe03309 100644
--- a/include/m_langpack.h
+++ b/include/m_langpack.h
@@ -83,13 +83,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#if defined(MIRANDA_CUSTOM_LP)
-__inline static INT_PTR Langpack_PCharToTChar(const char* str)
+__forceinline INT_PTR Langpack_PCharToTChar(const char* str)
{ return CallService(MS_LANGPACK_PCHARTOTCHAR, hLangpack, (LPARAM)str);
}
#else
-__inline static INT_PTR Langpack_PCharToTChar(const char* str)
+__forceinline INT_PTR Langpack_PCharToTChar(const char* str)
{ return CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)str);
}
@@ -102,7 +102,7 @@ __inline static INT_PTR Langpack_PCharToTChar(const char* str)
#define MS_LANGPACK_REGISTER "LangPack/Register"
#if defined(MIRANDA_CUSTOM_LP)
-__inline static void mir_getLP(const PLUGININFOEX* pInfo)
+__forceinline void mir_getLP(const PLUGININFOEX* pInfo)
{ CallService(MS_LANGPACK_REGISTER, (WPARAM)&hLangpack, (LPARAM)pInfo);
}
#endif
diff --git a/include/m_netlib.h b/include/m_netlib.h
index 301ba8ace3..cad9343aad 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -224,7 +224,7 @@ typedef struct {
//socket will be closed.
//Errors: ERROR_INVALID_PARAMETER
#define MS_NETLIB_CLOSEHANDLE "Netlib/CloseHandle"
-__inline static INT_PTR Netlib_CloseHandle(HANDLE h) {return CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)h, 0);}
+__forceinline INT_PTR Netlib_CloseHandle(HANDLE h) {return CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)h, 0);}
//Open a port and wait for connections on it
//wParam = (WPARAM)(HANDLE)hUser
@@ -676,7 +676,7 @@ typedef struct {
//lParam = (LPARAM)0
//Returns 0
#define MS_NETLIB_SHUTDOWN "Netlib/Shutdown"
-__inline static void Netlib_Shutdown(HANDLE h) {CallService(MS_NETLIB_SHUTDOWN, (WPARAM)h, 0);}
+__forceinline void Netlib_Shutdown(HANDLE h) {CallService(MS_NETLIB_SHUTDOWN, (WPARAM)h, 0);}
//Create a packet receiver
//wParam = (WPARAM)(HANDLE)hConnection
diff --git a/include/m_options.h b/include/m_options.h
index 2011127e3c..b2e01e957e 100644
--- a/include/m_options.h
+++ b/include/m_options.h
@@ -105,7 +105,7 @@ typedef struct {
#define PSM_ISEXPERT (WM_USER+101) //returns true/false
#define PSM_GETBOLDFONT (WM_USER+102) //returns HFONT used for group box titles
-__inline static INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
+__forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
{ odp->hLangpack = hLangpack;
return CallService("Opt/AddPage", wParam, (LPARAM)odp);
}
@@ -126,14 +126,14 @@ typedef struct {
}
OPENOPTIONSDIALOG;
-__inline static INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
+__forceinline INT_PTR Options_Open(OPENOPTIONSDIALOG *ood)
{
return CallService("Opt/OpenOptions", hLangpack, (LPARAM)ood);
}
//Opens the options dialog, with only specified page v0.8.0.x+
-__inline static HWND Options_OpenPage(OPENOPTIONSDIALOG *ood)
+__forceinline HWND Options_OpenPage(OPENOPTIONSDIALOG *ood)
{
return (HWND)CallService("Opt/OpenOptionsPage", hLangpack, (LPARAM)ood);
}
diff --git a/include/m_protocols.h b/include/m_protocols.h
index b659e078a3..67dd8b16ca 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -293,7 +293,7 @@ typedef struct tagACCOUNT
//lParam = (LPARAM)(PROTOACCOUNT**)paAccounts
#define MS_PROTO_ENUMACCOUNTS "Proto/EnumAccounts"
-__inline static INT_PTR ProtoEnumAccounts(int* accNumber, PROTOACCOUNT*** accArray)
+__forceinline INT_PTR ProtoEnumAccounts(int* accNumber, PROTOACCOUNT*** accArray)
{ return CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)accNumber, (LPARAM)accArray);
}
@@ -303,7 +303,7 @@ __inline static INT_PTR ProtoEnumAccounts(int* accNumber, PROTOACCOUNT*** accArr
//return value = PROTOACCOUNT* or NULL
#define MS_PROTO_GETACCOUNT "Proto/GetAccount"
-__inline static PROTOACCOUNT* ProtoGetAccount(const char* accName)
+__forceinline PROTOACCOUNT* ProtoGetAccount(const char* accName)
{ return (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)accName);
}
@@ -331,7 +331,7 @@ __inline static PROTOACCOUNT* ProtoGetAccount(const char* accName)
//Returns 1 if an account is valid and enabled, 0 otherwise
#define MS_PROTO_ISACCOUNTENABLED "Proto/IsAccountEnabled"
-__inline static int IsAccountEnabled(const PROTOACCOUNT* pa)
+__forceinline int IsAccountEnabled(const PROTOACCOUNT* pa)
{
return (int)CallService(MS_PROTO_ISACCOUNTENABLED, 0, (LPARAM)pa);
}
diff --git a/include/m_protoint.h b/include/m_protoint.h
index d4c7c73b91..6e5bbcbd2f 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -110,7 +110,6 @@ typedef struct tagPROTO_INTERFACE
DWORD reserved[ 40 ];
- #ifdef __cplusplus
virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0;
virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) = 0;
@@ -157,7 +156,6 @@ typedef struct tagPROTO_INTERFACE
virtual int __cdecl UserIsTyping(HANDLE hContact, int type) = 0;
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0;
- #endif
}
PROTO_INTERFACE;
diff --git a/include/m_protomod.h b/include/m_protomod.h
index 98928c0832..98b5485804 100644
--- a/include/m_protomod.h
+++ b/include/m_protomod.h
@@ -65,7 +65,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//If they are called with CallContactService() (PSS_ and PSR_ services) then
//they are called with lParam = (CCSDATA*)&ccs and wParam an opaque internal
//reference that should be passed unchanged to MS_PROTO_CHAIN*.
-__inline static HANDLE CreateProtoServiceFunction(const char *szModule, const char *szService, MIRANDASERVICE serviceProc)
+__forceinline HANDLE CreateProtoServiceFunction(const char *szModule, const char *szService, MIRANDASERVICE serviceProc)
{
char str[MAXMODULELABELLENGTH];
_snprintf(str, sizeof(str), "%s%s", szModule, szService);
@@ -106,7 +106,7 @@ __inline static HANDLE CreateProtoServiceFunction(const char *szModule, const ch
//Thread safety: me_proto_ack is completely thread safe since 0.1.2.0
//See the notes in core/modules.h under NotifyEventHooks()
#define MS_PROTO_BROADCASTACK "Proto/BroadcastAck"
-__inline static INT_PTR ProtoBroadcastAck(const char *szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+__forceinline INT_PTR ProtoBroadcastAck(const char *szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
ACKDATA ack = {0};
ack.cbSize = sizeof(ACKDATA);
diff --git a/include/m_skin.h b/include/m_skin.h
index 6f49171901..b881ad73b8 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -33,9 +33,9 @@ extern int hLangpack;
//returns NULL if id is invalid, but will always succeed for a valid id
#define MS_SKIN_LOADICON "Skin/Icons/Load"
//nice function to wrap this:
-__inline static HICON LoadSkinnedIcon(int id) {return (HICON)CallService(MS_SKIN_LOADICON, id, 0);}
-__inline static HANDLE LoadSkinnedIconHandle(int id) {return (HANDLE)CallService(MS_SKIN_LOADICON, id, 1);}
-__inline static HICON LoadSkinnedIconBig(int id) {return (HICON)CallService(MS_SKIN_LOADICON, id, 2);}
+__forceinline HICON LoadSkinnedIcon(int id) {return (HICON)CallService(MS_SKIN_LOADICON, id, 0);}
+__forceinline HANDLE LoadSkinnedIconHandle(int id) {return (HANDLE)CallService(MS_SKIN_LOADICON, id, 1);}
+__forceinline HICON LoadSkinnedIconBig(int id) {return (HICON)CallService(MS_SKIN_LOADICON, id, 2);}
//event icons
#define SKINICON_EVENT_MESSAGE 100
@@ -113,8 +113,8 @@ __inline static HICON LoadSkinnedIconBig(int id) {return (HICON)CallService(MS_S
#define MS_SKIN_LOADPROTOICON "Skin/Icons/LoadProto"
#define MS_SKIN_LOADPROTOICONBIG "Skin/Icons/LoadProtoBig"
//nice function to wrap this:
-__inline static HICON LoadSkinnedProtoIcon(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)szProto, status);}
-__inline static HICON LoadSkinnedProtoIconBig(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICONBIG, (WPARAM)szProto, status);}
+__forceinline HICON LoadSkinnedProtoIcon(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)szProto, status);}
+__forceinline HICON LoadSkinnedProtoIconBig(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICONBIG, (WPARAM)szProto, status);}
//add a new sound so it has a default and can be changed in the options dialog
//wParam = hLangpack
@@ -148,7 +148,7 @@ typedef struct {
}
SKINSOUNDDESCEX;
-__inline static INT_PTR SkinAddNewSoundEx(const char *name, const char *section, const char *description)
+__forceinline INT_PTR SkinAddNewSoundEx(const char *name, const char *section, const char *description)
{
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
@@ -158,7 +158,7 @@ __inline static INT_PTR SkinAddNewSoundEx(const char *name, const char *section,
return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
-__inline static INT_PTR SkinAddNewSound(const char *name, const char *description, const char *defaultFile)
+__forceinline INT_PTR SkinAddNewSound(const char *name, const char *description, const char *defaultFile)
{
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
@@ -168,7 +168,7 @@ __inline static INT_PTR SkinAddNewSound(const char *name, const char *descriptio
return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
-__inline static INT_PTR SkinAddNewSoundExT(const char *name, const TCHAR *section, const TCHAR *description)
+__forceinline INT_PTR SkinAddNewSoundExT(const char *name, const TCHAR *section, const TCHAR *description)
{
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
@@ -179,7 +179,7 @@ __inline static INT_PTR SkinAddNewSoundExT(const char *name, const TCHAR *sectio
return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
}
-__inline static INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd)
+__forceinline INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd)
{
return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)ssd);
}
@@ -191,7 +191,7 @@ __inline static INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd)
//function will not fail, it will play the Windows default sound instead.
#define MS_SKIN_PLAYSOUND "Skin/Sounds/Play"
-__inline static INT_PTR SkinPlaySound(const char *name)
+__forceinline INT_PTR SkinPlaySound(const char *name)
{
return CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)name);
}
diff --git a/include/m_system.h b/include/m_system.h
index e179b58a8a..4347c7a962 100644
--- a/include/m_system.h
+++ b/include/m_system.h
@@ -201,12 +201,12 @@ of shutting down
#ifdef _STATIC
INT_PTR MirandaIsTerminated(WPARAM, LPARAM);
-__inline static INT_PTR Miranda_Terminated(void)
+__forceinline INT_PTR Miranda_Terminated(void)
{
return MirandaIsTerminated(0, 0);
}
#else
-__inline static INT_PTR Miranda_Terminated(void)
+__forceinline INT_PTR Miranda_Terminated(void)
{
return CallService(MS_SYSTEM_TERMINATED, 0, 0);
}
@@ -241,13 +241,13 @@ obtain this filter and call it inside the __except section
#define MS_SYSTEM_GETEXCEPTFILTER "System/GetExceptFilter"
-__inline static pfnExceptionFilter Miranda_GetExceptFilter(void)
+__forceinline pfnExceptionFilter Miranda_GetExceptFilter(void)
{ return GetExceptionFilter();
}
#define MS_SYSTEM_SETEXCEPTFILTER "System/SetExceptFilter"
-__inline static pfnExceptionFilter Miranda_SetExceptFilter(pfnExceptionFilter foo)
+__forceinline pfnExceptionFilter Miranda_SetExceptFilter(pfnExceptionFilter foo)
{ return SetExceptionFilter(foo);
}
diff --git a/include/m_userinfo.h b/include/m_userinfo.h
index 79a64b6c07..81bc9cd4cd 100644
--- a/include/m_userinfo.h
+++ b/include/m_userinfo.h
@@ -73,7 +73,7 @@ All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam = (LPARAM)hContact
extern int hLangpack;
-__inline static INT_PTR UserInfo_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
+__forceinline INT_PTR UserInfo_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp)
{ odp->hLangpack = hLangpack;
return CallService("UserInfo/AddPage", wParam, (LPARAM)odp);
}
diff --git a/include/m_utils.h b/include/m_utils.h
index ddeb1d2b15..14b2c0d62f 100644
--- a/include/m_utils.h
+++ b/include/m_utils.h
@@ -140,7 +140,7 @@ typedef struct {
HANDLE hContact;
} WINDOWLISTENTRY;
#define MS_UTILS_ADDTOWINDOWLIST "Utils/AddToWindowList"
-__inline static INT_PTR WindowList_Add(HANDLE hList, HWND hwnd, HANDLE hContact) {
+__forceinline INT_PTR WindowList_Add(HANDLE hList, HWND hwnd, HANDLE hContact) {
WINDOWLISTENTRY wle;
wle.hList = hList; wle.hwnd = hwnd; wle.hContact = hContact;
return CallService(MS_UTILS_ADDTOWINDOWLIST, 0, (LPARAM)&wle);
@@ -150,7 +150,7 @@ __inline static INT_PTR WindowList_Add(HANDLE hList, HWND hwnd, HANDLE hContact)
//lParam = (LPARAM)(HWND)hwnd
//returns 0 on success, nonzero on failure
#define MS_UTILS_REMOVEFROMWINDOWLIST "Utils/RemoveFromWindowList"
-__inline static INT_PTR WindowList_Remove(HANDLE hList, HWND hwnd) {
+__forceinline INT_PTR WindowList_Remove(HANDLE hList, HWND hwnd) {
return CallService(MS_UTILS_REMOVEFROMWINDOWLIST, (WPARAM)hList, (LPARAM)hwnd);
}
@@ -159,7 +159,7 @@ __inline static INT_PTR WindowList_Remove(HANDLE hList, HWND hwnd) {
//lParam = (WPARAM)(HANDLE)hContact
//returns the window handle on success, or NULL on failure
#define MS_UTILS_FINDWINDOWINLIST "Utils/FindWindowInList"
-__inline static HWND WindowList_Find(HANDLE hList, HANDLE hContact) {
+__forceinline HWND WindowList_Find(HANDLE hList, HANDLE hContact) {
return (HWND)CallService(MS_UTILS_FINDWINDOWINLIST, (WPARAM)hList, (LPARAM)hContact);
}
@@ -169,7 +169,7 @@ __inline static HWND WindowList_Find(HANDLE hList, HANDLE hContact) {
//returns 0 on success, nonzero on failure
//Only msg.message, msg.wParam and msg.lParam are used
#define MS_UTILS_BROADCASTTOWINDOWLIST "Utils/BroadcastToWindowList"
-__inline static INT_PTR WindowList_Broadcast(HANDLE hList, UINT message, WPARAM wParam, LPARAM lParam) {
+__forceinline INT_PTR WindowList_Broadcast(HANDLE hList, UINT message, WPARAM wParam, LPARAM lParam) {
MSG msg;
msg.message = message; msg.wParam = wParam; msg.lParam = lParam;
return CallService(MS_UTILS_BROADCASTTOWINDOWLIST, (WPARAM)hList, (LPARAM)&msg);
@@ -188,7 +188,7 @@ __inline static INT_PTR WindowList_Broadcast(HANDLE hList, UINT message, WPARAM
*/
#define MS_UTILS_BROADCASTTOWINDOWLIST_ASYNC "Utils/BroadcastToWindowListAsync"
-__inline static INT_PTR WindowList_BroadcastAsync(HANDLE hList, UINT message, WPARAM wParam, LPARAM lParam) {
+__forceinline INT_PTR WindowList_BroadcastAsync(HANDLE hList, UINT message, WPARAM wParam, LPARAM lParam) {
MSG msg;
msg.message = message; msg.wParam = wParam; msg.lParam = lParam;
return CallService(MS_UTILS_BROADCASTTOWINDOWLIST_ASYNC, (WPARAM)hList, (LPARAM)&msg);
@@ -223,7 +223,7 @@ typedef struct {
const char *szNamePrefix; //text to prefix on "x", "width", etc, to form setting names
} SAVEWINDOWPOS;
#define MS_UTILS_SAVEWINDOWPOSITION "Utils/SaveWindowPos"
-__inline static INT_PTR Utils_SaveWindowPosition(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_SaveWindowPosition(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
SAVEWINDOWPOS swp;
swp.hwnd = hwnd; swp.hContact = hContact; swp.szModule = szModule; swp.szNamePrefix = szNamePrefix;
return CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, (LPARAM)&swp);
@@ -242,18 +242,18 @@ __inline static INT_PTR Utils_SaveWindowPosition(HWND hwnd, HANDLE hContact, con
#define RWPF_NOACTIVATE 4 //show but don't activate v0.3.3.0+
#define RWPF_HIDDEN 8 //make it hidden
#define MS_UTILS_RESTOREWINDOWPOSITION "Utils/RestoreWindowPos"
-__inline static INT_PTR Utils_RestoreWindowPositionEx(HWND hwnd, int flags, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionEx(HWND hwnd, int flags, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
SAVEWINDOWPOS swp;
swp.hwnd = hwnd; swp.hContact = hContact; swp.szModule = szModule; swp.szNamePrefix = szNamePrefix;
return CallService(MS_UTILS_RESTOREWINDOWPOSITION, flags, (LPARAM)&swp);
}
-__inline static INT_PTR Utils_RestoreWindowPosition(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPosition(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, 0, hContact, szModule, szNamePrefix);
}
-__inline static INT_PTR Utils_RestoreWindowPositionNoSize(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionNoSize(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, RWPF_NOSIZE, hContact, szModule, szNamePrefix);
}
-__inline static INT_PTR Utils_RestoreWindowPositionNoMove(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionNoMove(HWND hwnd, HANDLE hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, RWPF_NOMOVE, hContact, szModule, szNamePrefix);
}
@@ -262,7 +262,7 @@ __inline static INT_PTR Utils_RestoreWindowPositionNoMove(HWND hwnd, HANDLE hCon
//lParam = 0
//returns <0 on error, 0 if not changed the rect, 1 if changed the rect
#define MS_UTILS_ASSERTINSIDESCREEN "Utils/AssertInsideScreen"
-__inline static INT_PTR Utils_AssertInsideScreen(RECT *rc) {
+__forceinline INT_PTR Utils_AssertInsideScreen(RECT *rc) {
return CallService(MS_UTILS_ASSERTINSIDESCREEN, (WPARAM)rc, 0);
}
@@ -404,12 +404,12 @@ typedef struct
#define MS_UTILS_REPLACEVARS "Utils/ReplaceVars"
-__inline static char* Utils_ReplaceVars(const char *szData) {
+__forceinline char* Utils_ReplaceVars(const char *szData) {
REPLACEVARSDATA dat = {0};
dat.cbSize = sizeof(dat);
return (char*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)szData, (LPARAM)&dat);
}
-__inline static TCHAR* Utils_ReplaceVarsT(const TCHAR *szData) {
+__forceinline TCHAR* Utils_ReplaceVarsT(const TCHAR *szData) {
REPLACEVARSDATA dat = {0};
dat.cbSize = sizeof(dat);
dat.dwFlags = RVF_TCHAR;