From 4e37f3cad6064396a701fe96bf4801d37d40b362 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Dec 2023 12:34:11 +0300 Subject: fingerprint: more strict service definitions --- plugins/ExternalAPI/m_fingerprint.h | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'plugins/ExternalAPI') diff --git a/plugins/ExternalAPI/m_fingerprint.h b/plugins/ExternalAPI/m_fingerprint.h index a7de242da0..6b411f41a5 100644 --- a/plugins/ExternalAPI/m_fingerprint.h +++ b/plugins/ExternalAPI/m_fingerprint.h @@ -18,28 +18,21 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/************************************************************************/ -/* Author: Artem Shpynov aka FYR mailto:shpynov@nm.ru */ -/* icons by Angeli-Ka */ -/* January 12, 2006 */ -/************************************************************************/ - -/* - * FINGERPRINT PLUGIN SERVICES HEADER - */ - #pragma once +__forceinline bool Finger_IsPresent() +{ return ServiceExists("Fingerprint/SameClients"); +} + /* * Service SameClientsW MS_FP_SAMECLIENTSW * wParam - LPCWSTR first MirVer value * lParam - LPCWSTR second MirVer value * returns LPCWSTR: client desription (DO NOT DESTROY) if clients are same otherwise NULL */ -#define MS_FP_SAMECLIENTSW "Fingerprint/SameClientsW" __forceinline LPCWSTR Finger_IsSameClents(LPCWSTR pwszName1, LPCWSTR pwszName2) -{ return (LPCWSTR)CallService(MS_FP_SAMECLIENTSW, (WPARAM)pwszName1, (WPARAM)pwszName2); +{ return (LPCWSTR)CallService("Fingerprint/SameClients", (WPARAM)pwszName1, (WPARAM)pwszName2); } /* @@ -48,10 +41,9 @@ __forceinline LPCWSTR Finger_IsSameClents(LPCWSTR pwszName1, LPCWSTR pwszName2) * lParam - NULL (unused) * returns LPCWSTR: client description (DO NOT DESTROY) otherwise NULL */ -#define MS_FP_GETCLIENTDESCRW "Fingerprint/GetClientDescrW" __forceinline LPCWSTR Finger_GetClientDescr(LPCWSTR pwszName) -{ return (LPCWSTR)CallService(MS_FP_GETCLIENTDESCRW, (WPARAM)pwszName, 0); +{ return (LPCWSTR)CallService("Fingerprint/GetClientDescr", (WPARAM)pwszName, 0); } /* @@ -60,12 +52,7 @@ __forceinline LPCWSTR Finger_GetClientDescr(LPCWSTR pwszName) * lParam - int noCopy - if wParam is equal to "1" will return icon handler without copiing icon. * the returned in this case handler is static valid only till next service call. */ -#define MS_FP_GETCLIENTICONW "Fingerprint/GetClientIconW" __forceinline HICON Finger_GetClientIcon(LPCWSTR pwszName, BOOL bNoCopy) -{ return (HICON)CallService(MS_FP_GETCLIENTICONW, (WPARAM)pwszName, bNoCopy); +{ return (HICON)CallService("Fingerprint/GetClientIcon", (WPARAM)pwszName, bNoCopy); } - -#define MS_FP_SAMECLIENTST MS_FP_SAMECLIENTSW -#define MS_FP_GETCLIENTDESCRT MS_FP_GETCLIENTDESCRW -#define MS_FP_GETCLIENTICONT MS_FP_GETCLIENTICONW -- cgit v1.2.3