17#define ok_type(condition, format, ...) ok(condition, "(%d): " format, DriveType, ##__VA_ARGS__)
18#define skip_type(format, ...) skip("(%d): " format, DriveType, ##__VA_ARGS__)
31 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
49 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
85 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
98 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
104 if (AllocatedMDN ==
NULL)
106 skip_type(
"Memory allocation failure\n");
128 IsValid = (AllocatedMDN->
Name[12] ==
Letter && AllocatedMDN->
Name[13] ==
L':');
135 skip_type(
"Failed to query device name\n");
151 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
164 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
170 if (AllocatedMUI ==
NULL)
172 skip_type(
"Memory allocation failure\n");
195 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
208 ok_type(Ret == 0,
"DeviceIoControl succeed\n");
225 DWORD DriveMap, Current;
226 BOOL DiskDone, CdRomDone;
231 for (Current = 0; Current < 26; ++Current)
233 if (DriveMap & (1 << Current))
236 ok(Ret ==
S_OK,
"StringCchPrintfW failed: %d\n", Ret);
243 ok(Ret ==
S_OK,
"StringCchPrintfW failed: %d\n", Ret);
265 if (CdRomDone && DiskDone)
274 skip(
"No disk drive found\n");
279 skip(
"No CDROM drive found\n");
#define ok_type(condition, format,...)
static VOID QueryUniqueId(VOID)
static BOOL GetDiskGeometry(VOID)
static VOID QuerySuggestedLinkName(VOID)
#define skip_type(format,...)
static VOID QueryDeviceName(VOID)
PRTL_UNICODE_STRING_BUFFER Path
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define ERROR_FILE_NOT_FOUND
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
#define IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME
#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
#define FILE_SHARE_DELETE
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetLogicalDrives(void)