@@ -97,7 +97,7 @@ unsafe List<string> GetPinnedFolders()
9797 hr = PInvoke . SHCreateItemFromParsingName ( pszFolderShellPath , null , & IID_IShellItem , ( void * * ) pFolderShellItem . GetAddressOf ( ) ) ;
9898
9999 // Get IEnumShellItems of the quick access shell folder
100- var BHID_EnumItems = PInvoke . BHID_EnumItems , IID_IEnumShellItems = typeof ( IEnumShellItems ) . GUID ;
100+ Guid BHID_EnumItems = PInvoke . BHID_EnumItems , IID_IEnumShellItems = typeof ( IEnumShellItems ) . GUID ;
101101 using ComPtr < IEnumShellItems > pEnumShellItems = default ;
102102 hr = pFolderShellItem . Get ( ) ->BindToHandler ( null , & BHID_EnumItems , & IID_IEnumShellItems , ( void * * ) pEnumShellItems . GetAddressOf ( ) ) ;
103103
@@ -220,7 +220,7 @@ NotifyCollectionChangedEventArgs GetChangedActionEventArgs(IReadOnlyList<INaviga
220220 }
221221 }
222222
223- public bool IsPinned ( string path )
223+ public unsafe bool IsPinned ( string path )
224224 {
225225 HRESULT hr = default ;
226226 var IID_IShellItem = typeof ( IShellItem ) . GUID ;
@@ -234,7 +234,7 @@ public bool IsPinned(string path)
234234 hr = pShellItem2 . Get ( ) ->GetPropertyStore ( GETPROPERTYSTOREFLAGS . GPS_DEFAULT , & IID_IPropertyStore , ( void * * ) pPropertyStore . GetAddressOf ( ) ) ;
235235 hr = PInvoke . PSGetPropertyKeyFromName ( "System.Home.IsPinned" , out var propertyKey ) ;
236236 hr = pPropertyStore . Get ( ) ->GetValue ( propertyKey , out var propertyValue ) ;
237- return ( bool ) propertyValue . Anonymous . boolVal ;
237+ return ( bool ) propertyValue . Anonymous . Anonymous . Anonymous . boolVal ;
238238 }
239239
240240 public async Task < bool > PinFolderAsync ( string [ ] paths )
0 commit comments