随笔分类 -  Windows编程

摘要:code BOOL EnumWindowsProc(HWND hwnd, LPARAM lParam) { wchar_t classname[256] = {0}; GetClassNameW(hwnd, classname, sizeof classname); if (lstrcmpW(cla 阅读全文
posted @ 2022-02-08 18:08 develon 阅读(234) 评论(0) 推荐(0) 编辑
摘要:导出DllMain 也可以看看: https://github.com/HackerajOfficial/injectAllTheThings/blob/master/rdll/dllmain.cpp #include <Windows.h> #include <stdio.h> #define p 阅读全文
posted @ 2022-01-26 16:02 develon 阅读(61) 评论(0) 推荐(0) 编辑
摘要:ENABLE_VIRTUAL_TERMINAL_PROCESSING 当用WriteFile或WriteConsole写入时,字符被解析为VT100和类似的控制字符序列,这些字符控制光标移动、颜色/字体模式和其他操作,也可以通过现有的Console APIs执行。欲了解更多信息,请参见控制台虚拟终端 阅读全文
posted @ 2021-12-10 12:18 develon 阅读(316) 评论(0) 推荐(0) 编辑
摘要:结论 //SetWindowLong(mainWnd, GWL_EXSTYLE, GetWindowLong(mainWnd, GWL_EXSTYLE) | WS_EX_LAYERED); // 指定在组合分层窗口时要使用的透明度颜色键。窗口以这种颜色绘制的所有像素都将是透明的。 SetLayere 阅读全文
posted @ 2021-11-29 17:56 develon 阅读(361) 评论(0) 推荐(0) 编辑
摘要:SetWindowPos(hwnd01, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); 注意: SWP_NOMOVE | SWP_NOSIZE用于忽略SetWindowPos函数的第3,第4,第5,第6参数。 第二个参数可以是: HWND_B 阅读全文
posted @ 2021-02-24 18:15 develon 阅读(174) 评论(0) 推荐(0) 编辑
摘要:Why perror是Unix标准错误处理函数,提供错误代码到可读的错误描述的转换,在Windows中,需要使用FormatMessage将GetLastError返回的错误代码格式化。 long Perror(_TCHAR *op) { _TCHAR *bufMsg = NULL; long co 阅读全文
posted @ 2021-02-23 18:12 develon 阅读(110) 评论(0) 推荐(0) 编辑
摘要:AllocConsole() 为 Windows 程序创建一个控制台窗口, 失败返回零, 可调用 GetLastError(). 分配控制台后可能需要重定向标准输出和标准输入(Windows 平台标准错误和标准输出相同), 这时就需要两个特殊的文件名了: CONOUT$ --Console outp 阅读全文
posted @ 2018-06-01 22:37 develon 阅读(2123) 评论(0) 推荐(1) 编辑
摘要:什么是 GBK ?中文名汉字编码字符集外文名Chinese Internal Code Specification全 称《汉字内码扩展规范》GBK编码,是对GB2312编码的扩展,因此完全兼容GB2312-80标准。GBK编码依然采用双字节编码方案,其编码范围:8140-FEFE,剔除xx7F码位,共23940个码位。共收录汉字和图形符号21886个,其中汉字(包括部首和构件)21003个,... 阅读全文
posted @ 2018-05-23 13:59 develon 阅读(2533) 评论(0) 推荐(0) 编辑
摘要:FormatMessage 获取GetLastError 函数返回的错误代码对应的字符串描述. 阅读全文
posted @ 2018-05-17 20:50 develon 阅读(136) 评论(0) 推荐(0) 编辑
摘要:// WinMsg.cpp : 定义应用程序的入口点。 // #include "stdafx.h" #include #include "WinMsg.h" int log_i = 0; #define Log(x) printf("Log %d: "#x"\n", log_i++) #define MAX_LOADSTRING 100 // 全局变量: HINSTANCE hInst... 阅读全文
posted @ 2018-05-17 12:45 develon 阅读(157) 评论(0) 推荐(0) 编辑
摘要:有时候使用 GCC for Windows 生成 DLL 动态链接库时, 由于各种原因, 即使加载了动态链接库, JVM 仍然找不到符号, 从而产生 java.lang.UnsatisfiedLinkError 错误 所以还是使用微软自家的 VS 来生成 DLL 比较妥当, 由于 VS 命令行错综复 阅读全文
posted @ 2018-04-10 14:00 develon 阅读(268) 评论(0) 推荐(0) 编辑
摘要:cppblog.com 天空的博客 http://www.cppblog.com/API/archive/2011/03/10/141506.html cnblogs.com 吴秦的博客 http://www.cnblogs.com/skynet/p/3372855.html 阅读全文
posted @ 2017-11-15 12:31 develon 阅读(122) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示