c++
liujxken
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
获取磁盘的 总容量,空余容量,已用容量 【windows】
使用windows api输入:盘符字符串输出:磁盘容量float get_disk_spaces(const char drive_letter, float & total_space, float & used_space){ BOOL fResult; unsigned _int64 i64FreeBytesToCaller; uns...原创 2019-01-15 10:04:06 · 4082 阅读 · 0 评论 -
通过进程名称,获取其路径
使用windows api#include <psapi.h>#include <tlhelp32.h>void get_process_file_path(DWORD process_id, char* path, int path_size){ HANDLE process = OpenProcess(PROCESS_QUERY_INFORMATI...原创 2019-01-15 10:09:17 · 1300 阅读 · 0 评论 -
C++ Windows - How to get process path from its PID
出处 https://stackoverflow.com/questions/1933113/c-windows-how-to-get-process-path-from-its-pid注意质疑(我也没试过): 1 most of modules turn to a failure in getting file path :( – jondinham Aug 29 '11 at 4...转载 2019-01-15 10:11:48 · 776 阅读 · 0 评论 -
设置共享内存大小 【windows】
是分 高位 低位 两个数字设定hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, // use paging file NULL, // default security PAGE_READWRI...转载 2019-01-15 10:15:08 · 3604 阅读 · 0 评论 -
c++ 更新 performance counter 数据,错误码 87
ERROR_INVALID_PARAMETER87 (0x57)The parameter is incorrect.很可能是该送 ULONG 的送了 ULONGLONG,vise versa原创 2019-01-15 10:17:02 · 354 阅读 · 0 评论 -
How to use QueryPerformanceCounter? (c++,不使用 .Net)
出处:https://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter参考:https://docs.microsoft.com/zh-cn/windows/desktop/WmiSdk/accessing-performance-data-in-c--#example#include <w...转载 2019-01-15 10:20:21 · 211 阅读 · 0 评论 -
fseek 在以字符串模式打开的文件中工作不正常
For streams opened in text mode, fseek and _fseeki64 have limited use, because carriage return-linefeed translations can cause fseek and _fseeki64 to produce unexpected results. The only fseek and _fs...转载 2019-01-17 09:53:44 · 345 阅读 · 0 评论
分享