diff options
-rw-r--r-- | ping/common.h | 13 | ||||
-rw-r--r-- | ping/log.cpp | 10 | ||||
-rw-r--r-- | ping/log.h | 8 | ||||
-rw-r--r-- | ping/options.cpp | 6 | ||||
-rw-r--r-- | ping/options.h | 2 | ||||
-rw-r--r-- | ping/ping.cpp | 4 | ||||
-rw-r--r-- | ping/ping_9.sln | 26 | ||||
-rw-r--r-- | ping/ping_9.vcproj | 934 | ||||
-rw-r--r-- | ping/pinggraph.cpp | 18 | ||||
-rw-r--r-- | ping/pinggraph.h | 2 | ||||
-rw-r--r-- | ping/pinglist.cpp | 16 | ||||
-rw-r--r-- | ping/pinglist.h | 14 | ||||
-rw-r--r-- | ping/pingthread.cpp | 8 | ||||
-rw-r--r-- | ping/utils.cpp | 30 | ||||
-rw-r--r-- | ping/utils.h | 12 |
15 files changed, 1031 insertions, 72 deletions
diff --git a/ping/common.h b/ping/common.h index 9360426..1144158 100644 --- a/ping/common.h +++ b/ping/common.h @@ -22,13 +22,13 @@ //#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0500
#define _WIN32_IE 0x0300
#define MIRANDA_VER 0x0600
#include <windows.h>
-#include <prsht.h>
-//#include <winsock2.h>
+
+//#include <prsht.h>
#include <shellapi.h>
#include <commdlg.h>
#include <commctrl.h>
@@ -40,7 +40,7 @@ #include <statusmodes.h>
#include <m_options.h>
#include <m_langpack.h>
-#include <m_yapp.h>
+#include <m_popup.h>
#include <m_system.h>
#include <m_skin.h>
#include <m_netlib.h>
@@ -54,12 +54,11 @@ #include <m_genmenu.h>
#include <m_cluiframes.h>
#include <m_utils.h>
-
#include <m_fontservice.h>
+#include <m_icolib.h>
-#include <m_updater.h>
+#include "m_updater.h"
-#include <m_icolib.h>
#include "collection.h"
diff --git a/ping/log.cpp b/ping/log.cpp index a9bb7e3..7b1b4fc 100644 --- a/ping/log.cpp +++ b/ping/log.cpp @@ -1,7 +1,7 @@ #include "common.h"
#include "log.h"
-int Log(WPARAM wParam, LPARAM lParam) {
+INT_PTR Log(WPARAM wParam, LPARAM lParam) {
char buf[1024], tbuf[512], dbuf[512];
CallService(PLUG "/GetLogFilename", (WPARAM)1024, (LPARAM)buf);
@@ -29,7 +29,7 @@ int Log(WPARAM wParam, LPARAM lParam) { return 0;
}
-int GetLogFilename(WPARAM wParam, LPARAM lParam) {
+INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
char *filename = (char *)lParam;
if(DBGetContactSetting(0, PLUG, "LogFilename", &dbv)) {
@@ -46,14 +46,14 @@ int GetLogFilename(WPARAM wParam, LPARAM lParam) { return 0;
}
-int SetLogFilename(WPARAM wParam, LPARAM lParam) {
+INT_PTR SetLogFilename(WPARAM wParam, LPARAM lParam) {
DBWriteContactSettingString(0, PLUG, "LogFilename", (char *)lParam);
return 0;
}
-int ViewLogData(WPARAM wParam, LPARAM lParam) {
+INT_PTR ViewLogData(WPARAM wParam, LPARAM lParam) {
char buf[1024];
CallService(PLUG "/GetLogFilename", (WPARAM)MAX_PATH, (LPARAM)buf);
- return (int)ShellExecute((HWND)wParam, "edit", buf, "", "", SW_SHOW);
+ return (INT_PTR)ShellExecute((HWND)wParam, "edit", buf, "", "", SW_SHOW);
}
@@ -4,9 +4,9 @@ #pragma warning( disable : 4786 )
#include "options.h"
-int Log(WPARAM wParam, LPARAM lParam);
-int GetLogFilename(WPARAM wParam, LPARAM lParam);
-int SetLogFilename(WPARAM wParam, LPARAM lParam);
-int ViewLogData(WPARAM wParam, LPARAM lParam);
+INT_PTR Log(WPARAM wParam, LPARAM lParam);
+INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam);
+INT_PTR SetLogFilename(WPARAM wParam, LPARAM lParam);
+INT_PTR ViewLogData(WPARAM wParam, LPARAM lParam);
#endif
diff --git a/ping/options.cpp b/ping/options.cpp index 7da7639..cecc612 100644 --- a/ping/options.cpp +++ b/ping/options.cpp @@ -4,7 +4,7 @@ PingOptions options;
// main ping options
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
HWND hw;
OPENFILENAME ofn = {0};
@@ -179,7 +179,7 @@ PINGLIST temp_list; PINGADDRESS add_edit_addr;
// host edit
-BOOL CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+INT_PTR CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
HWND hw;
int sel;
char *strptr;
@@ -313,7 +313,7 @@ BOOL Edit(HWND hwnd, PINGADDRESS &addr) { return FALSE;
}
// ping hosts list window
-static BOOL CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
//OPENFILENAME ofn = {0};
HWND hw;
diff --git a/ping/options.h b/ping/options.h index 8fe17ab..1963649 100644 --- a/ping/options.h +++ b/ping/options.h @@ -14,7 +14,7 @@ extern HANDLE hWakeEvent; extern PingOptions options;
extern PINGADDRESS add_edit_addr;
-BOOL CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcDestEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int PingOptInit(WPARAM wParam,LPARAM lParam);
diff --git a/ping/ping.cpp b/ping/ping.cpp index bdab479..ed9a999 100644 --- a/ping/ping.cpp +++ b/ping/ping.cpp @@ -105,7 +105,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { update.szComponentName = pluginInfo.shortName;
update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
+ update.cpbVersion = (int)strlen((char *)update.pbVersion);
update.szBetaChangelogURL = "https://server.scottellis.com.au/wsvn/mim_plugs/ping/?op=log&rev=0&sc=0&isdir=1";
update.szUpdateURL = UPDATER_AUTOREGISTER;
@@ -118,7 +118,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_ping.html";
update.pbBetaVersionPrefix = (BYTE *)"Ping version ";
- update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+ update.cpbBetaVersionPrefix = (int)strlen((char *)update.pbBetaVersionPrefix);
CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
}
diff --git a/ping/ping_9.sln b/ping/ping_9.sln new file mode 100644 index 0000000..dec0e27 --- /dev/null +++ b/ping/ping_9.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ping", "ping_9.vcproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64
+ {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ping/ping_9.vcproj b/ping/ping_9.vcproj new file mode 100644 index 0000000..186b706 --- /dev/null +++ b/ping/ping_9.vcproj @@ -0,0 +1,934 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ping"
+ ProjectGUID="{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}"
+ RootNamespace="ping"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/ping.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../../../include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PING_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="user32.lib gdi32.lib ws2_32.lib shell32.lib comdlg32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/pingplug.pdb"
+ BaseAddress="0x22040000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/ping.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/ping.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="../../include;../../../include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PING_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ ExceptionHandling="1"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wsock32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/pingplug.pdb"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ BaseAddress="0x22040000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/ping.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(ConfigurationName)64"
+ IntermediateDirectory="$(ConfigurationName)64"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug/ping.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../../../include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PING_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="user32.lib gdi32.lib ws2_32.lib shell32.lib comdlg32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/pingplug.pdb"
+ BaseAddress="0x22040000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/ping.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(ConfigurationName)64"
+ IntermediateDirectory="$(ConfigurationName)64"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/ping.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories="../../include;../../../include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PING_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib wsock32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Release/pingplug.pdb"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ BaseAddress="0x22040000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/ping.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="icmp.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="log.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="menu.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="options.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="ping.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="pinggraph.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="pinglist.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="pingthread.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="rawping.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="utils.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\collection.h"
+ >
+ </File>
+ <File
+ RelativePath="common.h"
+ >
+ </File>
+ <File
+ RelativePath="icmp.h"
+ >
+ </File>
+ <File
+ RelativePath="log.h"
+ >
+ </File>
+ <File
+ RelativePath="menu.h"
+ >
+ </File>
+ <File
+ RelativePath="options.h"
+ >
+ </File>
+ <File
+ RelativePath="ping.h"
+ >
+ </File>
+ <File
+ RelativePath="pinggraph.h"
+ >
+ </File>
+ <File
+ RelativePath="pinglist.h"
+ >
+ </File>
+ <File
+ RelativePath="pingthread.h"
+ >
+ </File>
+ <File
+ RelativePath="rawping.h"
+ >
+ </File>
+ <File
+ RelativePath="resource.h"
+ >
+ </File>
+ <File
+ RelativePath="utils.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="green.ico"
+ >
+ </File>
+ <File
+ RelativePath="grey.ico"
+ >
+ </File>
+ <File
+ RelativePath="ico00001.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon1.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon2.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon3.ico"
+ >
+ </File>
+ <File
+ RelativePath="ping.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="red.ico"
+ >
+ </File>
+ <File
+ RelativePath="yellow.ico"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="cut_code.txt"
+ >
+ </File>
+ <File
+ RelativePath="ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ping/pinggraph.cpp b/ping/pinggraph.cpp index 0ce5184..5ce66fb 100644 --- a/ping/pinggraph.cpp +++ b/ping/pinggraph.cpp @@ -21,7 +21,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar switch(msg) {
case WM_REBUILDLIST:
{
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
bool found = false;
EnterCriticalSection(&data_list_cs);
@@ -44,7 +44,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar return TRUE;
case WM_SHOWWINDOW:
if(wParam == TRUE && lParam == 0) {
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if(wd->hwnd_chk_grid == 0) {
wd->hwnd_chk_grid = CreateWindow("BUTTON", Translate("Show grid lines"), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 0, 0, 0, 0, hwnd, 0, hInst, 0);
@@ -66,7 +66,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar break;
case WM_COMMAND:
if(HIWORD(wParam) == BN_CLICKED) {
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if((HWND)lParam == wd->hwnd_chk_grid) {
wd->show_grid = (SendMessage(wd->hwnd_chk_grid, BM_GETCHECK, 0, 0) == BST_CHECKED);
} else if((HWND)lParam == wd->hwnd_chk_stat) {
@@ -85,7 +85,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar PAINTSTRUCT ps;
HDC hdc;
RECT r;
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if(wd && (hdc = BeginPaint(hwnd, &ps)) != 0) {
GetClientRect(hwnd, &r);
FillRect(hdc, &r, GetSysColorBrush(COLOR_WINDOW));
@@ -201,7 +201,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_SIZE:
{
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
RECT r;
GetClientRect(hwnd, &r);
if(wd->hwnd_chk_grid != 0) SetWindowPos(wd->hwnd_chk_grid, 0, r.right - 150, r.top + 10, 120, 20, SWP_NOZORDER | SWP_NOACTIVATE);
@@ -212,7 +212,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_CLOSE:
{
KillTimer(hwnd, ID_REPAINT_TIMER);
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
{
char buff[30];
sprintf(buff, "pinggraphwnd%d", wd->item_id);
@@ -222,7 +222,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar break;
case WM_DESTROY:
{
- WindowData *wd = (WindowData *)GetWindowLong(hwnd, GWL_USERDATA);
+ WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
{
char buff[30];
sprintf(buff, "WindowHandle%d", wd->item_id);
@@ -236,7 +236,7 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar return DefWindowProc(hwnd, msg, wParam, lParam);
}
-int ShowGraph(WPARAM wParam, LPARAM lParam) {
+INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) {
char buff[30];
sprintf(buff, "WindowHandle%d", (DWORD)wParam);
HWND hGraphWnd = (HWND)DBGetContactSettingDword(0, PLUG, buff, 0);
@@ -280,7 +280,7 @@ int ShowGraph(WPARAM wParam, LPARAM lParam) { DBWriteContactSettingDword(0, PLUG, buff, (DWORD)hGraphWnd);
- SetWindowLong(hGraphWnd, GWL_USERDATA, (LONG)wd);
+ SetWindowLongPtr(hGraphWnd, GWLP_USERDATA, (LONG_PTR)wd);
sprintf(buff, "pinggraphwnd%d", wd->item_id);
Utils_RestoreWindowPosition(hGraphWnd, 0, PLUG, buff);
diff --git a/ping/pinggraph.h b/ping/pinggraph.h index 4777d82..268b376 100644 --- a/ping/pinggraph.h +++ b/ping/pinggraph.h @@ -9,7 +9,7 @@ #define MARK_PERIOD 3600 // vertical lines every this many secs (3600 == 1 hour)
#define MARK_TIME 100 // horizontal lines every this many ms
-int ShowGraph(WPARAM wParam, LPARAM lParam);
+INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam);
// save window positions, close windows
void graphs_cleanup();
diff --git a/ping/pinglist.cpp b/ping/pinglist.cpp index fcb0611..91d00f9 100644 --- a/ping/pinglist.cpp +++ b/ping/pinglist.cpp @@ -29,7 +29,7 @@ const bool PINGADDRESS::operator<(const PINGADDRESS &b) const { // lParam is address of pointer to a std::list<PINGADDRESS>
// copies data into this structure
-int GetPingList(WPARAM wParam,LPARAM lParam)
+INT_PTR GetPingList(WPARAM wParam,LPARAM lParam)
{
PINGLIST *pa = (PINGLIST *)lParam;
@@ -40,8 +40,8 @@ int GetPingList(WPARAM wParam,LPARAM lParam) return 0;
}
-int GetListSize(WPARAM wParam, LPARAM lParam) {
- int ret = 0;
+INT_PTR GetListSize(WPARAM wParam, LPARAM lParam) {
+ INT_PTR ret = 0;
EnterCriticalSection(&list_cs);
ret = list_items.size();
LeaveCriticalSection(&list_cs);
@@ -170,7 +170,7 @@ void read_ping_addresses() { }
}
-int LoadPingList(WPARAM wParam, LPARAM lParam) {
+INT_PTR LoadPingList(WPARAM wParam, LPARAM lParam) {
EnterCriticalSection(&list_cs);
read_ping_addresses();
LeaveCriticalSection(&list_cs);
@@ -180,7 +180,7 @@ int LoadPingList(WPARAM wParam, LPARAM lParam) { // wParam is zero
// lParam is zero
-int SavePingList(WPARAM wParam, LPARAM lParam) {
+INT_PTR SavePingList(WPARAM wParam, LPARAM lParam) {
EnterCriticalSection(&list_cs);
write_ping_addresses();
LeaveCriticalSection(&list_cs);
@@ -191,7 +191,7 @@ int SavePingList(WPARAM wParam, LPARAM lParam) { // wParam is address of a PINGLIST structure to replace the current one
// lParam is zero
-int SetPingList(WPARAM wParam, LPARAM lParam) {
+INT_PTR SetPingList(WPARAM wParam, LPARAM lParam) {
PINGLIST *pli = (PINGLIST *)wParam;
EnterCriticalSection(&list_cs);
@@ -204,7 +204,7 @@ int SetPingList(WPARAM wParam, LPARAM lParam) { // wParam is address of a PINGLIST structure to replace the current one
// lParam is zero
-int SetAndSavePingList(WPARAM wParam, LPARAM lParam) {
+INT_PTR SetAndSavePingList(WPARAM wParam, LPARAM lParam) {
PINGLIST *pli = (PINGLIST *)wParam;
EnterCriticalSection(&list_cs);
@@ -219,7 +219,7 @@ int SetAndSavePingList(WPARAM wParam, LPARAM lParam) { return 0;
}
-int ClearPingList(WPARAM wParam, LPARAM lParam) {
+INT_PTR ClearPingList(WPARAM wParam, LPARAM lParam) {
EnterCriticalSection(&list_cs);
list_items.clear();
LeaveCriticalSection(&list_cs);
diff --git a/ping/pinglist.h b/ping/pinglist.h index db946a7..ed2a948 100644 --- a/ping/pinglist.h +++ b/ping/pinglist.h @@ -9,13 +9,13 @@ extern PINGLIST list_items; extern HANDLE reload_event_handle;
extern CRITICAL_SECTION list_cs;
-int LoadPingList(WPARAM wParam, LPARAM lParam);
-int GetPingList(WPARAM wParam,LPARAM lParam);
-int SavePingList(WPARAM wParam, LPARAM lParam);
-int SetPingList(WPARAM wParam, LPARAM lParam); // use when you modified db yourself
-int SetAndSavePingList(WPARAM wParam, LPARAM lParam);
-int ClearPingList(WPARAM wParam, LPARAM lParam);
-int GetListSize(WPARAM wParam, LPARAM lParam);
+INT_PTR LoadPingList(WPARAM wParam, LPARAM lParam);
+INT_PTR GetPingList(WPARAM wParam,LPARAM lParam);
+INT_PTR SavePingList(WPARAM wParam, LPARAM lParam);
+INT_PTR SetPingList(WPARAM wParam, LPARAM lParam); // use when you modified db yourself
+INT_PTR SetAndSavePingList(WPARAM wParam, LPARAM lParam);
+INT_PTR ClearPingList(WPARAM wParam, LPARAM lParam);
+INT_PTR GetListSize(WPARAM wParam, LPARAM lParam);
// only call with list_cs locked!
void write_ping_addresses();
diff --git a/ping/pingthread.cpp b/ping/pingthread.cpp index 6623b51..97e3347 100644 --- a/ping/pingthread.cpp +++ b/ping/pingthread.cpp @@ -305,7 +305,7 @@ int FillList(WPARAM wParam, LPARAM lParam) { return 0;
}
-int PingPlugShowWindow(WPARAM wParam, LPARAM lParam) {
+INT_PTR PingPlugShowWindow(WPARAM wParam, LPARAM lParam) {
if(hpwnd) {
if(frame_id != -1 && ServiceExists(MS_CLIST_FRAMES_SHFRAME)) CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)frame_id, 0);
else {
@@ -319,7 +319,7 @@ int PingPlugShowWindow(WPARAM wParam, LPARAM lParam) { void CALLBACK TimerProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_TIMER message
- UINT idEvent, // timer identifier
+ UINT_PTR idEvent, // timer identifier
DWORD dwTime // current system time
)
{
@@ -958,7 +958,7 @@ void AttachToClist(bool attach) { SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
// subclass clist to trap move/size
- wpOrigClistProc = (WNDPROC) SetWindowLong(hwnd_clist, GWL_WNDPROC, (LONG) ClistSubclassProc);
+ wpOrigClistProc = (WNDPROC) SetWindowLongPtr(hwnd_clist, GWLP_WNDPROC, (LONG_PTR) ClistSubclassProc);
UpdateFrame();
} else {
@@ -966,7 +966,7 @@ void AttachToClist(bool attach) { SetWindowLong(hpwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
SetWindowPos(hpwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
- SetWindowLong(hwnd_clist, GWL_WNDPROC, (LONG) wpOrigClistProc);
+ SetWindowLongPtr(hwnd_clist, GWLP_WNDPROC, (LONG_PTR) wpOrigClistProc);
}
}
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);
}
}
diff --git a/ping/utils.h b/ping/utils.h index 0427ff3..7f2574b 100644 --- a/ping/utils.h +++ b/ping/utils.h @@ -11,19 +11,19 @@ void __stdcall ShowPopup( const char* line1, const char* line2, int flags );
-int PluginPing(WPARAM wParam,LPARAM lParam);
+INT_PTR PluginPing(WPARAM wParam,LPARAM lParam);
void Lock(CRITICAL_SECTION *cs, char *lab);
void Unlock(CRITICAL_SECTION *cs);
-int PingDisableAll(WPARAM wParam, LPARAM lParam);
-int PingEnableAll(WPARAM wParam, LPARAM lParam);
+INT_PTR PingDisableAll(WPARAM wParam, LPARAM lParam);
+INT_PTR PingEnableAll(WPARAM wParam, LPARAM lParam);
-int ToggleEnabled(WPARAM wParam, LPARAM lParam);
+INT_PTR ToggleEnabled(WPARAM wParam, LPARAM lParam);
-int DblClick(WPARAM wParam, LPARAM lParam);
+INT_PTR DblClick(WPARAM wParam, LPARAM lParam);
-int EditContact(WPARAM wParam, LPARAM lParam);
+INT_PTR EditContact(WPARAM wParam, LPARAM lParam);
// read in addresses from old pingplug
void import_ping_addresses();
|