上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页
摘要: 第一步,在一台计算机上将某个驱动器或者某个文件夹设为sharing模式。这是我们需要访问的共享文件夹。(不需要设置everyone权限) 第二步,我们需要为两台在同一domain下的计算机上建立连接。 使用 Net use 指令,我们可以在代码中添加该指令,具体参数请见文档。 或者我们从cmd中快捷 阅读全文
posted @ 2020-07-31 15:57 strive-sun 阅读(352) 评论(0) 推荐(0) 编辑
摘要: EnumDisplayDevices枚举适配器 EnumDisplayMonitors枚举监视器 #pragma comment(lib, "dxva2.lib") #include <windows.h> #include <lowlevelmonitorconfigurationapi.h> # 阅读全文
posted @ 2020-07-30 15:21 strive-sun 阅读(3053) 评论(0) 推荐(0) 编辑
摘要: 最近被这两个api搞得有点晕,故查阅了相关的资料。 这篇文章解释的很好:https://devblogs.microsoft.com/oldnewthing/20081006-00/?p=20643 测试代码: case WM_LBUTTONDOWN: { HWND h1 = GetFocus(); 阅读全文
posted @ 2020-07-24 10:41 strive-sun 阅读(2087) 评论(0) 推荐(0) 编辑
摘要: 创建5个线程,并无限期地打印某些内容 #include <Windows.h> #include <stdio.h> DWORD IDs[5]; DWORD WINAPI ThreadProc(LPVOID TID) { //expected this block to run infinitely 阅读全文
posted @ 2020-07-22 17:19 strive-sun 阅读(164) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <Windows.h> #include <winternl.h> #include <tchar.h> #pragma comment(lib, "ntdll") int main() { // create destination pro 阅读全文
posted @ 2020-07-02 18:09 strive-sun 阅读(1170) 评论(0) 推荐(0) 编辑
摘要: #include <Windows.h> #include <iostream> #include <string> #pragma warning(disable:4996) int main() { const char *day[] = {"Sunday","Monday","Tuesday" 阅读全文
posted @ 2020-07-02 15:36 strive-sun 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 调用SetMonitorBrightness 代码示例: #pragma comment(lib, "dxva2.lib") #include <windows.h> #include <lowlevelmonitorconfigurationapi.h> #include <physicalmon 阅读全文
posted @ 2020-06-30 17:00 strive-sun 阅读(1204) 评论(0) 推荐(1) 编辑
摘要: 只需要调用WM_CTLCOLORLISTBOX和WM_CTLCOLOREDIT来分别处理编辑框和下拉列表。 Combox的创建: int xpos = 100; // Horizontal position of the window. int ypos = 100; // Vertical pos 阅读全文
posted @ 2020-06-29 10:50 strive-sun 阅读(1392) 评论(0) 推荐(0) 编辑
摘要: 如果指针指向基类,但是指针在运行时指向派生类,则该基类必须具有虚拟析构函数,以便破坏派生类。如果没有虚拟析构函数,则只会运行基类的析构函数。 比如: Base* basePtr; basePtr = new Derived(1); 如果没有添加virtual,也就是没有虚拟析构函数,看下面代码示例: 阅读全文
posted @ 2020-06-24 17:53 strive-sun 阅读(792) 评论(0) 推荐(0) 编辑
摘要: 一个完整的用户模式dump是基本的用户模式转储文件。 此转储文件包括进程的整个内存空间,程序的可执行映像本身,句柄表以及其他信息,这些信息对于调试器在重建转储发生时正在使用的内存中很有用。 可以将完整的用户模式转储文件“缩小”到小型转储中。只需将转储文件加载到调试器中,然后使用.dump(创建转储文 阅读全文
posted @ 2020-06-23 16:46 strive-sun 阅读(399) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 37 下一页