上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 36 下一页
摘要: 如果要将exe的输出重定向到cmd,则可以使用匿名管道将子进程的标准输入和输出句柄重定向。请注意,命名管道也可以用于重定向进程I / O //CMD.exe #include <windows.h> #include <tchar.h> #include <stdio.h> #include <st 阅读全文
posted @ 2020-10-27 09:38 strive-sun 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 跟创建普通的win32窗口一样,线程中的窗口也需要注册和窗口处理过程 // Test_WM_CLOSE.cpp : Defines the entry point for the application. // #include "framework.h" #include "Test_WM_CLO 阅读全文
posted @ 2020-10-20 15:19 strive-sun 阅读(677) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <Windows.h> #include <ShlObj.h> #include <Shlwapi.h> #pragma comment(lib, "Shell32.lib") #pragma comment(lib, "Shlwapi.li 阅读全文
posted @ 2020-10-16 12:02 strive-sun 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Suspend: 挂起指定的线程 备注:不要永远挂起线程, 因为在Win32中,进程堆是线程安全的对象,并且由于在不访问堆的情况下很难在Win32中完成很多工作,因此在Win32中挂起线程极有可能使进程死锁。 那么,为什么首先还要有SuspendThread函数呢? 调试器在调试过程中使用它冻结进程 阅读全文
posted @ 2020-10-15 16:57 strive-sun 阅读(195) 评论(0) 推荐(0) 编辑
摘要: ListView_GetItemPosition : Gets the position of a list-view item 理论上获得桌面图标的正确方法是使用shell项,=> IFolderView::GetItemPosition 但是为了学习ListView_GetItemPositio 阅读全文
posted @ 2020-10-15 15:27 strive-sun 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 比如: Google Chrome: 类似于任务管理器中显示名字,见下图 那么我们就需要使用VerQueryValue, 从指定的版本信息资源中检索指定的版本信息。若要检索适当的资源,在调用VerQueryValue之前,必须首先调用GetFileVersionInfoSize函数,然后再调用Get 阅读全文
posted @ 2020-10-13 16:10 strive-sun 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 两种方法: 第一种是使用WMI进行后台轮询 第二种是查询注册表对应的DNS键值 Here: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces[\interface-name] 使用RegNotifyChangeKey 阅读全文
posted @ 2020-10-12 09:30 strive-sun 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 简单的demo: #include <iostream> #include <fstream> #include <windows.h> typedef struct { std::uint32_t biSize; std::int32_t biWidth; std::int32_t biHeigh 阅读全文
posted @ 2020-10-01 14:03 strive-sun 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 文档:将格式化的数据写入指定的缓冲区。根据格式字符串中相应的格式说明,将转换任何参数并将其复制到输出缓冲区。该函数在其写入的字符后附加一个终止空字符,但返回值的字符计数中不包含终止空字符。 例子: #include <Windows.h> #include <stdio.h> int main() 阅读全文
posted @ 2020-09-30 18:05 strive-sun 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 在Windows XP,Windows Server 2003和Windows操作系统的早期版本中,所有服务都与登录控制台的第一个用户在同一会话中运行。该会话称为会话0。在会话0中一起运行服务和用户应用程序会带来安全风险,因为服务以提升的特权运行,因此是寻求提高自身特权级别的手段的恶意代理的目标。 阅读全文
posted @ 2020-09-29 15:19 strive-sun 阅读(332) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 36 下一页