- {
- HANDLE h = CreateFile(L"\\\\.\\M:", GENERIC_READ
- , FILE_SHARE_READ | FILE_SHARE_WRITE, NULL
- , OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- DWORD error = GetLastError();
- BYTE Buffer1[1024] = {0};
- DWORD ReadByte;
- if (INVALID_HANDLE_VALUE != h)
- {
- ReadFile(h, Buffer1, 1024, &ReadByte, NULL);
- }
- CloseHandle(h);
- }
转载于:https://blog.51cto.com/co63oc/1048746