<code class="lang-cpp">#include <stdio.h> #include <string.h> #include <windows.h> int wmain(int argc, wchar_t *argv[]) { wchar_t drive[] = L"Z:"; wchar_t srcpath[65536] = L""; // 两个32768 if (argc < 2) return 0; for (drive[0] = L'Z'; drive[0] >= L'A'; drive[0]--) { memset(srcpath, 0, 65536 * sizeof (wchar_t)); QueryDosDeviceW(drive, srcpath, 65536); if (lstrcmpW(argv[1], L"clean") == 0) { DefineDosDeviceW(DDD_REMOVE_DEFINITION, drive, NULL); } else { if (lstrlenW(srcpath) == 0) { DefineDosDeviceW(0, drive, argv[1]); break; } } } }</windows.h></string.h></stdio.h></code>
[修改于 8年7个月前 - 2016/05/19 23:40:12]
时段 | 个数 |
---|---|
{{f.startingTime}}点 - {{f.endTime}}点 | {{f.fileCount}} |