@@ -181,9 +181,10 @@ TestDriverObject(
181181 ok_eq_pointer (DriverObject -> DriverExtension -> DriverObject , DriverObject );
182182 ok_eq_pointer (DriverObject -> DriverExtension -> AddDevice , NULL );
183183 ok_eq_ulong (DriverObject -> DriverExtension -> Count , 0UL );
184+ /* Windows 7 doesn't capitalize "Services" like all other versions before and after it. */
184185 Equal = RtlEqualUnicodeString (RegistryPath ,
185186 & RegPath ,
186- FALSE);
187+ ( GetNTVersion () == _WIN32_WINNT_WIN7 ) ? TRUE : FALSE);
187188 ok (Equal , "RegistryPath is '%wZ'\n" , RegistryPath );
188189 ok ((ULONG_PTR )RegistryPath % PAGE_SIZE == 0 , "RegistryPath %p not page-aligned\n" , RegistryPath );
189190 ok_eq_pointer (RegistryPath -> Buffer , (PWCHAR )(RegistryPath + 1 ));
@@ -193,7 +194,8 @@ TestDriverObject(
193194 FALSE);
194195 ok (Equal , "ServiceKeyName is '%wZ'\n" , & DriverObject -> DriverExtension -> ServiceKeyName );
195196 ok_eq_tag (KmtGetPoolTag (DriverObject -> DriverExtension -> ServiceKeyName .Buffer ), ' oI' );
196- ok_eq_uint ((KmtGetPoolType (DriverObject -> DriverExtension -> ServiceKeyName .Buffer ) - 1 ) & BASE_POOL_TYPE_MASK , NonPagedPool );
197+ if (GetNTVersion () <= _WIN32_WINNT_WS03 ) // Not guaranteed on Vista+
198+ ok_eq_uint ((KmtGetPoolType (DriverObject -> DriverExtension -> ServiceKeyName .Buffer ) - 1 ) & BASE_POOL_TYPE_MASK , NonPagedPool );
197199 ok_eq_uint (DriverObject -> DriverExtension -> ServiceKeyName .MaximumLength , DriverObject -> DriverExtension -> ServiceKeyName .Length + sizeof (UNICODE_NULL ));
198200 ok_eq_uint (DriverObject -> DriverExtension -> ServiceKeyName .Buffer [DriverObject -> DriverExtension -> ServiceKeyName .Length / sizeof (WCHAR )], UNICODE_NULL );
199201 Equal = RtlEqualUnicodeString (& DriverObject -> DriverName ,
@@ -348,7 +350,11 @@ TestDeviceCreated(
348350
349351 /* Check the device object members */
350352 ok (DeviceObject -> Type == 3 , "Expected Type = 3, got %x\n" , DeviceObject -> Type );
351- ok (DeviceObject -> Size == 0xb8 , "Expected Size = 0xb8, got %x\n" , DeviceObject -> Size );
353+ #ifdef _M_IX86
354+ ok (DeviceObject -> Size == 0xb8 , "Expected Size = 0xb8, got 0x%x\n" , DeviceObject -> Size );
355+ #else
356+ ok (DeviceObject -> Size == 0x150 , "Expected Size = 0x150, got 0x%x\n" , DeviceObject -> Size );
357+ #endif
352358 ok (DeviceObject -> ReferenceCount == 0 , "Expected ReferenceCount = 0, got %lu\n" ,
353359 DeviceObject -> ReferenceCount );
354360 ok (DeviceObject -> DriverObject == ThisDriverObject ,
@@ -368,17 +374,19 @@ TestDeviceCreated(
368374 "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING, got %lu\n" , DeviceObject -> Flags );
369375 }
370376 ok (DeviceObject -> DeviceType == FILE_DEVICE_UNKNOWN ,
371- "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu\n" ,
377+ "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu\n" ,
372378 DeviceObject -> DeviceType );
373379 ok (DeviceObject -> ActiveThreadCount == 0 , "Expected ActiveThreadCount = 0, got %lu\n" , DeviceObject -> ActiveThreadCount );
374380
375381 /* Check the extended extension */
376382 extdev = (PEXTENDED_DEVOBJ_EXTENSION )DeviceObject -> DeviceObjectExtension ;
377- ok (extdev -> ExtensionFlags == 0 , "Expected Extended ExtensionFlags to be 0, got %lu\n" , extdev -> ExtensionFlags );
378- ok (extdev -> Type == 13 , "Expected Type of 13, got %d\n" , extdev -> Type );
379- ok (extdev -> Size == 0 , "Expected Size of 0, got %d\n" , extdev -> Size );
380- ok (extdev -> DeviceObject == DeviceObject , "Expected DeviceOject to match newly created device %p, got %p\n" ,
381- DeviceObject , extdev -> DeviceObject );
383+ ok (extdev -> ExtensionFlags == DOE_DEFAULT_SD_PRESENT || // Vista+
384+ extdev -> ExtensionFlags == 0 , // WS03
385+ "Expected Extended ExtensionFlags to be DOE_DEFAULT_SD_PRESENT or 0, got %lu\n" , extdev -> ExtensionFlags );
386+ ok (extdev -> Type == 13 , "Expected Type of 13, got %d\n" , extdev -> Type );
387+ ok (extdev -> Size == 0 , "Expected Size of 0, got %d\n" , extdev -> Size );
388+ ok (extdev -> DeviceObject == DeviceObject , "Expected DeviceOject to match newly created device %p, got %p\n" ,
389+ DeviceObject , extdev -> DeviceObject );
382390 ok (extdev -> AttachedTo == NULL , "Expected AttachTo to be NULL, got %p\n" , extdev -> AttachedTo );
383391 ok (extdev -> StartIoCount == 0 , "Expected StartIoCount = 0, got %lu\n" , extdev -> StartIoCount );
384392 ok (extdev -> StartIoKey == 0 , "Expected StartIoKey = 0, got %lu\n" , extdev -> StartIoKey );
@@ -396,7 +404,11 @@ TestDeviceDeletion(
396404
397405 /* Check the device object members */
398406 ok (DeviceObject -> Type == 3 , "Expected Type = 3, got %d\n" , DeviceObject -> Type );
399- ok (DeviceObject -> Size == 0xb8 , "Expected Size = 0xb8, got %d\n" , DeviceObject -> Size );
407+ #ifdef _M_IX86
408+ ok (DeviceObject -> Size == 0xb8 , "Expected Size = 0xb8, got 0x%x\n" , DeviceObject -> Size );
409+ #else
410+ ok (DeviceObject -> Size == 0x150 , "Expected Size = 0x150, got 0x%x\n" , DeviceObject -> Size );
411+ #endif
400412 ok (DeviceObject -> ReferenceCount == 0 , "Expected ReferenceCount = 0, got %lu\n" ,
401413 DeviceObject -> ReferenceCount );
402414 if (!Lower )
@@ -426,9 +438,9 @@ TestDeviceDeletion(
426438
427439 /* Check the extended extension */
428440 extdev = (PEXTENDED_DEVOBJ_EXTENSION )DeviceObject -> DeviceObjectExtension ;
429- /* FIXME: Windows has the MSB set under some conditions, need to find out what this means */
430- ok (( extdev -> ExtensionFlags & 0x7fffffff ) == DOE_UNLOAD_PENDING ,
431- "Expected Extended ExtensionFlags to be DOE_UNLOAD_PENDING, got 0x%lx\n" , extdev -> ExtensionFlags );
441+ ok (( extdev -> ExtensionFlags == ( DOE_DEFAULT_SD_PRESENT | DOE_UNLOAD_PENDING ) || // Vista+
442+ extdev -> ExtensionFlags & 0x7fffffff ) == DOE_UNLOAD_PENDING , // WS03 FIXME: Windows has the MSB set under some conditions, need to find out what this means
443+ "Unexpected Extended ExtensionFlags ( 0x%lx) \n" , extdev -> ExtensionFlags );
432444 ok (extdev -> Type == 13 , "Expected Type of 13, got %d\n" , extdev -> Type );
433445 ok (extdev -> Size == 0 , "Expected Size of 0, got %d\n" , extdev -> Size );
434446 ok (extdev -> DeviceObject == DeviceObject , "Expected DeviceOject to match newly created device %p, got %p\n" ,
0 commit comments