From fac6f2cebde3393a942283c9cefa0a92c870adc8 Mon Sep 17 00:00:00 2001 From: David Hall Date: Sat, 20 Jan 2018 18:00:40 -0700 Subject: [PATCH] Added IInitializeWithStream --- PInvoke/Ole/PropSys/PropSys.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PInvoke/Ole/PropSys/PropSys.cs b/PInvoke/Ole/PropSys/PropSys.cs index 7e8c5b3c..ca4df3df 100644 --- a/PInvoke/Ole/PropSys/PropSys.cs +++ b/PInvoke/Ole/PropSys/PropSys.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; using System.Security; using Vanara.InteropServices; using static Vanara.PInvoke.Ole32; @@ -436,7 +437,18 @@ namespace Vanara.PInvoke [PInvokeData("Propsys.h", MSDNShortId = "bb762081")] public static extern HRESULT PSGetPropertyKeyFromName([MarshalAs(UnmanagedType.LPWStr)] string pszName, out PROPERTYKEY ppropkey); - [ComImport, Guid("1F9FC1D0-C39B-4B26-817F-011967D3440E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + /// Exposes a method that initializes a handler, such as a property handler, thumbnail handler, or preview handler, with a stream. + [ComImport, Guid("b824b49d-22ac-4161-ac8a-9916e8fa3f7f"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [PInvokeData("Propsys.h", MSDNShortId = "bb761810")] + public interface IInitializeWithStream + { + /// Initializes a handler with a stream. + /// A pointer to an IStream interface that represents the stream source. + /// One of the following STGM values that indicates the access mode for pstream. STGM_READ or STGM_READWRITE. + void Initialize(IStream pstream, STGM grfMode); + } + + [ComImport, Guid("1F9FC1D0-C39B-4B26-817F-011967D3440E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [PInvokeData("Propsys.h", MSDNShortId = "bb761511")] public interface IPropertyDescriptionList {