25{
35
41
42
57 {
59 goto Quit;
60 }
61
62
70 {
71 skip(
"FileFsDeviceInformation('%s') failed, Status 0x%08lx\n",
73 goto Quit;
74 }
75
76
78 {
79
81
83
84
85
87 break;
88
89
90 default:
91 skip(
"Device '%s': Cannot test, device type %lu\n",
93 goto Quit;
94 }
95#if 0
99 {
100 skip(
"Device '%s': Cannot test, device type %lu\n",
102 goto Quit;
103 }
104#endif
105
106
107
108
109
110
118 {
120 goto Quit;
121 }
124
125
126
130 goto Quit;
131
133 {
134
136
137 {
138
140 "Device '%s': Invalid partition number (%lu) reported, expected ULONG_MAX (-1)\n",
142
143
145 L"\\Device\\CdRom%lu",
147 break;
148 }
149
151
153 {
154
156 {
157
159 "Device '%s': Invalid partition number (%lu) reported, expected ULONG_MAX (-1)\n",
161
162
164 L"\\Device\\Floppy%lu",
166 }
167 else
168 {
169
171 "Device '%s': Invalid partition number (%lu) reported; unpartitionable device?\n",
174 goto Quit;
175
176
178 L"\\Device\\Harddisk%lu\\Partition%lu",
180 }
181 break;
182 }
183
184
185 default:
186 skip(
"Device '%s': Cannot test, device type %lu\n",
188 goto Quit;
189 }
190
191
206 {
208 goto Quit;
209 }
210
211
212
213
214
215
216
219 &DeviceName1Buffer,
220 sizeof(DeviceName1Buffer),
223
226 &DeviceName2Buffer,
227 sizeof(DeviceName2Buffer),
230
232 ok(
Success,
"Devices '%s' and '%s' are not the same!\n",
234
235Quit:
236
237 if (DeviceHandle2)
239 if (DeviceHandle1)
241
243}
NTSTATUS NtQueryObject(IN HANDLE Handle, IN OBJECT_INFO_CLASS ObjectInformationClass, OUT PVOID ObjectInformation, IN ULONG ObjectInformationLength, OUT PULONG ReturnLength)
static LPCSTR wine_dbgstr_us(const UNICODE_STRING *us)
#define ok_ntstatus(status, expected)
_In_ PCHAR _In_ ULONG DeviceNumber
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define FILE_SYNCHRONOUS_IO_NONALERT
@ FileFsDeviceInformation
#define OBJ_CASE_INSENSITIVE
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
#define FILE_READ_ATTRIBUTES
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FILE_FLOPPY_DISKETTE
#define IOCTL_STORAGE_GET_DEVICE_NUMBER
NTSTRSAFEVAPI RtlStringCchPrintfW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
#define FILE_DEVICE_CD_ROM
#define FILE_DEVICE_VIRTUAL_DISK
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize