上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页
摘要: .py import win32api, win32con, win32gui import win32gui_struct import ctypes from ctypes import * GUID_DEVINTERFACE_USB_DEVICE = "{A5DCBF10-6530-11D2- 阅读全文
posted @ 2020-03-18 11:16 strive-sun 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: 在添加第三方库的时候需要注意放置的路径,注意区分x86和x64的文件夹路径以及VS的版本,不要放错了 lib的位置:(需要先将lib放到该路径下,不然会说找不到.lib)C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um dll的位置 阅读全文
posted @ 2020-03-18 10:46 strive-sun 阅读(1265) 评论(0) 推荐(0) 编辑
摘要: 此函数是获取控件或者窗口中的文本 代码: TCHAR str1[255]; TCHAR str2[] = L"Hello World"; GetWindowText(hWnd_button, str1, 255); if (_tcscmp(str1, str2) == 0) { //it is ch 阅读全文
posted @ 2020-03-13 17:50 strive-sun 阅读(933) 评论(0) 推荐(0) 编辑
摘要: 记录下,用于复现 #include <windows.h> #include <iostream> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { 阅读全文
posted @ 2020-03-13 10:15 strive-sun 阅读(596) 评论(0) 推荐(0) 编辑
摘要: DWORD WINAPI ThreadFunction( LPVOID lpParam ) { (void)lpParam; //make happy compiler for unused variable while (TRUE) //Once created the thread runs a 阅读全文
posted @ 2020-03-12 11:35 strive-sun 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 主要是依靠NtQueryObject函数,其中需要传入ObjectBasicInformation参数 PUBLIC_OBJECT_BASIC_INFORMATION结构包含可用于对象的全部信息的子集。 typedef struct _PUBLIC_OBJECT_BASIC_INFORMATION 阅读全文
posted @ 2020-03-04 11:06 strive-sun 阅读(1017) 评论(0) 推荐(0) 编辑
摘要: 注意: AssignProcessToJobObject仅适用于win32 desktop app, 比如notepad是适用的,calculator是不适用的 下面的demo是将notepad的句柄分配给作业,然后由TerminateJobObject统一kill #define _CRT_SEC 阅读全文
posted @ 2020-03-04 10:48 strive-sun 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 一般情况下 char* string = "abc"; 编译后会出现标题中的错误。 我们只需要在字符串前加上const_cast<char*>即可,这个作用是丢弃变量的const声明,但不能改变变量所指向的对象的const属性。即:const_cast用于原本非const的对象;如果用于原本cons 阅读全文
posted @ 2020-02-28 16:34 strive-sun 阅读(3654) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <Windows.h> #include <d2d1.h> #include <wincodec.h> #pragma comment(lib, "d2d1.lib 阅读全文
posted @ 2020-02-18 23:13 strive-sun 阅读(581) 评论(0) 推荐(0) 编辑
摘要: case WM_CONTEXTMENU: { m_hMenu = CreatePopupMenu(); g_BitMap = (HBITMAP)LoadImage(NULL, L"1.bmp", IMAGE_BITMAP, 16, 16, LR_LOADFROMFILE | LR_CREATEDIB 阅读全文
posted @ 2020-02-14 16:52 strive-sun 阅读(292) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页