上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 39 下一页
摘要: C:\Users\path>whoami /priv 在cmd中输入whoami /priv后将获得当前令牌(标准用户)的权限。 C:\Users\path>tasklist /v /fo csv | findstr /i "Command Prompt" 输入上面的command命令后获得cmd. 阅读全文
posted @ 2020-08-04 10:14 strive-sun 阅读(435) 评论(0) 推荐(0)
摘要: 第一步,在一台计算机上将某个驱动器或者某个文件夹设为sharing模式。这是我们需要访问的共享文件夹。(不需要设置everyone权限) 第二步,我们需要为两台在同一domain下的计算机上建立连接。 使用 Net use 指令,我们可以在代码中添加该指令,具体参数请见文档。 或者我们从cmd中快捷 阅读全文
posted @ 2020-07-31 15:57 strive-sun 阅读(372) 评论(0) 推荐(0)
摘要: EnumDisplayDevices枚举适配器 EnumDisplayMonitors枚举监视器 #pragma comment(lib, "dxva2.lib") #include <windows.h> #include <lowlevelmonitorconfigurationapi.h> # 阅读全文
posted @ 2020-07-30 15:21 strive-sun 阅读(3398) 评论(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 阅读(2358) 评论(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 阅读(173) 评论(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 阅读(1268) 评论(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 阅读(680) 评论(0) 推荐(0)
摘要: 调用SetMonitorBrightness 代码示例: #pragma comment(lib, "dxva2.lib") #include <windows.h> #include <lowlevelmonitorconfigurationapi.h> #include <physicalmon 阅读全文
posted @ 2020-06-30 17:00 strive-sun 阅读(1390) 评论(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 阅读(1548) 评论(0) 推荐(0)
摘要: 如果指针指向基类,但是指针在运行时指向派生类,则该基类必须具有虚拟析构函数,以便破坏派生类。如果没有虚拟析构函数,则只会运行基类的析构函数。 比如: Base* basePtr; basePtr = new Derived(1); 如果没有添加virtual,也就是没有虚拟析构函数,看下面代码示例: 阅读全文
posted @ 2020-06-24 17:53 strive-sun 阅读(815) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 39 下一页