随笔分类 -  WIN32

摘要://创建全局变量结构体 CRITICAL_SECTION cs; //初始化变量结构体 InitializeCriticalSection(&cs); //循环之前判断是否拿到令牌 EnterCriticalSection(&cs); //代码区 //释放令牌 LeaveCriticalSectio 阅读全文
posted @ 2020-06-16 16:52 温暖了寂寞 阅读(287) 评论(0) 推荐(0)
摘要:#include "stdafx.h" #include <iostream> #include <windows.h> using namespace std; DWORD WINAPI ThreadProc(LPVOID lpParamter) { for (int i = 0;i<10;i++ 阅读全文
posted @ 2020-06-16 14:04 温暖了寂寞 阅读(2086) 评论(0) 推荐(0)
摘要:// remote06.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "windows.h" BOOL func(DWORD ProcessID,char* Dll 阅读全文
posted @ 2020-06-15 19:08 温暖了寂寞 阅读(183) 评论(0) 推荐(0)
摘要:EnumProcessModules Function 获得指定进程中所有模块的句柄。 语法 BOOL WINAPI EnumProcessModules(in HANDLE hProcess,out HMODULE *lphModule,in DWORD cb,out LPDWORD lpcbNe 阅读全文
posted @ 2020-06-15 17:13 温暖了寂寞 阅读(2661) 评论(0) 推荐(0)
摘要:The GetModuleBaseName function retrieves the base name of the specified module.DWORD GetModuleBaseName(HANDLE hProcess, // handle to processHMODULE hM 阅读全文
posted @ 2020-06-15 17:12 温暖了寂寞 阅读(960) 评论(0) 推荐(0)
摘要:原文 https://blog.csdn.net/baidu_38494049/article/details/82930099 如果有小伙伴看不懂太多英语,还想知道GetCursorPos函数的用法,那么往下看吧。msdn网址:https://docs.microsoft.com/zh-cn/wi 阅读全文
posted @ 2020-06-15 14:17 温暖了寂寞 阅读(2366) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <iostream> #include <windows.h> using namespace std; //定义线程调用函数 DWORD WINAPI ThreadProc(LPVOID lpParamter) { int iRunTime 阅读全文
posted @ 2020-06-14 12:13 温暖了寂寞 阅读(521) 评论(0) 推荐(0)
摘要:一 extern "C" __declspec(dllexport)调用约定 返回类型 函数名(参数) 二 使用.def文件 EXPORTS函数名 @ 编号函数名 @ 编号 NONAME 阅读全文
posted @ 2020-06-13 17:30 温暖了寂寞 阅读(252) 评论(0) 推荐(0)
摘要://内存申请物理页HANDLE CreateFileMapping( HANDLE hFile, //与文件句柄关联 LPSECURITY_ATTRIBUTES lpFileMappingAttributes, //NULL DWORD flProtect, //访问保护类型 DWORD dwMax 阅读全文
posted @ 2020-06-13 11:50 温暖了寂寞 阅读(457) 评论(0) 推荐(0)
摘要:#include <stdio.h>#include <windows.h>int main(){ //内存申请物理页 HANDLE hMapFile = CreateFileMapping(HANDLE(-1), NULL, PAGE_READWRITE, 0, 0x1000, "共享映射"); 阅读全文
posted @ 2020-06-13 10:36 温暖了寂寞 阅读(509) 评论(0) 推荐(0)
摘要://获取卷 GetLogicalDrives(); //获取一个卷的盘符的字符串 GetLogicalDriveStrings(); //获取卷的类型 GetDriveType(); //获取卷的类型 GetVolumeInformation(); //创建目录 CreateDirectory(); 阅读全文
posted @ 2020-06-13 09:12 温暖了寂寞 阅读(174) 评论(0) 推荐(0)
摘要:功能:从调用线程的消息队列里取得消息并放于指定的结构。 函数原型: BOOL GetMessage(_Out_ LPMSG lpMsg,_In_opt_ HWND hWnd,_In_ UINT wMsgFilterMin,_In_ UINT wMsgFilterMax); lpMsg:指向MSG结构 阅读全文
posted @ 2020-06-10 11:45 温暖了寂寞 阅读(525) 评论(0) 推荐(0)
摘要:原文 https://www.cnblogs.com/jjmcu/p/3881441.html CreateWindow函数详解 在注册完窗口类后就需要进行窗口的创建,用到的函数理所当然就是CreateWindow(), 而这个函数是基于窗口类的,所以还需要指定几个参数来制定特定的窗口。而且像一些不 阅读全文
posted @ 2020-06-10 11:43 温暖了寂寞 阅读(1975) 评论(0) 推荐(0)
摘要:原文 http://blog.csdn.net/xxxluozhen/article/details/4123549 TranslateMessage函数 函数功能描述:将虚拟键消息转换为字符消息。字符消息被送到调用线程的消息队列中,在下一次线程调用函数GetMessage或PeekMessage时 阅读全文
posted @ 2020-06-10 11:41 温暖了寂寞 阅读(553) 评论(0) 推荐(0)
摘要:一 线程创建函数 CreateThread 修改说明:这里 说了另一种创建线程方法,使用_beginthreadex()更安全的创建线程,在实际使用中尽量使用_beginthreadex()来创建线程,在博客中使用 CreateThread()l来创建线程其实是一种不太好的方法,不过这里只做原理分析 阅读全文
posted @ 2020-06-09 10:21 温暖了寂寞 阅读(969) 评论(0) 推荐(0)