11 2019 档案

摘要:下载对应版本的 chromedriver,不知道版本的请参考: https://stackoverflow.com/a/55266105/11128312 接下来将下载的 chromedriver.exe 放到 python 文件下 如图: 后面就可以在 cmd.exe 里面尽情发挥了 最小的例子: 阅读全文
posted @ 2019-11-22 15:20 strive-sun 阅读(5445) 评论(0) 推荐(2)
摘要:今天稍微熟悉了一点汇编语法,并就一个案例试验了一下 VS里常见的汇编指令请见:https://blog.csdn.net/sinat_27382047/article/details/72810788 我就目前一个api做解释 CaptureStackBackTrace: 通过在堆栈上走动并记录每一 阅读全文
posted @ 2019-11-20 15:13 strive-sun 阅读(583) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <string> #include "Shobjidl.h" int main() { std::wstring x = L"C:\\Users\\strives\\Desktop\\ScreenShot\\panda.png"; HRES 阅读全文
posted @ 2019-11-20 09:56 strive-sun 阅读(739) 评论(0) 推荐(0)
摘要:有.rc文件,其中包含用于exe文件详细信息的版本,说明等。 如何获得在代码内使用的值?例如,要获取ProductName。 IDI_ICON1 ICON DISCARDABLE "abc-logo.ico" #if defined(UNDER_CE) #include <winbase.h> #e 阅读全文
posted @ 2019-11-13 16:05 strive-sun 阅读(527) 评论(0) 推荐(0)
摘要:今天在论坛看见关于指针使用的讨论,原帖:https://bbs.csdn.net/topics/394991693 我整理一下他们所说的几种方法,可能涉及到内存泄漏 case 1: #include <stdlib.h> #include <stdio.h> int *min(int x, int 阅读全文
posted @ 2019-11-12 09:33 strive-sun 阅读(181) 评论(0) 推荐(0)
摘要:#include <iostream> #include <stdio.h> #include <WINDOWS.H> #include <shellapi.h> #include <gdiplus.h> #include <Shlwapi.h> #pragma comment (lib,"Shlw 阅读全文
posted @ 2019-11-11 16:22 strive-sun 阅读(843) 评论(0) 推荐(0)
摘要:#include <windows.h> #include <gdiplus.h> HBITMAP LoadBitmapFromResource(DWORD ResourceID, bool transparent = true) { HANDLE hGlobal = NULL; ULONG_PTR 阅读全文
posted @ 2019-11-08 14:24 strive-sun 阅读(2407) 评论(0) 推荐(0)
摘要:HDC hdc, hdcTemp; RECT rect; BYTE* bitPointer; int x, y; int red, green, blue, alpha; while(true) { hdc = GetDC(HWND_DESKTOP); GetWindowRect(hWND_Desk 阅读全文
posted @ 2019-11-08 09:49 strive-sun 阅读(1006) 评论(0) 推荐(0)
摘要:include <Windows.h> #include <iostream> int main() { HANDLE handle = CreateFile(L"OneNote", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE 阅读全文
posted @ 2019-11-07 18:11 strive-sun 阅读(1863) 评论(0) 推荐(0)
摘要:另外使用createfile函数将捕捉后的图片储存为文件 #include <Windows.h> #include <stdio.h> #include <assert.h> void scrshot() { Sleep(1000); BITMAP bmpScreen; HWND hwnd = G 阅读全文
posted @ 2019-11-06 16:56 strive-sun 阅读(306) 评论(0) 推荐(0)
摘要:问题代码: #include <iostream> int *foo() { int a = 5; return &a; } int main() { int *p = foo(); std::cout << *p; *p = 8; std::cout << *p; } 最后会打印:58 理论上,a 阅读全文
posted @ 2019-11-06 15:58 strive-sun 阅读(176) 评论(0) 推荐(0)
摘要:用到ShellExecuteEx 为了防止属性对话框无法成功打开(程序运行太快,以至于没有时间打开属性对话框,程序就结束了) 调用SHSetInstanceExplorer并使其保持活动状态,直到该COM对象被释放: #include <windows.h> #include <shlobj_cor 阅读全文
posted @ 2019-11-05 15:58 strive-sun 阅读(1039) 评论(2) 推荐(1)
摘要:需要知道GetDC与BeginPaint的区别,这里有一篇不错的文章。 简洁的就是说:BeginPaint() 和EndPaint() 可以删除消息队列中的WM_PAINT消息,并使无效区域有效。 GetDC()和ReleaseDC()并不删除也不能使无效区域有效,因此当程序跳出 WM_PAINT 阅读全文
posted @ 2019-11-01 18:17 strive-sun 阅读(348) 评论(0) 推荐(0)
摘要:DPI_AWARENESS_CONTEXT_SYSTEM_AWARE 系统DPI感知。此窗口不适应DPI更改。它将一次查询DPI,并在该过程的整个生命周期中使用该值。如果DPI更改,则该过程将不会调整为新的DPI值。当DPI从系统值更改时,系统会自动按比例将其放大或缩小。 必须先调用SetProce 阅读全文
posted @ 2019-11-01 14:05 strive-sun 阅读(1190) 评论(0) 推荐(0)
摘要:先下载WPA TOOLS:从该地址下载,选最新的版本,然后可以只选择下载WPA工具 后面编写XML文件等等,可以参考这篇文章。 需要注意: 用管理员启动cmd后,如果想运行特定路径的文件,需要带上绝对路径。 输出文件也是: 使用WPA工具也需要注意:要查看其中的数据(Analysis子窗口), 先扩 阅读全文
posted @ 2019-11-01 14:03 strive-sun 阅读(2328) 评论(0) 推荐(0)