上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 39 下一页
摘要: Suspend: 挂起指定的线程 备注:不要永远挂起线程, 因为在Win32中,进程堆是线程安全的对象,并且由于在不访问堆的情况下很难在Win32中完成很多工作,因此在Win32中挂起线程极有可能使进程死锁。 那么,为什么首先还要有SuspendThread函数呢? 调试器在调试过程中使用它冻结进程 阅读全文
posted @ 2020-10-15 16:57 strive-sun 阅读(223) 评论(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 阅读(609) 评论(0) 推荐(0)
摘要: 比如: Google Chrome: 类似于任务管理器中显示名字,见下图 那么我们就需要使用VerQueryValue, 从指定的版本信息资源中检索指定的版本信息。若要检索适当的资源,在调用VerQueryValue之前,必须首先调用GetFileVersionInfoSize函数,然后再调用Get 阅读全文
posted @ 2020-10-13 16:10 strive-sun 阅读(580) 评论(0) 推荐(0)
摘要: 两种方法: 第一种是使用WMI进行后台轮询 第二种是查询注册表对应的DNS键值 Here: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces[\interface-name] 使用RegNotifyChangeKey 阅读全文
posted @ 2020-10-12 09:30 strive-sun 阅读(403) 评论(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 阅读(460) 评论(0) 推荐(0)
摘要: 文档:将格式化的数据写入指定的缓冲区。根据格式字符串中相应的格式说明,将转换任何参数并将其复制到输出缓冲区。该函数在其写入的字符后附加一个终止空字符,但返回值的字符计数中不包含终止空字符。 例子: #include <Windows.h> #include <stdio.h> int main() 阅读全文
posted @ 2020-09-30 18:05 strive-sun 阅读(1242) 评论(0) 推荐(0)
摘要: 在Windows XP,Windows Server 2003和Windows操作系统的早期版本中,所有服务都与登录控制台的第一个用户在同一会话中运行。该会话称为会话0。在会话0中一起运行服务和用户应用程序会带来安全风险,因为服务以提升的特权运行,因此是寻求提高自身特权级别的手段的恶意代理的目标。 阅读全文
posted @ 2020-09-29 15:19 strive-sun 阅读(369) 评论(0) 推荐(0)
摘要: #include <Windows.h> #include <psapi.h> int main() { DWORD process_ID = 0; WCHAR process_name[MAX_PATH] = {}; HWND notepad = FindWindow(NULL, L"print. 阅读全文
posted @ 2020-09-24 10:39 strive-sun 阅读(2573) 评论(0) 推荐(0)
摘要: PeekNamedPipe: 将数据从命名管道或匿名管道复制到缓冲区中,而不将其从管道中删除。它还返回有关管道中数据的信息。 示例: #include <iostream> #include <windows.h> #include <vector> using namespace std; int 阅读全文
posted @ 2020-09-23 18:06 strive-sun 阅读(3266) 评论(0) 推荐(0)
摘要: Dll: // dllmain.cpp : Defines the entry point for the DLL application. #include "pch.h" #include <sstream> std::wstringstream wss; std::wstring str; c 阅读全文
posted @ 2020-09-10 18:30 strive-sun 阅读(391) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 39 下一页