添加了cmd终端控制功能,服务端控制端可交互,解决的显示连接数的bug

This commit is contained in:
changcheng
2020-05-25 20:02:57 +08:00
parent d396e8777e
commit d38532055a
28 changed files with 488 additions and 157 deletions

Binary file not shown.

View File

@@ -5,7 +5,7 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand> ..\\..\bin\server\TestLoadDll.exe</LocalDebuggerCommand> <LocalDebuggerCommand>..\\..\bin\server\TestLoadDll.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -1 +0,0 @@
f:\myapp\ccremote\ccmaindll\ccmaindll\..\..\bin\server\ccmaindll.dll

View File

@@ -1,107 +1,107 @@
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
pch.cpp pch.cpp
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
Audio.cpp Audio.cpp
f:\myapp\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
ClientSocket.cpp ClientSocket.cpp
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 g:\ccremote\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”的声明 g:\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 g:\ccremote\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”的声明 g:\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 g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据 g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”可能丢失数据
f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配
Buffer.cpp Buffer.cpp
until.cpp until.cpp
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. 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.
d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明 g:\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': 被声明为已否决 g:\ccremote\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”的声明 g:\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': 被声明为已否决 g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
正在生成代码... 正在生成代码...
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
AudioManager.cpp AudioManager.cpp
Dialupass.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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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': 被声明为已否决 g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
install.cpp install.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量 g:\ccremote\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
KernelManager.cpp KernelManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配
KeyboardManager.cpp KeyboardManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配
Manager.cpp Manager.cpp
RegEditEx.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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\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. g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
ScreenManager.cpp ScreenManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义 g:\ccremote\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”的前一个定义 g:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义
ScreenSpy.cpp ScreenSpy.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(363): warning C4018: “>”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(363): warning C4018: “>”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(384): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(384): warning C4018: “<”: 有符号/无符号不匹配
f:\myapp\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(403): warning C4018: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(403): warning C4018: “<”: 有符号/无符号不匹配
ShellManager.cpp 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. g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明
SystemManager.cpp 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. g:\ccremote\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”的声明 g:\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: “<”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(111): warning C4018: “<”: 有符号/无符号不匹配
VideoCap.cpp VideoCap.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(118): warning C4101: “gCapTureParms”: 未引用的局部变量 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(118): warning C4101: “gCapTureParms”: 未引用的局部变量
VideoManager.cpp VideoManager.cpp
正在生成代码... 正在生成代码...
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
FileManager.cpp FileManager.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(271): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”可能丢失数据 g:\ccremote\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”可能丢失数据 g:\ccremote\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. g:\ccremote\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”的声明 g:\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: “+”: 整型常量溢出 g:\ccremote\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. g:\ccremote\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”的声明 g:\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”: 不是所有的控件路径都返回值 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(240): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值
cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings”
dllmain.cpp dllmain.cpp
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量 g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量
f:\myapp\ccremote\ccmaindll\ccmaindll\common\login.h(184): warning C4996: 'GetVersionExA': 被声明为已否决 g:\ccremote\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”的声明 g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明
f:\myapp\ccremote\ccmaindll\ccmaindll\dllmain.cpp(166): 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:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(166): 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”的声明 g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明
LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略 LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”已忽略
正在创建库 ..\..\bin\server\CcMainDll.lib 和对象 ..\..\bin\server\CcMainDll.exp 正在创建库 ..\..\bin\server\CcMainDll.lib 和对象 ..\..\bin\server\CcMainDll.exp
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突请使用 /NODEFAULTLIB:library
CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll CcMainDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\CcMainDll\..\..\bin\server\CcMainDll.dll

View File

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

View File

@@ -1,3 +1,3 @@
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
TestLoadDll.cpp TestLoadDll.cpp
TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe TestLoadDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe

View File

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

View File

@@ -12,7 +12,7 @@ int main()
//载入服务端dll //载入服务端dll
HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll"); HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll");
//HMODULE hServerDll = LoadLibrary(".\server.dll"); //HMODULE hServerDll = LoadLibrary(".\server.dll");
//声明导出函数类型--查看上一节导出的TestRun函数 //声明导出函数类型--导出的TestRun函数
typedef void(_cdecl *TestRunT)(char* strHost, int nPort); typedef void(_cdecl *TestRunT)(char* strHost, int nPort);
//寻找dll中导出函数 //寻找dll中导出函数
TestRunT pTestRunT = (TestRunT)GetProcAddress(hServerDll, "TestFun"); TestRunT pTestRunT = (TestRunT)GetProcAddress(hServerDll, "TestFun");

Binary file not shown.

View File

@@ -0,0 +1,222 @@
// CShellDlg.cpp: 实现文件
//
#include "pch.h"
#include "CcRemote.h"
#include "CShellDlg.h"
#include "afxdialogex.h"
#include "..\..\common\macros.h"
// CShellDlg 对话框
IMPLEMENT_DYNAMIC(CShellDlg, CDialog)
CShellDlg::CShellDlg(CWnd* pParent, CIOCPServer* pIOCPServer, ClientContext *pContext)
: CDialog(IDD_SHELL, pParent)
{
m_iocpServer = pIOCPServer;
m_pContext = pContext;
m_nCurSel = 0;
m_hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_CMDSHELL));
}
CShellDlg::~CShellDlg()
{
}
void CShellDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT, m_edit);
}
BEGIN_MESSAGE_MAP(CShellDlg, CDialog)
ON_WM_CLOSE()
ON_WM_SIZE()
ON_EN_CHANGE(IDC_EDIT, &CShellDlg::OnEnChangeEdit)
ON_WM_CTLCOLOR()
END_MESSAGE_MAP()
// CShellDlg 消息处理程序
void CShellDlg::OnClose()
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
m_pContext->m_Dialog[0] = 0;
closesocket(m_pContext->m_Socket);
CDialog::OnClose();
}
void CShellDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
ResizeEdit();
// TODO: 在此处添加消息处理程序代码
}
void CShellDlg::ResizeEdit(void)
{
if (m_edit.m_hWnd == NULL)
{
return;
}
RECT rectClient;
RECT rectEdit;
GetClientRect(&rectClient);
rectEdit.left = 0;
rectEdit.top = 0;
rectEdit.right = rectClient.right;
rectEdit.bottom = rectClient.bottom;
m_edit.MoveWindow(&rectEdit);
}
BOOL CShellDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此添加额外的初始化
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
//得到当前窗口的数据大小 初始化时这个值应该为0
m_nCurSel = m_edit.GetWindowTextLength();
//得到服务端的IP并显示到窗口的标题上
CString str;
sockaddr_in sockAddr;
memset(&sockAddr, 0, sizeof(sockAddr));
int nSockAddrLen = sizeof(sockAddr);
BOOL bResult = getpeername(m_pContext->m_Socket, (SOCKADDR*)&sockAddr, &nSockAddrLen);
str.Format("\\\\%s - 远程终端", bResult != INVALID_SOCKET ? inet_ntoa(sockAddr.sin_addr) : "");
SetWindowText(str);
m_edit.SetLimitText(MAXDWORD); // 设置最大长度
// 通知远程控制端对话框已经打开
BYTE bToken = COMMAND_NEXT;
m_iocpServer->Send(m_pContext, &bToken, sizeof(BYTE));
//---------改变窗口大小触发动态调整-------|
CRect rect;
GetWindowRect(&rect);
rect.bottom += 20;
MoveWindow(rect);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
void CShellDlg::OnEnChangeEdit()
{
// TODO: 如果该控件是 RICHEDIT 控件,它将不
// 发送此通知,除非重写 CDialog::OnInitDialog()
// 函数并调用 CRichEditCtrl().SetEventMask()
// 同时将 ENM_CHANGE 标志“或”运算到掩码中。
int len = m_edit.GetWindowTextLength();
if (len < m_nCurSel)
m_nCurSel = len;
// TODO: 在此添加控件通知处理程序代码
}
HBRUSH CShellDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: 在此更改 DC 的任何特性
if ((pWnd->GetDlgCtrlID() == IDC_EDIT) && (nCtlColor == CTLCOLOR_EDIT))
{
COLORREF clr = RGB(255, 255, 255);
pDC->SetTextColor(clr); //设置白色的文本
clr = RGB(0, 0, 0);
pDC->SetBkColor(clr); //设置黑色的背景
return CreateSolidBrush(clr); //作为约定,返回背景色对应的刷子句柄
}
else
{
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}
// TODO: 如果默认的不是所需画笔,则返回另一个画笔
return hbr;
}
void CShellDlg::OnReceiveComplete(void)
{
AddKeyBoardData();
m_nReceiveLength = m_edit.GetWindowTextLength();
}
void CShellDlg::AddKeyBoardData(void)
{
// 最后填上0
m_pContext->m_DeCompressionBuffer.Write((LPBYTE)"", 1);
CString strResult = (char*)m_pContext->m_DeCompressionBuffer.GetBuffer(0);
//替换掉原来的换行符 可能cmd 的换行同w32下的编辑控件的换行符不一致
strResult.Replace("\n", "\r\n");
//得到当前窗口的字符个数
int len = m_edit.GetWindowTextLength();
//将光标定位到该位置并选中指定个数的字符
m_edit.SetSel(len, len);
//用传递过来的数据替换掉该位置的字符
m_edit.ReplaceSel(strResult);
//重新得到字符的大小
m_nCurSel = m_edit.GetWindowTextLength();
//现在我们基本弄明白了 数据传输到主控端后的处理
//那主控端的数据时怎样传递到服务端上的呢??
//我们注意到,我们在使用远程终端时 ,发送的每一个命令行 都有一个换行符 就是一个回车
//要找到这个回车的处理我们就要到PreTranslateMessage函数的定义
}
BOOL CShellDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: 在此添加专用代码和/或调用基类
//如果是键盘按下
if (pMsg->message == WM_KEYDOWN)
{
// 屏蔽VK_ESCAPE、VK_DELETE
if (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_DELETE)
return true;
//如果是可编辑框的回车键
if (pMsg->wParam == VK_RETURN && pMsg->hwnd == m_edit.m_hWnd)
{
//得到窗口的数据大小
int len = m_edit.GetWindowTextLength();
CString str;
//得到窗口的字符数据
m_edit.GetWindowText(str);
//加入换行符
str += "\r\n";
//注意gh0st是怎样得到当前的数据的 得到整个的缓冲区再加上原有的字符的位置,其实就是用户当前输入的数据了
//然后将数据发送出去。。。。。。。。。。。。。。。 整个分析就完毕了。。。。。。
m_iocpServer->Send(m_pContext, (LPBYTE)str.GetBuffer(0) + m_nCurSel, str.GetLength() - m_nCurSel);
m_nCurSel = m_edit.GetWindowTextLength();
}
// 限制VK_BACK
if (pMsg->wParam == VK_BACK && pMsg->hwnd == m_edit.m_hWnd)
{
if (m_edit.GetWindowTextLength() <= m_nReceiveLength)
return true;
}
}
// Ctrl没按下
if (pMsg->message == WM_CHAR && GetKeyState(VK_CONTROL) >= 0)
{
int len = m_edit.GetWindowTextLength();
m_edit.SetSel(len, len);
// 用户删除了部分内容改变m_nCurSel
if (len < m_nCurSel)
m_nCurSel = len;
}
return CDialog::PreTranslateMessage(pMsg);
}

View File

@@ -0,0 +1,46 @@
#pragma once
#include "include/IOCPServer.h"
// CShellDlg 对话框
class CShellDlg : public CDialog
{
DECLARE_DYNAMIC(CShellDlg)
public:
CShellDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // 标准构造函数
virtual ~CShellDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_SHELL };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
public:
CEdit m_edit;
private:
HICON m_hIcon;
ClientContext* m_pContext;
CIOCPServer* m_iocpServer;
UINT m_nCurSel;
UINT m_nReceiveLength;
public:
afx_msg void OnClose();
afx_msg void OnSize(UINT nType, int cx, int cy);
void ResizeEdit(void);
virtual BOOL OnInitDialog();
afx_msg void OnEnChangeEdit();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
void OnReceiveComplete(void);
private:
void AddKeyBoardData(void);
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
};

Binary file not shown.

View File

@@ -205,6 +205,7 @@
<ClInclude Include="CcRemote.h" /> <ClInclude Include="CcRemote.h" />
<ClInclude Include="CcRemoteDlg.h" /> <ClInclude Include="CcRemoteDlg.h" />
<ClInclude Include="CSettingDlg.h" /> <ClInclude Include="CSettingDlg.h" />
<ClInclude Include="CShellDlg.h" />
<ClInclude Include="framework.h" /> <ClInclude Include="framework.h" />
<ClInclude Include="include\Buffer.h" /> <ClInclude Include="include\Buffer.h" />
<ClInclude Include="include\CpuUsage.h" /> <ClInclude Include="include\CpuUsage.h" />
@@ -222,6 +223,7 @@
<ClCompile Include="CcRemote.cpp" /> <ClCompile Include="CcRemote.cpp" />
<ClCompile Include="CcRemoteDlg.cpp" /> <ClCompile Include="CcRemoteDlg.cpp" />
<ClCompile Include="CSettingDlg.cpp" /> <ClCompile Include="CSettingDlg.cpp" />
<ClCompile Include="CShellDlg.cpp" />
<ClCompile Include="include\Buffer.cpp"> <ClCompile Include="include\Buffer.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
@@ -254,6 +256,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="res\CcRemote.ico" /> <Image Include="res\CcRemote.ico" />
<Image Include="res\cmdshell.ico" />
<Image Include="res\toolbar1.bmp" /> <Image Include="res\toolbar1.bmp" />
<Image Include="res\ToolBar_Main.bmp" /> <Image Include="res\ToolBar_Main.bmp" />
</ItemGroup> </ItemGroup>

View File

@@ -69,6 +69,9 @@
<ClInclude Include="SEU_QQwry.h"> <ClInclude Include="SEU_QQwry.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="CShellDlg.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="CcRemote.cpp"> <ClCompile Include="CcRemote.cpp">
@@ -101,6 +104,9 @@
<ClCompile Include="SEU_QQwry.cpp"> <ClCompile Include="SEU_QQwry.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="CShellDlg.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="CcRemote.rc"> <ResourceCompile Include="CcRemote.rc">
@@ -122,5 +128,8 @@
<Image Include="res\ToolBar_Main.bmp"> <Image Include="res\ToolBar_Main.bmp">
<Filter>资源文件</Filter> <Filter>资源文件</Filter>
</Image> </Image>
<Image Include="res\cmdshell.ico">
<Filter>资源文件</Filter>
</Image>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -11,12 +11,13 @@
#include "..\..\common\macros.h" #include "..\..\common\macros.h"
#ifdef _DEBUG #ifdef _DEBUG
#define new DEBUG_NEW #define new DEBUG_NEW
#endif #endif
CCcRemoteDlg *g_pPCRemoteDlg = NULL; //声明全局变量 CCcRemoteDlg *g_pCcRemoteDlg = NULL; //声明全局变量
CIOCPServer *m_iocpServer = NULL; CIOCPServer *m_iocpServer = NULL;
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框 // 用于应用程序“关于”菜单项的 CAboutDlg 对话框
@@ -61,7 +62,7 @@ CCcRemoteDlg::CCcRemoteDlg(CWnd* pParent /*=nullptr*/)
{ {
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
//iCount = 0; //iCount = 0;
g_pPCRemoteDlg = this; g_pCcRemoteDlg = this;
if (((CCcRemoteApp *)AfxGetApp())->m_bIsQQwryExist)//APP初始化会检查文件是否存在 if (((CCcRemoteApp *)AfxGetApp())->m_bIsQQwryExist)//APP初始化会检查文件是否存在
{ {
m_QQwry = new SEU_QQwry; m_QQwry = new SEU_QQwry;
@@ -80,6 +81,7 @@ BEGIN_MESSAGE_MAP(CCcRemoteDlg, CDialogEx)
//-------------自定义------------ //-------------自定义------------
ON_MESSAGE(UM_ICONNOTIFY, (LRESULT(__thiscall CWnd::*)(WPARAM, LPARAM))OnIconNotify) ON_MESSAGE(UM_ICONNOTIFY, (LRESULT(__thiscall CWnd::*)(WPARAM, LPARAM))OnIconNotify)
ON_MESSAGE(WM_ADDTOLIST,OnAddToList) ON_MESSAGE(WM_ADDTOLIST,OnAddToList)
ON_MESSAGE(WM_OPENSHELLDIALOG, OnOpenShellDialog)
//-------------系统------------- //-------------系统-------------
ON_WM_SYSCOMMAND() ON_WM_SYSCOMMAND()
@@ -210,7 +212,7 @@ BOOL CCcRemoteDlg::OnInitDialog()
//////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
m_OnlineCount = 0;//初始上线数为0
InitSystemMenu();//初始化系统托盘 InitSystemMenu();//初始化系统托盘
InitToolBar();//初始化工具栏按钮控件 InitToolBar();//初始化工具栏按钮控件
InitMyMenu();//初始化菜单控件 InitMyMenu();//初始化菜单控件
@@ -396,6 +398,7 @@ void CCcRemoteDlg::AddList(CString strIP, CString strAddr, CString strPCName, CS
m_CList_Online.SetItemText(0, ONLINELIST_CPU, strCPU); m_CList_Online.SetItemText(0, ONLINELIST_CPU, strCPU);
m_CList_Online.SetItemText(0, ONLINELIST_VIDEO, strVideo); m_CList_Online.SetItemText(0, ONLINELIST_VIDEO, strVideo);
m_CList_Online.SetItemText(0, ONLINELIST_PING, strPing); m_CList_Online.SetItemText(0, ONLINELIST_PING, strPing);
m_CList_Online.SetItemData(0, (DWORD)pContext);
ShowMessage(true, strIP + "主机上线"); ShowMessage(true, strIP + "主机上线");
} }
@@ -485,6 +488,8 @@ void CCcRemoteDlg::OnOnlineCmd()
{ {
// TODO: 在此添加命令处理程序代码 // TODO: 在此添加命令处理程序代码
MessageBox("CMD"); MessageBox("CMD");
BYTE bToken = COMMAND_SHELL;
SendSelectCommand(&bToken,sizeof(BYTE));
} }
@@ -723,7 +728,7 @@ void CCcRemoteDlg::ListenPort()
Activate(nPort, nMaxConnection); //开始监听 Activate(nPort, nMaxConnection); //开始监听
} }
//控制命令都要经过这个函数
void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext) void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
{ {
if (pContext == NULL) if (pContext == NULL)
@@ -733,28 +738,28 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
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) //这里查看是否给他赋值了,如果赋值了就把数据传给功能窗口处理 if (pContext->m_Dialog[0] > 0) //这里查看是否给他赋值了,如果赋值了就把数据传给功能窗口处理
{ {
switch (pContext->m_Dialog[0]) switch (pContext->m_Dialog[0])
{ {
case FILEMANAGER_DLG: //case FILEMANAGER_DLG:
((CFileManagerDlg *)dlg)->OnReceiveComplete(); // ((CFileManagerDlg *)dlg)->OnReceiveComplete();
break; // break;
case SCREENSPY_DLG: //case SCREENSPY_DLG:
((CScreenSpyDlg *)dlg)->OnReceiveComplete(); // ((CScreenSpyDlg *)dlg)->OnReceiveComplete();
break; // break;
case WEBCAM_DLG: //case WEBCAM_DLG:
((CWebCamDlg *)dlg)->OnReceiveComplete(); // ((CWebCamDlg *)dlg)->OnReceiveComplete();
break; // break;
case AUDIO_DLG: //case AUDIO_DLG:
((CAudioDlg *)dlg)->OnReceiveComplete(); // ((CAudioDlg *)dlg)->OnReceiveComplete();
break; // break;
case KEYBOARD_DLG: //case KEYBOARD_DLG:
((CKeyBoardDlg *)dlg)->OnReceiveComplete(); // ((CKeyBoardDlg *)dlg)->OnReceiveComplete();
break; // break;
case SYSTEM_DLG: //case SYSTEM_DLG:
((CSystemDlg *)dlg)->OnReceiveComplete(); // ((CSystemDlg *)dlg)->OnReceiveComplete();
break; // break;
case SHELL_DLG: case SHELL_DLG:
((CShellDlg *)dlg)->OnReceiveComplete(); ((CShellDlg *)dlg)->OnReceiveComplete();
break; break;
@@ -762,7 +767,7 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
break; break;
} }
return; return;
}*/ }
switch (pContext->m_DeCompressionBuffer.GetBuffer(0)[0]) //如果没有赋值就判断是否是上线包和打开功能功能窗口 switch (pContext->m_DeCompressionBuffer.GetBuffer(0)[0]) //如果没有赋值就判断是否是上线包和打开功能功能窗口
{ //讲解后回到ClientContext结构体 { //讲解后回到ClientContext结构体
@@ -780,14 +785,14 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
{ {
//这里处理上线 //这里处理上线
if (m_iocpServer->m_nMaxConnections <= g_pPCRemoteDlg->m_CList_Online.GetItemCount()) if (m_iocpServer->m_nMaxConnections <= g_pCcRemoteDlg->m_CList_Online.GetItemCount())
{ {
closesocket(pContext->m_Socket); closesocket(pContext->m_Socket);
} }
else else
{ {
pContext->m_bIsMainSocket = true; pContext->m_bIsMainSocket = true;
g_pPCRemoteDlg->PostMessage(WM_ADDTOLIST, 0, (LPARAM)pContext); g_pCcRemoteDlg->PostMessage(WM_ADDTOLIST, 0, (LPARAM)pContext);
} }
// 激活 // 激活
BYTE bToken = COMMAND_ACTIVED; BYTE bToken = COMMAND_ACTIVED;
@@ -814,10 +819,10 @@ void CCcRemoteDlg::ProcessReceiveComplete(ClientContext *pContext)
break; break;
case TOKEN_PSLIST: case TOKEN_PSLIST:
g_pConnectView->PostMessage(WM_OPENPSLISTDIALOG, 0, (LPARAM)pContext); g_pConnectView->PostMessage(WM_OPENPSLISTDIALOG, 0, (LPARAM)pContext);
break;
case TOKEN_SHELL_START:
g_pConnectView->PostMessage(WM_OPENSHELLDIALOG, 0, (LPARAM)pContext);
break;*/ break;*/
case TOKEN_SHELL_START:
g_pCcRemoteDlg->PostMessage(WM_OPENSHELLDIALOG, 0, (LPARAM)pContext);
break;
// 命令停止当前操作 // 命令停止当前操作
default: default:
closesocket(pContext->m_Socket); closesocket(pContext->m_Socket);
@@ -927,5 +932,41 @@ LRESULT CCcRemoteDlg::OnAddToList(WPARAM wParam, LPARAM lParam)
} }
catch (...) {} catch (...) {}
return 0;
}
void CCcRemoteDlg::SendSelectCommand(PBYTE pData, UINT nSize)
{
// TODO: 在此处添加实现代码
//取得选中的哪一个服务端list位置
POSITION pos = m_CList_Online.GetFirstSelectedItemPosition(); //iterator for the CListCtrl
while (pos) //so long as we have a valid POSITION, we keep iterating
{
int nItem = m_CList_Online.GetNextSelectedItem(pos);
//从列表条目中取出ClientContext结构体
//上线的时候传进的一个ClientContext值
ClientContext* pContext = (ClientContext*)m_CList_Online.GetItemData(nItem);
// 发送获得驱动器列表数据包
m_iocpServer->Send(pContext, pData, nSize); //调用 m_iocpServer 的Send 函数发送数据 查看m_iocpServer 定义
//Save the pointer to the new item in our CList
} //EO while(pos) -- at this point we have deleted the moving items and stored them in memoryt .
}
//打开终端管理窗口
LRESULT CCcRemoteDlg::OnOpenShellDialog(WPARAM wParam, LPARAM lParam)
{
ClientContext *pContext = (ClientContext *)lParam;
//这里定义远程终端的对话框转到远程终端的CShellDlg类的定义 先查看对话框界面后转到OnInitDialog
CShellDlg *dlg = new CShellDlg(this, m_iocpServer, pContext);
// 设置父窗口为卓面
dlg->Create(IDD_SHELL, GetDesktopWindow());
dlg->ShowWindow(SW_SHOW);
pContext->m_Dialog[0] = SHELL_DLG;
pContext->m_Dialog[1] = (int)dlg;
return 0; return 0;
} }

View File

@@ -5,6 +5,7 @@
#include "PublicStruct.h" #include "PublicStruct.h"
#include "include/IOCPServer.h" #include "include/IOCPServer.h"
#include "SEU_QQwry.h" #include "SEU_QQwry.h"
#include "CShellDlg.h"
#pragma once #pragma once
@@ -95,6 +96,7 @@ public:
//-------------自定义消息处理------------- //-------------自定义消息处理-------------
afx_msg void OnIconNotify(WPARAM wParam, LPARAM lParam); afx_msg void OnIconNotify(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnAddToList(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnAddToList(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnOpenShellDialog(WPARAM, LPARAM);
//-------------系统消息处理------------- //-------------系统消息处理-------------
afx_msg void OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult);
@@ -113,4 +115,6 @@ public:
afx_msg void OnMainBuild(); afx_msg void OnMainBuild();
afx_msg void OnMainAbout(); afx_msg void OnMainAbout();
afx_msg void OnClose(); afx_msg void OnClose();
private:
void SendSelectCommand(PBYTE pData, UINT nSize);
}; };

View File

@@ -1,12 +1,29 @@
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.pch g:\ccremote\ccremote\bin\ccremote.ipdb
f:\myapp\ccremote\ccremote\ccremote\release\vc141.pdb g:\ccremote\ccremote\bin\ccremote.iobj
f:\myapp\ccremote\ccremote\ccremote\release\pch.obj g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.pch
f:\myapp\ccremote\ccremote\ccremote\release\truecolortoolbar.obj g:\ccremote\ccremote\ccremote\ccremote\release\vc141.pdb
f:\myapp\ccremote\ccremote\ccremote\release\inifile.obj g:\ccremote\ccremote\ccremote\ccremote\release\pch.obj
f:\myapp\ccremote\ccremote\ccremote\release\cpuusage.obj g:\ccremote\ccremote\ccremote\ccremote\release\truecolortoolbar.obj
f:\myapp\ccremote\ccremote\ccremote\release\csettingdlg.obj g:\ccremote\ccremote\ccremote\ccremote\release\seu_qqwry.obj
f:\myapp\ccremote\ccremote\ccremote\release\ccremotedlg.obj g:\ccremote\ccremote\ccremote\ccremote\release\inifile.obj
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.obj g:\ccremote\ccremote\ccremote\ccremote\release\cpuusage.obj
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.command.1.tlog g:\ccremote\ccremote\ccremote\ccremote\release\cshelldlg.obj
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.read.1.tlog g:\ccremote\ccremote\ccremote\ccremote\release\csettingdlg.obj
f:\myapp\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.write.1.tlog g:\ccremote\ccremote\ccremote\ccremote\release\ccremotedlg.obj
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.obj
g:\ccremote\ccremote\ccremote\ccremote\release\iocpserver.obj
g:\ccremote\ccremote\ccremote\ccremote\release\buffer.obj
g:\ccremote\ccremote\bin\ccremote.exe
g:\ccremote\ccremote\bin\ccremote.pdb
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.res
g:\ccremote\ccremote\ccremote\ccremote\..\..\bin\ccremote.exe
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\ccremote.write.1u.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\cl.write.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\link.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\link.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\link.write.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.command.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.read.1.tlog
g:\ccremote\ccremote\ccremote\ccremote\release\ccremote.tlog\rc.write.1.tlog

View File

@@ -1,32 +1,17 @@
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 G:\VS2017\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
pch.cpp
CcRemote.cpp
CcRemoteDlg.cpp CcRemoteDlg.cpp
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(157): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(159): 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”的声明 g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(162): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(164): 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”的声明 g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(303): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据 g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(305): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(320): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据 g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(322): warning C4244: “初始化”: 从“double”转换到“int”可能丢失数据
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(783): warning C4018: “<=”: 有符号/无符号不匹配 g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(788): warning C4018: “<=”: 有符号/无符号不匹配
f:\myapp\ccremote\ccremote\ccremote\ccremotedlg.cpp(862): warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings g:\ccremote\ccremote\ccremote\ccremote\ccremotedlg.cpp(867): 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”的声明 g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(1849): note: 参见“inet_ntoa”的声明
CSettingDlg.cpp
CpuUsage.cpp
IniFile.cpp
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”的声明
SEU_QQwry.cpp
TrueColorToolBar.cpp
Buffer.cpp
IOCPServer.cpp
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 436 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. 1 of 459 functions ( 0.2%) 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
已完成代码的生成 已完成代码的生成
CcRemote.vcxproj -> F:\myapp\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe CcRemote.vcxproj -> G:\CcRemote\CcRemote\CcRemote\CcRemote\..\..\bin\CcRemote.exe

View File

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

View File

@@ -84,7 +84,7 @@ public:
m_ioType = ioType; m_ioType = ioType;
} }
}; };
//lang2.1_3
struct ClientContext //<2F>򵥷<EFBFBD><F2B5A5B7><EFBFBD>ClientContext<78><EFBFBD><E1B9B9>Ȼ<EFBFBD><C8BB><EFBFBD>ص<EFBFBD> SendSelectCommand struct ClientContext //<2F>򵥷<EFBFBD><F2B5A5B7><EFBFBD>ClientContext<78><EFBFBD><E1B9B9>Ȼ<EFBFBD><C8BB><EFBFBD>ص<EFBFBD> SendSelectCommand
{ {

View File

@@ -12,6 +12,7 @@
// 添加要在此处预编译的标头 // 添加要在此处预编译的标头
#include "framework.h" #include "framework.h"
#include <afxcontrolbars.h> #include <afxcontrolbars.h>
#include <afxwin.h>
#endif //PCH_H #endif //PCH_H

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -17,11 +17,15 @@
#define IDR_MENU3 137 #define IDR_MENU3 137
#define IDR_MENU_NOTIFY 137 #define IDR_MENU_NOTIFY 137
#define IDD_DIALOG_SETTING 138 #define IDD_DIALOG_SETTING 138
#define IDD_SHELL 140
#define IDI_ICON1 142
#define IDI_CMDSHELL 142
#define IDC_ONLINE 1000 #define IDC_ONLINE 1000
#define IDC_LIST2 1001 #define IDC_LIST2 1001
#define IDC_MESSAGE 1001 #define IDC_MESSAGE 1001
#define IDC_EDIT_PORT 1002 #define IDC_EDIT_PORT 1002
#define IDC_EDIT_MAX 1003 #define IDC_EDIT_MAX 1003
#define IDC_EDIT 1003
#define ID_ONLINE_32771 32771 #define ID_ONLINE_32771 32771
#define ID_ONLINE_32772 32772 #define ID_ONLINE_32772 32772
#define ID_ONLINE_32773 32773 #define ID_ONLINE_32773 32773
@@ -72,9 +76,9 @@
// //
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 140 #define _APS_NEXT_RESOURCE_VALUE 143
#define _APS_NEXT_COMMAND_VALUE 32817 #define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1003 #define _APS_NEXT_CONTROL_VALUE 1004
#define _APS_NEXT_SYMED_VALUE 101 #define _APS_NEXT_SYMED_VALUE 101
#endif #endif
#endif #endif

Binary file not shown.

Binary file not shown.

Binary file not shown.