From f022fc1b79ee29c7f8f796499129476fa49e0ca5 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Fri, 6 Aug 2010 23:58:54 +0000 Subject: x64 conversion git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@526 4f64403b-2f21-0410-a795-97e2b3489a10 --- ping/utils.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'ping/utils.cpp') diff --git a/ping/utils.cpp b/ping/utils.cpp index 6cf147a..556a8f3 100644 --- a/ping/utils.cpp +++ b/ping/utils.cpp @@ -18,7 +18,7 @@ LRESULT CALLBACK NullWindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM return DefWindowProc(hWnd, message, wParam, lParam); } -void CALLBACK sttMainThreadCallback( ULONG dwParam ) +void CALLBACK sttMainThreadCallback( ULONG_PTR dwParam ) { POPUPDATAEX* ppd = ( POPUPDATAEX* )dwParam; @@ -40,11 +40,11 @@ void __stdcall ShowPopup( const char* line1, const char* line2, int flags ) return; } - if(ServiceExists(MS_YAPP_CLASSINSTANCE)) { - PopupClassInstance d = {sizeof(d), "pingpopups"}; + if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { + POPUPDATACLASS d = {sizeof(d), "pingpopups"}; d.pwszTitle = (wchar_t *)line1; d.pwszText = (wchar_t *)line2; - CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d); + CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); } else { POPUPDATAEX* ppd = ( POPUPDATAEX* )calloc( sizeof( POPUPDATAEX ), 1 ); @@ -70,7 +70,7 @@ void __stdcall ShowPopup( const char* line1, const char* line2, int flags ) // wParam is zero // lParam is address of PINGADDRESS structure where ping result is placed (i.e. modifies 'responding' // and 'round_trip_time') -int PluginPing(WPARAM wParam,LPARAM lParam) +INT_PTR PluginPing(WPARAM wParam,LPARAM lParam) { PINGADDRESS *pa = (PINGADDRESS *)lParam; @@ -162,7 +162,7 @@ void Unlock(CRITICAL_SECTION *cs) { LeaveCriticalSection(cs); } -int PingDisableAll(WPARAM wParam, LPARAM lParam) { +INT_PTR PingDisableAll(WPARAM wParam, LPARAM lParam) { PINGLIST pl; CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) { @@ -173,7 +173,7 @@ int PingDisableAll(WPARAM wParam, LPARAM lParam) { return 0; } -int PingEnableAll(WPARAM wParam, LPARAM lParam) { +INT_PTR PingEnableAll(WPARAM wParam, LPARAM lParam) { PINGLIST pl; CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) { @@ -186,7 +186,7 @@ int PingEnableAll(WPARAM wParam, LPARAM lParam) { } -int ToggleEnabled(WPARAM wParam, LPARAM lParam) { +INT_PTR ToggleEnabled(WPARAM wParam, LPARAM lParam) { int retval = 0; PINGLIST pl; CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); @@ -206,7 +206,7 @@ int ToggleEnabled(WPARAM wParam, LPARAM lParam) { return 0; } -int EditContact(WPARAM wParam, LPARAM lParam) { +INT_PTR EditContact(WPARAM wParam, LPARAM lParam) { PINGLIST pl; HWND hwndList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); @@ -227,7 +227,7 @@ int EditContact(WPARAM wParam, LPARAM lParam) { return 1; } -int DblClick(WPARAM wParam, LPARAM lParam) { +INT_PTR DblClick(WPARAM wParam, LPARAM lParam) { PINGLIST pl; CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); for(PINGLIST::Iterator i = pl.start(); i.has_val(); i.next()) { @@ -367,16 +367,16 @@ void InitUtils() { hIconDisabled = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ICON_DISABLED), IMAGE_ICON, 16, 16, 0);//LR_LOADTRANSPARENT | LR_LOADMAP3DCOLORS ); } - if(ServiceExists(MS_YAPP_REGISTERCLASS)) { - PopupClass test = {0}; + if(ServiceExists(MS_POPUP_REGISTERCLASS)) { + POPUPCLASS test = {0}; test.cbSize = sizeof(test); test.flags = PCF_TCHAR; test.hIcon = hIconResponding; - test.timeout = -1; + test.iSeconds = -1; test.ptszDescription = TranslateT("Ping"); test.pszName = "pingpopups"; - test.windowProc = NullWindowProc; - CallService(MS_YAPP_REGISTERCLASS, 0, (WPARAM)&test); + test.PluginWindowProc = NullWindowProc; + CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test); } } -- cgit v1.2.3