![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Windows核心编程
Yours风之恋
一个孜孜不倦的求知者………………………………
展开
-
动态链接库
键盘鼠标HOOK Demo 1,------------------------ 导出代码 // keyHooker.cpp : 定义 DLL 应用程序的导出函数。 // #include "stdafx.h" #include "windows.h" HINSTANCE h_st; HHOOK g_KeyBoardHook; //HHOOK g_MouseHook; HWND g_wnd原创 2014-04-08 19:12:05 · 926 阅读 · 0 评论 -
Win32 例程(关机,重启,注销)
#include #include /* 系统特权提升 @lpName: SE_SHUTDOWN_NAME 关机,重启权限 */ BOOL PrivilegePromote(LPCTSTR lpName) { HANDLE hToken = NULL; TOKEN_PRIVILEGES tkp = {0}; // 打开进程令牌 if (!OpenProcessToken(G原创 2014-04-10 16:05:42 · 2179 阅读 · 0 评论 -
Win32开发(命令行参数处理)
int n_args = 0; LPWSTR *args = CommandLineToArgvW(GetCommandLineW(), &n_args); if( args ) { if( n_args >= 2 ) { std::wstring filePath = L""; auto last_prm = aux::chars_of(args[n_args - 1])原创 2014-04-10 15:07:55 · 1786 阅读 · 0 评论 -
Win32 服务进程和单实例实现
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"") HANDLE hMutex = CreateMutexA(NULL, true, "XXX_0D0DDD11-5E3F-4287-BB74-7E3D2C7720EF"); if (hMutex) { if (GetLastError()原创 2014-04-11 12:38:50 · 1283 阅读 · 0 评论 -
进程权限提升
// TestEnum.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include using namespace std; int EnableDebugPri(const char* name) { HANDLE hToken; // 打开权限 if(!OpenProcessToken( GetCurrentP原创 2014-08-31 20:12:49 · 645 阅读 · 0 评论