12 2019 档案
摘要:string bind = "Hello"; for (int i = 0; i < bind.length(); i++) { short ch = VkKeyScanA(bind[i]); if (((ch & 0xff00) >> 8) & 0x1) { std::cout<<" This i
阅读全文
摘要:#include <windows.h> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); HBITMAP g_bmp; HBITMAP g_bmpMask; HBITMAP create
阅读全文
摘要:使用Remove-Module -Name Functions2 只是移除当前会话的模块 并且Import-Module -Name Functions2与 Remove-Module -Name Functions2是相对应的,只有先import才能remove,不然会提示找不到模块 使用get-
阅读全文
摘要:根据测试 int main() { int a = 4; void *p = (void*)malloc(sizeof(100)); char *p1 = (char*)malloc(sizeof(100)); int n1 = sizeof(a); int n2 = sizeof(p); // i
阅读全文
摘要:#include <stdio.h> #include <stdint.h> #include <stdlib.h> void hexDump(void *ptr, char *buf) { static char hex[16] = { '0', '1', '2', '3', '4', '5',
阅读全文
摘要:如果是使用virtualenv,请确保已激活运行环境 不知道怎么激活的,请按以下步骤来: 尝试使用终端通过更改目录(cd)命令导航到包含虚拟环境的文件夹。到达后,尝试输入: source ./venv/Scripts/activate 另外,尝试打开venv文件夹,并确保您的激活文件位于“脚本”文件
阅读全文
摘要:直接上代码: import win32gui import win32ui from ctypes import windll import Image hwnd = win32gui.FindWindow(None, 'Calculator') # Change the line below de
阅读全文
摘要:前提:使用电子应用程序,QT,WPF ...等框架制作的应用程序将响应GetDC或打印黑屏GetWindowDC。解决此问题的唯一方法是确保目标应用程序可见,并在目标应用程序所在的特定坐标处为桌面截图 C++代码: #include <fstream> #include <vector> #incl
阅读全文
摘要:比如: 使用 HWND child = CreateWindowEx(0,L"childclass",NULL,WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,100, 100, 500, 500,hWnd,(HMENU)(1),hInst,NULL);创建子窗口时会
阅读全文
摘要:写下这是为了自己复习的。 主要实现的是给File Explorer注入鼠标钩子,以检测鼠标是否在File Explorer上点击 .cpp #include <Windows.h> #include <stdio.h> #include <psapi.h> #include <shlwapi.h>
阅读全文
摘要:Code: #include <windows.h> #include <tchar.h> #include <iostream> BOOL flag = TRUE; DWORD WINAPI ThreadProc2(LPVOID lpParameter) { INPUT input[2]; Zer
阅读全文
摘要:Client: #include <WinSock2.h> #include <Windows.h> #include <stdio.h> #pragma comment(lib, "Ws2_32.lib") #pragma warning(disable: 4996) #define Port 6
阅读全文
摘要:DLL: // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #include <Windows.h> #include <stdio.h> INT APIENTRY DllMai
阅读全文