From 63fdedad6d3a6a9d89da95a4ec85e0529fadec96 Mon Sep 17 00:00:00 2001 From: Rafael Rivera Date: Wed, 13 Nov 2024 20:22:16 -0800 Subject: [PATCH] Update implement test --- crates/tests/misc/implement/tests/properties.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/tests/misc/implement/tests/properties.rs b/crates/tests/misc/implement/tests/properties.rs index f1c2f655de..0e50f60f0b 100644 --- a/crates/tests/misc/implement/tests/properties.rs +++ b/crates/tests/misc/implement/tests/properties.rs @@ -1,8 +1,12 @@ #![allow(non_snake_case)] use windows::{ - core::*, Win32::System::Com::StructuredStorage::*, Win32::System::Com::*, - Win32::UI::Shell::PropertiesSystem::*, + core::*, + Win32::{ + Foundation::*, + System::Com::{StructuredStorage::*, *}, + UI::Shell::PropertiesSystem::*, + }, }; #[implement(IInitializeWithStream, IPropertyStore, IPropertyStoreCapabilities)] @@ -36,8 +40,8 @@ impl IPropertyStore_Impl for Object_Impl { } impl IPropertyStoreCapabilities_Impl for Object_Impl { - fn IsPropertyWritable(&self, _: *const PROPERTYKEY) -> Result<()> { - Ok(()) + fn IsPropertyWritable(&self, _: *const PROPERTYKEY) -> HRESULT { + S_OK } } @@ -54,7 +58,7 @@ fn test() -> Result<()> { assert_eq!(PROPVARIANT::from(123), b.GetValue(std::ptr::null())?); let c: IPropertyStoreCapabilities = b.cast()?; - c.IsPropertyWritable(&PROPERTYKEY::default())?; + c.IsPropertyWritable(&PROPERTYKEY::default()).ok()?; Ok(()) }