随笔分类 -  Windows

ShellExView Shell Extensions Manager
摘要:http://www.nirsoft.net/utils/shexview.html 阅读全文

posted @ 2021-05-25 13:47 liujx2019 阅读(96) 评论(0) 推荐(0)

Mounted Folders 系列
摘要:https://docs.microsoft.com/en-us/windows/win32/fileio/volume-mount-points 阅读全文

posted @ 2021-05-24 11:13 liujx2019 阅读(38) 评论(0) 推荐(0)

Windows ShellExt Overlay Icon
摘要:How to overlay an icon over existing shell objects in 3 easy steps Elias Bachaalany Introduction Have you ever wondered how to draw/overlay small icon 阅读全文

posted @ 2021-05-21 17:53 liujx2019 阅读(222) 评论(0) 推荐(0)

Determining volume cluster size without using GetDiskFreeSpace
摘要:https://stackoverflow.com/questions/11373603/determining-volume-cluster-size-without-using-getdiskfreespace You can use DeviceIoControl with IOCTL_STO 阅读全文

posted @ 2021-05-20 17:40 liujx2019 阅读(59) 评论(0) 推荐(0)

Getting the cluster size of a hard drive
摘要:方法一 https://stackoverflow.com/questions/11373603/determining-volume-cluster-size-without-using-getdiskfreespace BOOL WINAPI GetDiskFreeSpace( __in LPC 阅读全文

posted @ 2021-05-20 17:34 liujx2019 阅读(42) 评论(0) 推荐(0)

Windows IOCTL 获取 Volume 信息 (FSCTL_GET_NTFS_VOLUME_DATA)
摘要:#define UNICODE 1 #define _UNICODE 1 /* The code of interest is in the subroutine GetDriveGeometry. The code in main shows how to interpret the result 阅读全文

posted @ 2021-05-20 16:38 liujx2019 阅读(364) 评论(0) 推荐(0)

判断程序是否有 Administrator 权限
摘要:CheckTokenMembership function (securitybaseapi.h) 12/05/2018 2 minutes to read The CheckTokenMembership function determines whether a specified securi 阅读全文

posted @ 2021-04-08 17:51 liujx2019 阅读(248) 评论(0) 推荐(0)

Windows 文件夹 只读
摘要:How are you determining your folders are Read-only? It's not a status indicator, it's a switch. What error messages are you receiving? Keith A. Miller 阅读全文

posted @ 2021-02-25 16:16 liujx2019 阅读(178) 评论(0) 推荐(0)

Windows API 可能会返回 MSDN 文档上没有提到的错误码
摘要:例如 _sopen_s 在磁盘空间不够的时候, 宏 errno 就会返回 ENOSPC(28) MSDN 文档时只提到以下错误码 errno valueCondition EACCES The given path is a directory, or the file is read-only, 阅读全文

posted @ 2021-02-25 15:50 liujx2019 阅读(106) 评论(0) 推荐(0)

FindNextFileA 判断文件夹是否为空,要考虑 . 和 ..
摘要:使用文件夹地址加上通配符 * 可以搜索文件夹下的文件和文件夹 会搜出两个不是文件的文件 <DIR> . <DIR> .. 所以要至少有三个子文件(夹)才能说这个文件夹不是空的。 阅读全文

posted @ 2021-02-25 09:44 liujx2019 阅读(149) 评论(0) 推荐(0)

QDir::count 可能消耗过多内存,咋一看像内存泄漏
摘要:用 QDir::count 获取文件夹的文件数很方便。 但在文件夹里有数百万个文件的时候,执行一次 QDir::count 就可能花费上 GB 的内存。 uint QDir::count() const { const QDirPrivate* d = d_ptr.constData(); d->i 阅读全文

posted @ 2021-02-25 09:25 liujx2019 阅读(270) 评论(0) 推荐(0)

使用 Critical Section 加锁的一个例子
摘要:此处是用 Critical Section lock 来保护 data.handling EnterCriticalSection(&lock); if (data.handling) { tick64_t start = get_tick64(); do { SleepConditionVaria 阅读全文

posted @ 2021-02-02 16:32 liujx2019 阅读(197) 评论(0) 推荐(0)

Critical Section
摘要:First up is the critical section object. This lock is used heavily by countless applications but has a sordid history. When I first started using crit 阅读全文

posted @ 2021-02-02 16:20 liujx2019 阅读(198) 评论(0) 推荐(0)

Memory Leak Detection Using Windbg
摘要:https://www.codeproject.com/articles/31382/memory-leak-detection-using-windbg#:~:text=Detecting%20memory%20leaks%20using%20Windbg.%20Memory%20leak%20i 阅读全文

posted @ 2021-01-28 14:14 liujx2019 阅读(70) 评论(0) 推荐(0)

Windows CMD 配置 启动 服务
摘要:sc.exe https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sc-config 阅读全文

posted @ 2021-01-28 14:12 liujx2019 阅读(367) 评论(0) 推荐(0)

Starting a Service
摘要:https://docs.microsoft.com/en-us/windows/win32/services/starting-a-service 05/31/2018 To start a service, a service control program opens a handle to 阅读全文

posted @ 2021-01-28 14:11 liujx2019 阅读(90) 评论(0) 推荐(0)

winsock Options
摘要:https://docs.microsoft.com/en-us/windows/win32/winsock/sol-socket-socket-options 阅读全文

posted @ 2021-01-27 15:38 liujx2019 阅读(50) 评论(0) 推荐(0)

winsock 主动切断连接 Connection Setup and Teardown
摘要:https://docs.microsoft.com/en-us/windows/win32/winsock/connection-setup-and-teardown-2 05/31/2018 The WSAAccept function lets an application obtain ca 阅读全文

posted @ 2021-01-27 14:38 liujx2019 阅读(108) 评论(0) 推荐(0)

CreateProcessA 如果遇到 Program Files 不要打引号
摘要:打了引号反而会报错误码 2. 阅读全文

posted @ 2021-01-21 16:40 liujx2019 阅读(60) 评论(0) 推荐(0)

GetModuleHandleA 只能取当前程序载入的 module 的handle
摘要:并不能获取别的程序的 handle。 阅读全文

posted @ 2021-01-21 16:12 liujx2019 阅读(402) 评论(0) 推荐(0)

导航