Skip to content

Commit

Permalink
Update implement test
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Nov 14, 2024
1 parent 0a25889 commit 63fdeda
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/tests/misc/implement/tests/properties.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down Expand Up @@ -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
}
}

Expand All @@ -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(())
}
Expand Down

0 comments on commit 63fdeda

Please sign in to comment.