diff --git a/Directory.Build.props b/Directory.Build.props index 11cf5de1..92dcec6b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -24,7 +24,7 @@ https://github.com/dahall/vanara Vanara.PInvoke true - $(NoWarn);NETSDK1138;SYSLIB0003;SYSLIB0004;SYSLIB0011;IL2026;IL2075;IL2067;IL2070;IL2072;IL2077;IL2080;IL2087;IL2090;CS0618;CA1401;CA2101; + $(NoWarn);NETSDK1138;SYSLIB0003;SYSLIB0004;SYSLIB0011;IL2026;IL2075;IL2067;IL2070;IL2072;IL2077;IL2080;IL2087;IL2090;CS0618;CA1401;CA2101;SYSLIB1054; true diff --git a/PInvoke/MsftEdit/TextServ.cs b/PInvoke/MsftEdit/TextServ.cs index f7ba170d..8e2a3e0a 100644 --- a/PInvoke/MsftEdit/TextServ.cs +++ b/PInvoke/MsftEdit/TextServ.cs @@ -3200,7 +3200,7 @@ public static partial class MsftEdit // dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] LPCRECTL // lprcBounds, [in] LPCRECTL lprcWBounds, [in] LPRECT lprcUpdate, BOOL(* )(DWORD) pfnContinue, DWORD dwContinue, LONG lViewId ); [PreserveSig] - HRESULT TxDraw(DVASPECT dwDrawAspect, int lindex, IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcBounds, + HRESULT TxDraw(DVASPECT dwDrawAspect, int lindex, IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcBounds, in RECT lprcWBounds, in RECT lprcUpdate, IntPtr pfnContinue, uint dwContinue, TXTVIEW lViewId); /// Returns horizontal scroll bar information. @@ -3386,7 +3386,7 @@ public static partial class MsftEdit // DWORD dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] // LPCRECT lprcClient, [in] INT x, [in] INT y ); [PreserveSig] - HRESULT OnTxSetCursor(uint dwDrawAspect, int lindex, [In] IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y); + HRESULT OnTxSetCursor(uint dwDrawAspect, int lindex, [In] IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y); /// Tests whether a specified point is within the rectangle of the text services object. /// @@ -3485,7 +3485,7 @@ public static partial class MsftEdit // [in] DWORD dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] // LPCRECT lprcClient, [in] INT x, [in] INT y, [out] DWORD *pHitResult ); [PreserveSig] - HRESULT TxQueryHitPoint(DVASPECT dwDrawAspect, int lindex, [In] IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, + HRESULT TxQueryHitPoint(DVASPECT dwDrawAspect, int lindex, [In] IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y, out uint pHitResult); /// Notifies the text services object that this control is in-place active. @@ -3833,7 +3833,7 @@ public static partial class MsftEdit // DWORD dwAspect, HDC hdcDraw, HDC hicTargetDev, DVTARGETDEVICE *ptd, DWORD dwMode, const SIZEL *psizelExtent, [in, out] LONG // *pwidth, [in, out] LONG *pheight ); [PreserveSig] - HRESULT TxGetNaturalSize(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, in DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight); + HRESULT TxGetNaturalSize(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, [In] DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight); /// Gets the drop target for the text control. /// @@ -4314,7 +4314,7 @@ public static partial class MsftEdit // dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] LPCRECTL // lprcBounds, [in] LPCRECTL lprcWBounds, [in] LPRECT lprcUpdate, BOOL(* )(DWORD) pfnContinue, DWORD dwContinue, LONG lViewId ); [PreserveSig] - new HRESULT TxDraw(DVASPECT dwDrawAspect, int lindex, IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcBounds, + new HRESULT TxDraw(DVASPECT dwDrawAspect, int lindex, IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcBounds, in RECT lprcWBounds, in RECT lprcUpdate, IntPtr pfnContinue, uint dwContinue, TXTVIEW lViewId); /// Returns horizontal scroll bar information. @@ -4500,7 +4500,7 @@ public static partial class MsftEdit // DWORD dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] // LPCRECT lprcClient, [in] INT x, [in] INT y ); [PreserveSig] - new HRESULT OnTxSetCursor(uint dwDrawAspect, int lindex, [In] IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y); + new HRESULT OnTxSetCursor(uint dwDrawAspect, int lindex, [In] IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y); /// Tests whether a specified point is within the rectangle of the text services object. /// @@ -4599,7 +4599,7 @@ public static partial class MsftEdit // [in] DWORD dwDrawAspect, LONG lindex, [in] void *pvAspect, [in] DVTARGETDEVICE *ptd, [in] HDC hdcDraw, [in] HDC hicTargetDev, [in] // LPCRECT lprcClient, [in] INT x, [in] INT y, [out] DWORD *pHitResult ); [PreserveSig] - new HRESULT TxQueryHitPoint(DVASPECT dwDrawAspect, int lindex, [In] IntPtr pvAspect, in DVTARGETDEVICE ptd, [In] HDC hdcDraw, + new HRESULT TxQueryHitPoint(DVASPECT dwDrawAspect, int lindex, [In] IntPtr pvAspect, [In] DVTARGETDEVICE ptd, [In] HDC hdcDraw, [In] HDC hicTargetDev, in RECT lprcClient, int x, int y, out uint pHitResult); /// Notifies the text services object that this control is in-place active. @@ -4947,7 +4947,7 @@ public static partial class MsftEdit // DWORD dwAspect, HDC hdcDraw, HDC hicTargetDev, DVTARGETDEVICE *ptd, DWORD dwMode, const SIZEL *psizelExtent, [in, out] LONG // *pwidth, [in, out] LONG *pheight ); [PreserveSig] - new HRESULT TxGetNaturalSize(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, in DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight); + new HRESULT TxGetNaturalSize(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, [In] DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight); /// Gets the drop target for the text control. /// @@ -5330,7 +5330,7 @@ public static partial class MsftEdit // TxGetNaturalSize2( DWORD dwAspect, HDC hdcDraw, HDC hicTargetDev, DVTARGETDEVICE *ptd, DWORD dwMode, const SIZEL *psizelExtent, // LONG *pwidth, LONG *pheight, LONG *pascent ); [PreserveSig] - HRESULT TxGetNaturalSize2(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, in DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight, out int pascent); + HRESULT TxGetNaturalSize2(DVASPECT dwAspect, HDC hdcDraw, HDC hicTargetDev, [In] DVTARGETDEVICE ptd, TXTNATURALSIZE dwMode, in SIZE psizelExtent, ref int pwidth, ref int pheight, out int pascent); /// Draws the text services object by using Direct2D rendering. /// diff --git a/PInvoke/Ole/Ole32/ComBaseApi.cs b/PInvoke/Ole/Ole32/ComBaseApi.cs index 9bdc85bf..f710663c 100644 --- a/PInvoke/Ole/Ole32/ComBaseApi.cs +++ b/PInvoke/Ole/Ole32/ComBaseApi.cs @@ -700,7 +700,7 @@ public static partial class Ole32 // rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID *ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "7295a55b-12c7-4ed0-a7a4-9ecee16afdec")] - public static extern HRESULT CoCreateInstance(in Guid rclsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object pUnkOuter, + public static extern HRESULT CoCreateInstance(in Guid rclsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object? pUnkOuter, CLSCTX dwClsContext, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 3)] out object ppv); /// @@ -800,8 +800,8 @@ public static partial class Ole32 // REFCLSID Clsid, IUnknown *punkOuter, DWORD dwClsCtx, COSERVERINFO *pServerInfo, DWORD dwCount, MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "3b414b95-e8d2-42e8-b4f2-5cc5189a3d08")] - public static extern HRESULT CoCreateInstanceEx(in Guid Clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, - CLSCTX dwClsCtx, [Optional] COSERVERINFO pServerInfo, uint dwCount, + public static extern HRESULT CoCreateInstanceEx(in Guid Clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, + CLSCTX dwClsCtx, [Optional] COSERVERINFO? pServerInfo, uint dwCount, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] MULTI_QI[] pResults); /// Creates an instance of a specific class on a specific computer from within an app container. @@ -881,7 +881,7 @@ public static partial class Ole32 // CoCreateInstanceFromApp( REFCLSID Clsid, IUnknown *punkOuter, DWORD dwClsCtx, PVOID reserved, DWORD dwCount, MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "1C773D78-5B33-44FE-A09B-AB8087F678A1")] - public static extern HRESULT CoCreateInstanceFromApp(in Guid Clsid, [MarshalAs(UnmanagedType.IUnknown)] object punkOuter, uint dwClsCtx, IntPtr reserved, uint dwCount, ref MULTI_QI pResults); + public static extern HRESULT CoCreateInstanceFromApp(in Guid Clsid, [MarshalAs(UnmanagedType.IUnknown)] object? punkOuter, uint dwClsCtx, IntPtr reserved, uint dwCount, ref MULTI_QI pResults); /// /// Locates the implementation of a Component Object Model (COM) interface in a server process given an interface to a proxied object. @@ -1594,7 +1594,7 @@ public static partial class Ole32 // rclsid, DWORD dwClsContext, LPVOID pvReserved, REFIID riid, LPVOID *ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "65e758ce-50a4-49e8-b3b2-0cd148d2781a")] - public static extern HRESULT CoGetClassObject(in Guid rclsid, CLSCTX dwClsContext, IntPtr pvReserved, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 3)] out object ppv); + public static extern HRESULT CoGetClassObject(in Guid rclsid, CLSCTX dwClsContext, [Optional] IntPtr pvReserved, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 3)] out object ppv); /// /// @@ -1743,7 +1743,7 @@ public static partial class Ole32 // rclsid, DWORD dwClsContext, LPVOID pvReserved, REFIID riid, LPVOID *ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "65e758ce-50a4-49e8-b3b2-0cd148d2781a")] - public static extern HRESULT CoGetClassObject(in Guid rclsid, CLSCTX dwClsContext, [In, Optional] COSERVERINFO pvReserved, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 3)] out object ppv); + public static extern HRESULT CoGetClassObject(in Guid rclsid, CLSCTX dwClsContext, [In, Optional] COSERVERINFO? pvReserved, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 3)] out object ppv); /// Returns a pointer to an implementation of IObjContext for the current context. /// A pointer to an implementation of IObjContext for the current context. @@ -2225,7 +2225,7 @@ public static partial class Ole32 // REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL *ppMarshal ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "0cb74adc-e192-4ae5-9267-02c79e301681")] - public static extern HRESULT CoGetStandardMarshal(in Guid riid, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnk, + public static extern HRESULT CoGetStandardMarshal(in Guid riid, [In, MarshalAs(UnmanagedType.IUnknown)] object? pUnk, MSHCTX dwDestContext, [Optional] IntPtr pvDestContext, MSHLFLAGS mshlflags, out IMarshal ppMarshal); /// Creates an aggregated standard marshaler for use with lightweight client-side handlers. @@ -2701,7 +2701,7 @@ public static partial class Ole32 // CoMarshalInterThreadInterfaceInStream( REFIID riid, LPUNKNOWN pUnk, LPSTREAM *ppStm ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "c9ab8713-8604-4f0b-a11b-bdfb7d595d95")] - public static extern HRESULT CoMarshalInterThreadInterfaceInStream(in Guid riid, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnk, out IStream ppStm); + public static extern HRESULT CoMarshalInterThreadInterfaceInStream(in Guid riid, [In, MarshalAs(UnmanagedType.IUnknown)] object? pUnk, out IStream ppStm); /// Retrieves a list of the authentication services registered when the process called CoInitializeSecurity. /// A pointer to a variable that receives the number of entries returned in the asAuthSvc array. @@ -3253,7 +3253,7 @@ public static partial class Ole32 // IUnknown *pUnk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "0978e252-2206-4597-abf2-fe0dac32efc4")] - public static extern HRESULT CoSetCancelObject([In, MarshalAs(UnmanagedType.IUnknown)] object pUnk); + public static extern HRESULT CoSetCancelObject([In, MarshalAs(UnmanagedType.IUnknown)] object? pUnk); /// /// Sets the authentication information that will be used to make calls on the specified proxy. This is a helper function for IClientSecurity::SetBlanket. @@ -3375,7 +3375,7 @@ public static partial class Ole32 [PInvokeData("combaseapi.h", MSDNShortId = "c2e5e681-8fa5-4b02-b59d-ba796eb0dccf")] public static extern HRESULT CoSetProxyBlanket([In, MarshalAs(UnmanagedType.IUnknown)] object pProxy, RPC_C_AUTHN dwAuthnSvc = RPC_C_AUTHN.RPC_C_AUTHN_DEFAULT, RPC_C_AUTHZ dwAuthzSvc = RPC_C_AUTHZ.RPC_C_AUTHZ_DEFAULT, - string pServerPrincName = COLE_DEFAULT_PRINCIPAL, RPC_C_AUTHN_LEVEL dwAuthnLevel = RPC_C_AUTHN_LEVEL.RPC_C_AUTHN_LEVEL_DEFAULT, + string? pServerPrincName = COLE_DEFAULT_PRINCIPAL, RPC_C_AUTHN_LEVEL dwAuthnLevel = RPC_C_AUTHN_LEVEL.RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL dwImpLevel = RPC_C_IMP_LEVEL.RPC_C_IMP_LEVEL_DEFAULT, RPC_AUTH_IDENTITY_HANDLE pAuthInfo = default, EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities = EOLE_AUTHENTICATION_CAPABILITIES.EOAC_DEFAULT); @@ -3439,7 +3439,7 @@ public static partial class Ole32 // IUnknown *pNewObject, IUnknown **ppOldObject ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "146855a2-97ec-4e71-88dc-316eaa1a24a0")] - public static extern HRESULT CoSwitchCallContext([In, MarshalAs(UnmanagedType.IUnknown)] object pNewObject, + public static extern HRESULT CoSwitchCallContext([In, MarshalAs(UnmanagedType.IUnknown)] object? pNewObject, [MarshalAs(UnmanagedType.IUnknown)] out object ppOldObject); /// Allocates a block of task memory in the same way that IMalloc::Alloc does. @@ -3899,7 +3899,7 @@ public static partial class Ole32 // CreateStreamOnHGlobal( HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "413c107b-a943-4c02-9c00-aea708e876d7")] - public static extern HRESULT CreateStreamOnHGlobal(IntPtr hGlobal, [MarshalAs(UnmanagedType.Bool)] bool fDeleteOnRelease, out IStream ppstm); + public static extern HRESULT CreateStreamOnHGlobal([Optional] IntPtr hGlobal, [MarshalAs(UnmanagedType.Bool)] bool fDeleteOnRelease, out IStream ppstm); /// /// Determines whether the DLL that implements this function is in use. If not, the caller can unload the DLL from memory. @@ -4017,7 +4017,7 @@ public static partial class Ole32 // FreePropVariantArray( ULONG cVariants, PROPVARIANT *rgvars ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("combaseapi.h", MSDNShortId = "2eefb57e-9311-46e1-9eed-e25aa3b5afaa")] - public static extern HRESULT FreePropVariantArray(uint cVariants, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] PROPVARIANT[] rgvars); + public static extern HRESULT FreePropVariantArray(uint cVariants, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] PROPVARIANT[]? rgvars); /// /// The GetHGlobalFromStream function retrieves the global memory handle to a stream that was created through a call to the diff --git a/PInvoke/Ole/Ole32/ComCat.cs b/PInvoke/Ole/Ole32/ComCat.cs index 0a7762c6..bbf9e6ed 100644 --- a/PInvoke/Ole/Ole32/ComCat.cs +++ b/PInvoke/Ole/Ole32/ComCat.cs @@ -6,19 +6,19 @@ namespace Vanara.PInvoke; public static partial class Ole32 { /// Browsable Shell Extention - public static readonly Guid CATID_BrowsableShellExt = new Guid(0x00021490, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); + public static readonly Guid CATID_BrowsableShellExt = new(0x00021490, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); /// The catid browse in place - public static readonly Guid CATID_BrowseInPlace = new Guid(0x00021491, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); + public static readonly Guid CATID_BrowseInPlace = new(0x00021491, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); /// Desk Band - public static readonly Guid CATID_DeskBand = new Guid(0x00021492, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); + public static readonly Guid CATID_DeskBand = new(0x00021492, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); /// Vertical Explorer Bar - public static readonly Guid CATID_InfoBand = new Guid(0x00021493, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); + public static readonly Guid CATID_InfoBand = new(0x00021493, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); /// Horizontal Explorer Bar - public static readonly Guid CATID_CommBand = new Guid(0x00021494, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); + public static readonly Guid CATID_CommBand = new(0x00021494, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); /// /// Obtains information about the categories implemented or required by a certain class, as well as information about the categories diff --git a/PInvoke/Ole/Ole32/CtxtCall.cs b/PInvoke/Ole/Ole32/CtxtCall.cs index 54a078b2..d92e6f9b 100644 --- a/PInvoke/Ole/Ole32/CtxtCall.cs +++ b/PInvoke/Ole/Ole32/CtxtCall.cs @@ -7,17 +7,16 @@ namespace Vanara.PInvoke; public static partial class Ole32 { /// CLSID_ContextSwitcher - public static readonly Guid CLSID_ContextSwitcher = new Guid(0x0000034e, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + public static readonly Guid CLSID_ContextSwitcher = new(0x0000034e, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); /// IID_ICallbackWithNoReentrancyToApplicationSTA - public static readonly Guid IID_ICallbackWithNoReentrancyToApplicationSTA = new Guid(0x0a299774, 0x3e4e, 0xfc42, 0x1d, 0x9d, 0x72, 0xce, 0xe1, 0x05, 0xca, 0x57); + public static readonly Guid IID_ICallbackWithNoReentrancyToApplicationSTA = new(0x0a299774, 0x3e4e, 0xfc42, 0x1d, 0x9d, 0x72, 0xce, 0xe1, 0x05, 0xca, 0x57); /// IID_IEnterActivityWithNoLock - public static readonly Guid IID_IEnterActivityWithNoLock = new Guid(0xd7174f82, 0x36b8, 0x4aa8, 0x80, 0x0a, 0xe9, 0x63, 0xab, 0x2d, 0xfa, 0xb9); + public static readonly Guid IID_IEnterActivityWithNoLock = new(0xd7174f82, 0x36b8, 0x4aa8, 0x80, 0x0a, 0xe9, 0x63, 0xab, 0x2d, 0xfa, 0xb9); /// - /// The function to be called inside the object context if . + /// The function to be called inside the object context if . /// /// The data passed to the function when it is called in the context. /// The result. Typically the result of . @@ -59,12 +58,8 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ctxtcall/nf-ctxtcall-icontextcallback-contextcallback [PreserveSig] - HRESULT ContextCallback( - [MarshalAs(UnmanagedType.FunctionPtr)] PFNCONTEXTCALL pfnCallback, - in ComCallData pParam, - in Guid riid, - int iMethod, - [In, Optional] IntPtr pUnk); + HRESULT ContextCallback([MarshalAs(UnmanagedType.FunctionPtr)] PFNCONTEXTCALL pfnCallback, in ComCallData pParam, in Guid riid, + int iMethod, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object? pUnk); } /// @@ -86,15 +81,5 @@ public static partial class Ole32 /// An instance of this interface for the current context can be obtained using CoGetObjectContext. // https://docs.microsoft.com/en-us/windows/win32/api/ctxtcall/nn-ctxtcall-icontextcallback [ComImport, Guid("0000034e-0000-0000-C000-000000000046"), ClassInterface(ClassInterfaceType.None)] - public class ContextSwitcher : IContextCallback - { - /// - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - public virtual extern HRESULT ContextCallback( - [MarshalAs(UnmanagedType.FunctionPtr)] PFNCONTEXTCALL pfnCallback, - in ComCallData pParam, - in Guid riid, - int iMethod, - IntPtr pUnk = new IntPtr()); - } + public class ContextSwitcher { } } \ No newline at end of file diff --git a/PInvoke/Ole/Ole32/DocObj.cs b/PInvoke/Ole/Ole32/DocObj.cs index befc214e..83a8395a 100644 --- a/PInvoke/Ole/Ole32/DocObj.cs +++ b/PInvoke/Ole/Ole32/DocObj.cs @@ -832,7 +832,7 @@ public static partial class Ole32 /// Pointer to a VARIANTARG structure to receive command output. This parameter can be NULL. /// This method returns S_OK on success. [PreserveSig] - HRESULT Exec([In, Optional] GuidPtr pguidCmdGroup, uint nCmdID, uint nCmdexecopt, [In, Optional] /* VARIANT* */ IntPtr pvaIn, [In, Out, Optional] /* VARIANT* */ IntPtr pvaOut); + HRESULT Exec([In, Optional] GuidPtr pguidCmdGroup, uint nCmdID, uint nCmdexecopt, [In, Optional] object? pvaIn, [In, Out, Optional] object? pvaOut); } /// @@ -900,7 +900,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/docobj/nf-docobj-ioledocument-createview HRESULT CreateView( // IOleInPlaceSite *pIPSite, IStream *pstm, DWORD dwReserved, IOleDocumentView **ppView ); [PreserveSig] - HRESULT CreateView([In, Optional] IOleInPlaceSite pIPSite, [In, Optional] IStream pstm, [In, Optional] uint dwReserved, out IOleDocumentView ppView); + HRESULT CreateView([In, Optional] IOleInPlaceSite? pIPSite, [In, Optional] IStream? pstm, [In, Optional] uint dwReserved, out IOleDocumentView ppView); /// Retrieves status information about the document object. /// @@ -1059,7 +1059,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/docobj/nf-docobj-ioledocumentsite-activateme HRESULT ActivateMe( // IOleDocumentView *pViewToActivate ); [PreserveSig] - HRESULT ActivateMe([In] IOleDocumentView pViewToActivate); + HRESULT ActivateMe([In] IOleDocumentView? pViewToActivate); } /// @@ -1127,7 +1127,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/docobj/nf-docobj-ioledocumentview-setinplacesite HRESULT SetInPlaceSite( // IOleInPlaceSite *pIPSite ); [PreserveSig] - HRESULT SetInPlaceSite([In, Optional] IOleInPlaceSite pIPSite); + HRESULT SetInPlaceSite([In, Optional] IOleInPlaceSite? pIPSite); /// Retrieves the view site associated with this view object. /// @@ -1313,7 +1313,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/docobj/nf-docobj-ioledocumentview-setrectcomplex HRESULT SetRectComplex( // LPRECT prcView, LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox ); [PreserveSig] - HRESULT SetRectComplex([In, Optional] PRECT prcView, [In, Optional] PRECT prcHScroll, [In, Optional] PRECT prcVScroll, [In, Optional] PRECT prcSizeBox); + HRESULT SetRectComplex([In, Optional] PRECT? prcView, [In, Optional] PRECT? prcHScroll, [In, Optional] PRECT? prcVScroll, [In, Optional] PRECT? prcSizeBox); /// Activates or deactivates a view. /// If TRUE, the view is to show itself. If FALSE, the view is to hide itself. @@ -1607,7 +1607,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/docobj/nf-docobj-ioledocumentview-clone HRESULT Clone( IOleInPlaceSite // *pIPSiteNew, IOleDocumentView **ppViewNew ); [PreserveSig] - HRESULT Clone(IOleInPlaceSite pIPSiteNew, out IOleDocumentView ppViewNew); + HRESULT Clone(IOleInPlaceSite? pIPSiteNew, out IOleDocumentView ppViewNew); } /// Enables compound documents in general and active documents in particular to support programmatic printing. @@ -1743,7 +1743,7 @@ public static partial class Ole32 // *pcPagesPrinted, LONG *pnLastPage ); [PreserveSig] HRESULT Print(PRINTFLAG grfFlags, [In, Out] IntPtr /*DVTARGETDEVICE** */ pptd, [In, Out] IntPtr /*PAGESET***/ ppPageSet, - [In, Out, Optional] IntPtr /*STGMEDIUM**/ pstgmOptions, [In] IContinueCallback pcallback, int nFirstPage, + [In, Out, Optional] IntPtr /*STGMEDIUM**/ pstgmOptions, [In] IContinueCallback? pcallback, int nFirstPage, out int pcPagesPrinted, out int pnLastPage); } @@ -1903,13 +1903,13 @@ public static partial class Ole32 /// Gets or sets the command name or status text. When setting, this value must not be longer than and the /// field will be updated based on the character count of the value provided. /// - public string rgwz + public string? rgwz #pragma warning restore IDE1006 // Naming Styles { get => cwBuf > 0 ? _rgwz.ToString() : null; set { - if (value == null) value = string.Empty; + value ??= string.Empty; if (value.Length + 1 > cwBuf) throw new ArgumentOutOfRangeException(nameof(rgwz), "Set value must be of a length that will fit into supplied buffer of length 'cwBuf'."); unsafe diff --git a/PInvoke/Ole/Ole32/IAccess.cs b/PInvoke/Ole/Ole32/IAccess.cs index 24d4bb42..8f24f38d 100644 --- a/PInvoke/Ole/Ole32/IAccess.cs +++ b/PInvoke/Ole/Ole32/IAccess.cs @@ -7,6 +7,73 @@ namespace Vanara.PInvoke; public static partial class Ole32 { + /// + /// The following values are used as flags in the access mask of an Access Control Entry (ACE) in a component-related security descriptor. + /// + // https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-coma/a7395012-15a8-4f7c-ada9-d16bef022be3 + [PInvokeData("combaseapi.h")] + [Flags] + public enum COM_RIGHTS : uint + { + /// + /// In an OldVersionComponentAccessMask (section 2.2.2.21.1.2), this value represents a combination of all of the rights represented + /// by COM_RIGHTS_EXECUTE_LOCAL, COM_RIGHTS_EXECUTE_REMOTE, COM_RIGHTS_ACTIVATE_LOCAL, and COM_RIGHTS_ACTIVATE_REMOTE. + /// + /// In a NewVersionComponentAccessMask (section 2.2.2.21.1.3), this flag has no specific meaning but is required to be set for + /// historical reasons. + /// + /// + COM_RIGHTS_EXECUTE = 0x00000001, + + /// + /// In a NewVersionComponentAccessMask, this value represents the right of a security principal to use ORB-specific local mechanisms + /// to cause a component to be executed, where the precise meaning of execute depends on the context. + /// + /// In a component access security descriptor, this right controls whether or not a principal is authorized to execute method calls + /// on component instances. + /// + /// + /// In a component launch security descriptor, this right controls whether or not a principal is authorized to create a process in + /// which the component will be hosted. + /// + /// + COM_RIGHTS_EXECUTE_LOCAL = 0x00000002, + + /// + /// In a NewVersionComponentAccessMask, this value represents the right of a security principal to use ORB-specific remote mechanisms + /// to cause a component to be executed, where the precise meaning of execute depends on the context. + /// + /// In a component access security descriptor, this right controls whether or not a principal is authorized to execute method calls + /// on component instances. + /// + /// + /// In a component launch security descriptor, this right controls whether or not a principal is authorized to create a process in + /// which the component will be hosted. + /// + /// + COM_RIGHTS_EXECUTE_REMOTE = 0x00000004, + + /// + /// In a NewVersionComponentAccessMask, this value represents the right of a security principal to use ORB-specific local mechanisms + /// to activate a component. + /// This right is meaningful only in a component launch security descriptor. + /// + COM_RIGHTS_ACTIVATE_LOCAL = 0x00000008, + + /// + /// In a NewVersionComponentAccessMask, this value represents the right of a security principal to use ORB-specific local mechanisms + /// to activate a component. + /// This right is meaningful only in a component launch security descriptor. + /// + COM_RIGHTS_ACTIVATE_REMOTE = 0x000000010, + + /// + COM_RIGHTS_RESERVED1 = 32, + + /// + COM_RIGHTS_RESERVED2 = 64, + } + /// Enables the management of access to objects and properties on the objects. // https://docs.microsoft.com/en-us/windows/win32/api/iaccess/nn-iaccess-iaccesscontrol [PInvokeData("iaccess.h", MSDNShortId = "NN:iaccess.IAccessControl")] @@ -79,7 +146,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/iaccess/nf-iaccess-iaccesscontrol-revokeaccessrights HRESULT // RevokeAccessRights( LPWSTR lpProperty, ULONG cTrustees, TRUSTEEW [] prgTrustees ); [PreserveSig] - HRESULT RevokeAccessRights([MarshalAs(UnmanagedType.LPWStr)] string lpProperty, uint cTrustees, + HRESULT RevokeAccessRights([MarshalAs(UnmanagedType.LPWStr)] string? lpProperty, uint cTrustees, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] TRUSTEE[] prgTrustees); /// Gets the entire list of access rights and/or the owner and group for the specified object. @@ -109,7 +176,7 @@ public static partial class Ole32 // GetAllAccessRights( LPWSTR lpProperty, PACTRL_ACCESSW_ALLOCATE_ALL_NODES *ppAccessList, PTRUSTEEW *ppOwner, PTRUSTEEW // *ppGroup ); [PreserveSig] - HRESULT GetAllAccessRights([MarshalAs(UnmanagedType.LPWStr)] string lpProperty, out SafeCoTaskMemHandle ppAccessList, + HRESULT GetAllAccessRights([MarshalAs(UnmanagedType.LPWStr)] string? lpProperty, out SafeCoTaskMemHandle ppAccessList, out SafeCoTaskMemHandle ppOwner, out SafeCoTaskMemHandle ppGroup); /// Determines whether the specified trustee has access rights to the object or property. @@ -451,7 +518,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/iaccess/nf-iaccess-iaccesscontrol-isaccessallowed HRESULT IsAccessAllowed( // PTRUSTEEW pTrustee, LPWSTR lpProperty, ACCESS_RIGHTS AccessRights, BOOL *pfAccessAllowed ); [PreserveSig] - HRESULT IsAccessAllowed(in TRUSTEE pTrustee, [MarshalAs(UnmanagedType.LPWStr)] string lpProperty, uint AccessRights, + HRESULT IsAccessAllowed(in TRUSTEE pTrustee, [MarshalAs(UnmanagedType.LPWStr)] string? lpProperty, COM_RIGHTS AccessRights, [MarshalAs(UnmanagedType.Bool)] out bool pfAccessAllowed); } } \ No newline at end of file diff --git a/PInvoke/Ole/Ole32/MessageDispatcher.cs b/PInvoke/Ole/Ole32/MessageDispatcher.cs index 9e149e89..e87a75a6 100644 --- a/PInvoke/Ole/Ole32/MessageDispatcher.cs +++ b/PInvoke/Ole/Ole32/MessageDispatcher.cs @@ -378,11 +378,11 @@ public static partial class Ole32 // CoSetMessageDispatcher( PMessageDispatcher pMessageDispatcher ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("messagedispatcherapi.h", MSDNShortId = "3D6CFE01-8D3D-474E-A7D0-9B129ECD4EEA")] - public static extern void CoSetMessageDispatcher(IMessageDispatcher pMessageDispatcher); + public static extern void CoSetMessageDispatcher(IMessageDispatcher? pMessageDispatcher); /// Marshals HSTRING values. - /// + /// internal class HStringMarshaler : ICustomMarshaler { private HStringMarshaler(string cookie) @@ -426,18 +426,130 @@ public static partial class Ole32 /// A pointer to the unmanaged data to be wrapped. /// Returns the managed view of the COM data. [SecurityCritical] - public object MarshalNativeToManaged(IntPtr pNativeData) => pNativeData == IntPtr.Zero ? null : (string)WindowsGetStringRawBuffer(pNativeData, out var len); + public object MarshalNativeToManaged(IntPtr pNativeData) => (pNativeData == IntPtr.Zero ? null : (string?)WindowsGetStringRawBuffer(pNativeData, out _)) ?? ""; + /// Creates a new HSTRING based on the specified source string. + /// + /// Type: [in, optional] LPCWSTR + /// + /// A null-terminated string to use as the source for the new HSTRING. To create a new, empty, or NULL string, pass + /// NULL for sourceString and 0 for length. + /// + /// + /// + /// Type: [in] UINT32 + /// The length of sourceString, in Unicode characters. Must be 0 if sourceString is NULL. + /// + /// + /// Type: [out] HSTRING* + /// + /// A pointer to the newly created HSTRING, or NULL if an error occurs. Any existing content in string is + /// overwritten. The HSTRING is a standard handle type. + /// + /// + /// + /// Type: HRESULT + /// This function can return one of these values. + /// + /// + /// Return code + /// Description + /// + /// + /// S_OK + /// The [**HSTRING**](/windows/win32/winrt/hstring) was created successfully. + /// + /// + /// E_INVALIDARG + /// string is NULL. + /// + /// + /// E_OUTOFMEMORY + /// Failed to allocate the new [**HSTRING**](/windows/win32/winrt/hstring). + /// + /// + /// E_POINTER + /// sourceString is NULL and length is non-zero. + /// + /// + /// + /// + /// + /// Use the WindowsCreateString function to allocate a new HSTRING. The Windows Runtime copies string to the + /// backing buffer of the new HSTRING and manages the buffer lifetime by using a reference count. Call the + /// WindowsCreateStringReference function to create a fast-pass string, which uses an existing string without copying it. + /// + /// + /// Call the WindowsDeleteString function to de-allocate the HSTRING. Each call to the WindowsCreateString function + /// must be matched by a call to WindowsDeleteString. + /// + /// To create a new, empty, or NULL string, pass NULL for sourceString and 0 for length. + /// + /// If sourceString has embedded null characters, the WindowsCreateString function copies all characters to the + /// terminating null character. + /// + /// + // https://learn.microsoft.com/en-us/windows/win32/api/winstring/nf-winstring-windowscreatestring HRESULT WindowsCreateString( + // PCNZWCH sourceString, UINT32 length, HSTRING *string ); + [PInvokeData("winstring.h", MSDNShortId = "NF:winstring.WindowsCreateString")] [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] [SecurityCritical] [SuppressUnmanagedCodeSecurity] - private static extern HRESULT WindowsCreateString([MarshalAs(UnmanagedType.LPWStr)] string sourceString, int length, out IntPtr hstring); + private static extern HRESULT WindowsCreateString([MarshalAs(UnmanagedType.LPWStr)] string? sourceString, int length, out IntPtr hstring); + /// Decrements the reference count of a string buffer. + /// + /// Type: [in] HSTRING + /// + /// The string to be deleted. If string is a fast-pass string created by WindowsCreateStringReference, or if string is + /// NULL or empty, no action is taken and S_OK is returned. + /// + /// + /// + /// Type: HRESULT + /// This function always returns S_OK. + /// + /// + /// Use the WindowsDeleteString function to de-allocate an HSTRING. Calling WindowsDeleteString decrements the + /// reference count of the backing buffer, and if the reference count reaches 0, the Windows Runtime de-allocates the buffer. + /// + // https://learn.microsoft.com/en-us/windows/win32/api/winstring/nf-winstring-windowsdeletestring HRESULT WindowsDeleteString( + // HSTRING string ); + [PInvokeData("winstring.h", MSDNShortId = "NF:winstring.WindowsDeleteString")] [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static extern HRESULT WindowsDeleteString(IntPtr hstring); + /// Retrieves the backing buffer for the specified string. + /// + /// Type: [in, optional] HSTRING + /// An optional string for which the backing buffer is to be retrieved. Can be NULL. + /// + /// + /// Type: [out, optional] UINT32 * + /// + /// An optional pointer to a UINT32. If NULL is passed for length, then it is ignored. If length is a valid pointer to + /// a UINT32, and string is a valid HSTRING, then on successful completion the function sets the value pointed to by + /// length to the number of Unicode characters in the backing buffer for string (including embedded null characters, but excluding + /// the terminating null). If length is a valid pointer to a UINT32, and string is NULL, then the value pointed to by + /// length is set to 0. + /// + /// + /// + /// Type: PCWSTR + /// + /// A pointer to the buffer that provides the backing store for string, or the empty string if string is NULL or + /// the empty string. + /// + /// + /// + /// Use the WindowsGetStringRawBuffer function to obtain a pointer to the backing buffer of an HSTRING. + /// Don't change the contents of the buffer—an HSTRING is required to be immutable. + /// + // https://learn.microsoft.com/en-us/windows/win32/api/winstring/nf-winstring-windowsgetstringrawbuffer PCWSTR + // WindowsGetStringRawBuffer( HSTRING string, UINT32 *length ); + [PInvokeData("winstring.h", MSDNShortId = "NF:winstring.WindowsGetStringRawBuffer")] [DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention = CallingConvention.StdCall)] [SecurityCritical] [SuppressUnmanagedCodeSecurity] diff --git a/PInvoke/Ole/Ole32/Misc.cs b/PInvoke/Ole/Ole32/Misc.cs index fb91bfe4..4af8961c 100644 --- a/PInvoke/Ole/Ole32/Misc.cs +++ b/PInvoke/Ole/Ole32/Misc.cs @@ -39,7 +39,8 @@ public static partial class Ole32 // iidIntercepted, IUnknown *punkOuter, REFIID iid, void **ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("callobj.h", MSDNShortId = "d1ffee1d-f907-4091-b993-cf13d8ce616c")] - public static extern HRESULT CoGetInterceptor(in Guid iidIntercepted, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, in Guid iid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); + public static extern HRESULT CoGetInterceptor(in Guid iidIntercepted, [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, + in Guid iid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); /// /// The StgConvertVariantToProperty function converts a PROPVARIANT data type to a SERIALIZEDPROPERTYVALUE data type. @@ -61,7 +62,8 @@ public static partial class Ole32 // BOOLEAN fReserved, ULONG *pcIndirect ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("propidl.h", MSDNShortId = "3d35b808-4fa6-44ec-9c46-96ceee1dafd0")] - public static extern IntPtr StgConvertVariantToProperty([In] PROPVARIANT pvar, ushort CodePage, [Optional] IntPtr pprop, ref uint pcb, uint pid, [MarshalAs(UnmanagedType.U1), Optional] bool fReserved, ref uint pcIndirect); + public static extern IntPtr StgConvertVariantToProperty([In] PROPVARIANT pvar, ushort CodePage, [Optional] IntPtr pprop, ref uint pcb, + uint pid, [MarshalAs(UnmanagedType.U1), Optional] bool fReserved, ref uint pcIndirect); /// /// The StgPropertyLengthAsVariant function examines a SERIALIZEDPROPERTYVALUE and returns the amount of memory that diff --git a/PInvoke/Ole/Ole32/OCIdl.cs b/PInvoke/Ole/Ole32/OCIdl.cs index 6d1da9a2..925c364f 100644 --- a/PInvoke/Ole/Ole32/OCIdl.cs +++ b/PInvoke/Ole/Ole32/OCIdl.cs @@ -721,7 +721,7 @@ public static partial class Ole32 /// instantiate objects through IClassFactory2 when a full machine license does not exist. /// /// - /// + /// // https://docs.microsoft.com/en-us/windows/desktop/api/ocidl/nn-ocidl-iclassfactory2 [PInvokeData("ocidl.h", MSDNShortId = "c49c7612-3b1f-4535-baf3-8458b3f34f95")] [ComImport, Guid("B196B28F-BAB4-101A-B69C-00AA00341D07"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -809,7 +809,8 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/desktop/api/unknwn/nf-unknwn-iclassfactory-createinstance HRESULT CreateInstance( // IUnknown *pUnkOuter, REFIID riid, void **ppvObject ); [PreserveSig] - new HRESULT CreateInstance([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 1)] out object ppvObject); + new HRESULT CreateInstance([In, MarshalAs(UnmanagedType.IUnknown)] object? pUnkOuter, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 1)] out object? ppvObject); /// Locks an object application open in memory. This enables instances to be created more quickly. /// If TRUE, increments the lock count; if FALSE, decrements the lock count. @@ -930,7 +931,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/desktop/api/ocidl/nf-ocidl-iclassfactory2-requestlickey HRESULT RequestLicKey( DWORD // dwReserved, BSTR *pBstrKey ); [PreserveSig] - HRESULT RequestLicKey([Optional] uint dwReserved, [MarshalAs(UnmanagedType.BStr)] out string pBstrKey); + HRESULT RequestLicKey([Optional] uint dwReserved, [MarshalAs(UnmanagedType.BStr)] out string? pBstrKey); /// /// Creates an instance of the licensed object for the specified license key. This method is the only possible means to create @@ -998,8 +999,8 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/desktop/api/ocidl/nf-ocidl-iclassfactory2-createinstancelic HRESULT // CreateInstanceLic( IUnknown *pUnkOuter, IUnknown *pUnkReserved, REFIID riid, BSTR bstrKey, PVOID *ppvObj ); [PreserveSig] - HRESULT CreateInstanceLic([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkReserved, - in Guid riid, [In, MarshalAs(UnmanagedType.BStr)] string bstrKey, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 2)] out object ppvObj); + HRESULT CreateInstanceLic([In, MarshalAs(UnmanagedType.IUnknown)] object? pUnkOuter, [In, MarshalAs(UnmanagedType.IUnknown)] object? pUnkReserved, + in Guid riid, [In, MarshalAs(UnmanagedType.BStr)] string bstrKey, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 2)] out object? ppvObj); } /// Enumerates the undo units on the undo or redo stack. @@ -1898,7 +1899,7 @@ public static partial class Ole32 /// E_NOTIMPL is not allowed without implementation of the SetSite method, the IObjectWithSite interface is unnecessary. /// [PreserveSig] - HRESULT SetSite([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkSite); + HRESULT SetSite([In, MarshalAs(UnmanagedType.IUnknown)] object? pUnkSite); /// /// Retrieves the latest site passed using SetSite. @@ -1936,7 +1937,7 @@ public static partial class Ole32 /// E_NOTIMPL is not allowed any object implementing this interface must be able to return the last site seen in IObjectWithSite::SetSite. /// [PreserveSig] - HRESULT GetSite(in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] out object ppvSite); + HRESULT GetSite(in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] out object? ppvSite); } /// Provides the features for supporting keyboard mnemonics, ambient properties, and events in control objects. @@ -2142,7 +2143,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-iolecontrolsite-getextendedcontrol HRESULT // GetExtendedControl( IDispatch **ppDisp ); [PreserveSig] - HRESULT GetExtendedControl([MarshalAs(UnmanagedType.IDispatch)] out object ppDisp); + HRESULT GetExtendedControl([MarshalAs(UnmanagedType.IDispatch)] out object? ppDisp); /// /// Converts coordinates expressed in HIMETRIC units (as is standard in OLE) to the units specified by the container. @@ -3735,7 +3736,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleinplacesitewindowless-getdc HRESULT GetDC( LPCRECT // pRect, DWORD grfFlags, HDC *phDC ); [PreserveSig] - HRESULT GetDC([In, Optional] PRECT pRect, OLEDCFLAGS grfFlags, out HDC phDC); + HRESULT GetDC([In, Optional] PRECT? pRect, OLEDCFLAGS grfFlags, out HDC phDC); /// Releases the device context previously obtained by a call to IOleInPlaceSiteWindowless::GetDC. /// The device context to be released. @@ -3768,7 +3769,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleinplacesitewindowless-invalidaterect HRESULT // InvalidateRect( LPCRECT pRect, BOOL fErase ); [PreserveSig] - HRESULT InvalidateRect([In, Optional] PRECT pRect, [MarshalAs(UnmanagedType.Bool)] bool fErase); + HRESULT InvalidateRect([In, Optional] PRECT? pRect, [MarshalAs(UnmanagedType.Bool)] bool fErase); /// Enables an object to invalidate a specified region of its in-place image on the screen. /// @@ -3787,7 +3788,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleinplacesitewindowless-invalidatergn HRESULT // InvalidateRgn( HRGN hRGN, BOOL fErase ); [PreserveSig] - HRESULT InvalidateRgn(HRGN hRGN, [MarshalAs(UnmanagedType.Bool)] bool fErase); + HRESULT InvalidateRgn([Optional] HRGN hRGN, [MarshalAs(UnmanagedType.Bool)] bool fErase); /// Enables an object to scroll an area within its in-place active image on the screen. /// The amount to scroll the x-axis. @@ -3851,7 +3852,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleinplacesitewindowless-scrollrect HRESULT ScrollRect( // INT dx, INT dy, LPCRECT pRectScroll, LPCRECT pRectClip ); [PreserveSig] - HRESULT ScrollRect(int dx, int dy, [In, Optional] PRECT pRectScroll, [In, Optional] PRECT pRectClip); + HRESULT ScrollRect(int dx, int dy, [In, Optional] PRECT? pRectScroll, [In, Optional] PRECT? pRectClip); /// Adjusts a specified rectangle if it is entirely or partially covered by overlapping, opaque objects. /// The rectangle to be adjusted. @@ -4089,7 +4090,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleundounit-do HRESULT Do( IOleUndoManager *pUndoManager ); [PreserveSig] - new HRESULT Do(IOleUndoManager pUndoManager); + new HRESULT Do(IOleUndoManager? pUndoManager); /// Retrieves a description of the undo unit that can be used in the undo or redo user interface. /// A pointer to string that describes this undo unit. @@ -4588,7 +4589,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleundomanager-discardfrom HRESULT DiscardFrom( // IOleUndoUnit *pUU ); [PreserveSig] - HRESULT DiscardFrom(IOleUndoUnit pUU); + HRESULT DiscardFrom(IOleUndoUnit? pUU); /// /// Instructs the undo manager to invoke undo actions back through the undo stack, down to and including the specified undo unit. @@ -4650,7 +4651,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleundomanager-undoto HRESULT UndoTo( IOleUndoUnit *pUU ); [PreserveSig] - HRESULT UndoTo(IOleUndoUnit pUU); + HRESULT UndoTo(IOleUndoUnit? pUU); /// /// Instructs the undo manager to invoke undo actions back through the redo stack, down to and including the specified undo unit. @@ -4704,7 +4705,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleundomanager-redoto HRESULT RedoTo( IOleUndoUnit *pUU ); [PreserveSig] - HRESULT RedoTo(IOleUndoUnit pUU); + HRESULT RedoTo(IOleUndoUnit? pUU); /// /// Creates an enumerator object that the caller can use to iterate through a series of top-level undo units from the undo stack. @@ -4916,7 +4917,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ioleundounit-do HRESULT Do( IOleUndoManager *pUndoManager ); [PreserveSig] - HRESULT Do(IOleUndoManager pUndoManager); + HRESULT Do(IOleUndoManager? pUndoManager); /// Retrieves a description of the undo unit that can be used in the undo or redo user interface. /// A pointer to string that describes this undo unit. @@ -5195,7 +5196,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-iperpropertybrowsing-getpredefinedvalue HRESULT // GetPredefinedValue( DISPID dispID, DWORD dwCookie, VARIANT *pVarOut ); [PreserveSig] - HRESULT GetPredefinedValue(int dispID, uint dwCookie, out OleAut32.VARIANT pVarOut); + HRESULT GetPredefinedValue(int dispID, uint dwCookie, out object pVarOut); } /// Works with IPropertyBag and IErrorlog to define an individual property-based persistence mechanism. @@ -5287,7 +5288,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ipersistpropertybag-load HRESULT Load( IPropertyBag // *pPropBag, IErrorLog *pErrorLog ); - void Load(OleAut32.IPropertyBag pPropBag, [Optional] OleAut32.IErrorLog pErrorLog); + void Load(OleAut32.IPropertyBag pPropBag, [Optional] OleAut32.IErrorLog? pErrorLog); /// /// Instructs the object to save its properties to the given property bag, and optionally, to clear the object's dirty flag. @@ -5785,7 +5786,7 @@ public static partial class Ole32 // LONG cx, LONG cy, OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc, OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc, LPCRECT // pRcWBounds ); [PreserveSig] - HRESULT Render(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, [In, Optional] PRECT pRcWBounds); + HRESULT Render(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, [In, Optional] PRECT? pRcWBounds); /// Assigns a GDI palette to the picture contained in the picture object. /// A handle to the GDI palette assigned to the picture. @@ -6231,7 +6232,7 @@ public static partial class Ole32 // LONG cx, LONG cy, OLE_XPOS_HIMETRIC xSrc, OLE_YPOS_HIMETRIC ySrc, OLE_XSIZE_HIMETRIC cxSrc, OLE_YSIZE_HIMETRIC cySrc, LPCRECT // pRcWBounds ); [PreserveSig] - HRESULT Render(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, [In, Optional] PRECT pRcWBounds); + HRESULT Render(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, [In, Optional] PRECT? pRcWBounds); /// Assigns a GDI palette to the picture contained in the picture object. /// A handle to the GDI palette assigned to the picture. @@ -6682,7 +6683,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ipropertypage-setpagesite HRESULT SetPageSite( // IPropertyPageSite *pPageSite ); [PreserveSig] - HRESULT SetPageSite(IPropertyPageSite pPageSite); + HRESULT SetPageSite(IPropertyPageSite? pPageSite); /// /// Creates the dialog box window for the property page. @@ -7061,7 +7062,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ipropertypage-setpagesite HRESULT SetPageSite( // IPropertyPageSite *pPageSite ); [PreserveSig] - new HRESULT SetPageSite(IPropertyPageSite pPageSite); + new HRESULT SetPageSite(IPropertyPageSite? pPageSite); /// /// Creates the dialog box window for the property page. @@ -7528,7 +7529,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-ipropertypagesite-getpagecontainer HRESULT // GetPageContainer( IUnknown **ppUnk ); [PreserveSig] - HRESULT GetPageContainer([MarshalAs(UnmanagedType.IUnknown)] out object ppUnk); + HRESULT GetPageContainer([MarshalAs(UnmanagedType.IUnknown)] out object? ppUnk); /// Passes a keystroke to the property frame for processing. /// A pointer to the MSG structure to be processed. @@ -8203,9 +8204,9 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-draw HRESULT Draw( DWORD dwDrawAspect, LONG // lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(* // )(ULONG_PTR dwContinue) pfnContinue, ULONG_PTR dwContinue ); - new unsafe HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, - [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT lprcBounds, [In, Optional] PRECT lprcWBounds, - [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func pfnContinue, [In, Optional] IntPtr dwContinue); + new HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, + [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT? lprcBounds, [In, Optional] PRECT? lprcWBounds, + [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func? pfnContinue, [In, Optional] IntPtr dwContinue); /// /// Returns the logical palette that the object will use for drawing in its IViewObject::Draw method with the corresponding parameters. @@ -8288,7 +8289,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-getcolorset HRESULT GetColorSet( DWORD // dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet ); - new unsafe HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, + new HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, [In, Optional] HDC hicTargetDev, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(VanaraCustomMarshaler))] out LOGPALETTE ppColorSet); /// @@ -8353,7 +8354,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-freeze HRESULT Freeze( DWORD dwDrawAspect, // LONG lindex, void *pvAspect, DWORD *pdwFreeze ); - new unsafe HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, out uint pdwFreeze); + new HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, out uint pdwFreeze); /// /// Releases a drawing that was previously frozen using IViewObject::Freeze. The most common use of this method is for banded printing. @@ -8452,7 +8453,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-setadvise HRESULT SetAdvise( DWORD aspects, // DWORD advf, IAdviseSink *pAdvSink ); - new HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink pAdvSink); + new HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink? pAdvSink); /// Retrieves the advisory connection on the object that was used in the most recent call to IViewObject::SetAdvise. /// @@ -8516,7 +8517,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject2-getextent // HRESULT GetExtent( DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel ); - new HRESULT GetExtent(uint dwDrawAspect, int lindex, in DVTARGETDEVICE ptd, out SIZE lpsizel); + new HRESULT GetExtent(uint dwDrawAspect, int lindex, [In] DVTARGETDEVICE ptd, out SIZE lpsizel); /// Retrieves a rectangle describing a requested drawing aspect. /// The drawing aspect requested. @@ -8882,14 +8883,14 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ocidl/nf-ocidl-iviewobjectex-getnaturalextent HRESULT GetNaturalExtent( // DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel ); [PreserveSig] - HRESULT GetNaturalExtent(DVASPECT2 dwAspect, int lindex, in DVTARGETDEVICE ptd, HDC hicTargetDev, in DVEXTENTINFO pExtentInfo, out SIZE pSizel); + HRESULT GetNaturalExtent(DVASPECT2 dwAspect, int lindex, [In] DVTARGETDEVICE? ptd, HDC hicTargetDev, in DVEXTENTINFO pExtentInfo, out SIZE pSizel); } /// Extension method to simplify using the method. /// Type of the interface to get. /// An instance. /// Receives the interface pointer requested in . - public static T GetSite(this IObjectWithSite ows) where T : class { ows.GetSite(typeof(T).GUID, out var pSite).ThrowIfFailed(); return (T)pSite; } + public static T? GetSite(this IObjectWithSite ows) where T : class { ows.GetSite(typeof(T).GUID, out object? pSite).ThrowIfFailed(); return (T?)pSite; } /// /// Specifies a counted array of values that can be used to obtain the value corresponding to one of the predefined strings for a property. @@ -9019,7 +9020,7 @@ public static partial class Ole32 // dwFlags; } DVASPECTINFO; [PInvokeData("ocidl.h", MSDNShortId = "NS:ocidl.tagAspectInfo")] [StructLayout(LayoutKind.Sequential)] - public struct DVASPECTINFO + public class DVASPECTINFO { /// The size of the structure, in bytes. public uint cb; diff --git a/PInvoke/Ole/Ole32/ObjBase.cs b/PInvoke/Ole/Ole32/ObjBase.cs index 1744ddf9..b31086f0 100644 --- a/PInvoke/Ole/Ole32/ObjBase.cs +++ b/PInvoke/Ole/Ole32/ObjBase.cs @@ -590,7 +590,7 @@ public static partial class Ole32 // grfOpt, REFIID iidResult, LPVOID *ppvResult ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "5a022c39-fc2c-458b-9dfe-fed1255d49a4")] - public static extern HRESULT BindMoniker(IMoniker pmk, [Optional] uint grfOpt, in Guid iidResult, [MarshalAs(UnmanagedType.IUnknown)] out object ppvResult); + public static extern HRESULT BindMoniker(IMoniker pmk, [Optional] uint grfOpt, in Guid iidResult, [MarshalAs(UnmanagedType.IUnknown)] out object? ppvResult); /// /// This function passes the foreground privilege (the privilege to set the foreground window) from one process to another. The @@ -831,7 +831,9 @@ public static partial class Ole32 // MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "f8a22f5f-a21f-49e7-bd6c-ca987206ee46")] - public static extern HRESULT CoGetInstanceFromFile([Optional] COSERVERINFO pServerInfo, in Guid pClsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, CLSCTX dwClsCtx, STGM grfMode, [MarshalAs(UnmanagedType.LPWStr)] string pwszName, uint dwCount, [In, Out] MULTI_QI[] pResults); + public static extern HRESULT CoGetInstanceFromFile([Optional] COSERVERINFO? pServerInfo, in Guid pClsid, + [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, CLSCTX dwClsCtx, STGM grfMode, + [MarshalAs(UnmanagedType.LPWStr)] string pwszName, uint dwCount, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] MULTI_QI[] pResults); /// Creates a new object and initializes it from a file using IPersistFile::Load. /// @@ -905,7 +907,9 @@ public static partial class Ole32 // MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "f8a22f5f-a21f-49e7-bd6c-ca987206ee46")] - public static extern HRESULT CoGetInstanceFromFile([Optional] COSERVERINFO pServerInfo, [Optional] IntPtr pClsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, CLSCTX dwClsCtx, STGM grfMode, [MarshalAs(UnmanagedType.LPWStr)] string pwszName, uint dwCount, [In, Out] MULTI_QI[] pResults); + public static extern HRESULT CoGetInstanceFromFile([Optional] COSERVERINFO? pServerInfo, [Optional] IntPtr pClsid, + [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, CLSCTX dwClsCtx, STGM grfMode, + [MarshalAs(UnmanagedType.LPWStr)] string pwszName, uint dwCount, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] MULTI_QI[] pResults); /// Creates a new object and initializes it from a storage object through an internal call to IPersistFile::Load. /// @@ -980,7 +984,9 @@ public static partial class Ole32 // dwCount, MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "6a77770c-b7e1-4d29-9c4b-331b5950a635")] - public static extern HRESULT CoGetInstanceFromIStorage([Optional] COSERVERINFO pServerInfo, in Guid pClsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, CLSCTX dwClsCtx, IStorage pstg, uint dwCount, [In, Out] MULTI_QI[] pResults); + public static extern HRESULT CoGetInstanceFromIStorage([Optional] COSERVERINFO? pServerInfo, in Guid pClsid, + [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, CLSCTX dwClsCtx, IStorage pstg, uint dwCount, + [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] MULTI_QI[] pResults); /// Creates a new object and initializes it from a storage object through an internal call to IPersistFile::Load. /// @@ -1055,7 +1061,9 @@ public static partial class Ole32 // dwCount, MULTI_QI *pResults ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "6a77770c-b7e1-4d29-9c4b-331b5950a635")] - public static extern HRESULT CoGetInstanceFromIStorage([Optional] COSERVERINFO pServerInfo, [Optional] IntPtr pClsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object punkOuter, CLSCTX dwClsCtx, IStorage pstg, uint dwCount, [In, Out] MULTI_QI[] pResults); + public static extern HRESULT CoGetInstanceFromIStorage([Optional] COSERVERINFO? pServerInfo, [Optional] IntPtr pClsid, + [MarshalAs(UnmanagedType.IUnknown), Optional] object? punkOuter, CLSCTX dwClsCtx, IStorage pstg, uint dwCount, + [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] MULTI_QI[] pResults); /// /// Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker. @@ -1115,7 +1123,8 @@ public static partial class Ole32 // *pBindOptions, REFIID riid, void **ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "0f5c9ef5-3918-4f93-bfd1-1017029b3dc1")] - public static extern HRESULT CoGetObject([MarshalAs(UnmanagedType.LPWStr)] string pszName, in BIND_OPTS pBindOptions, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); + public static extern HRESULT CoGetObject([MarshalAs(UnmanagedType.LPWStr)] string pszName, in BIND_OPTS pBindOptions, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown)] out object ppv); /// /// Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker. @@ -1175,67 +1184,8 @@ public static partial class Ole32 // *pBindOptions, REFIID riid, void **ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "0f5c9ef5-3918-4f93-bfd1-1017029b3dc1")] - public static extern HRESULT CoGetObject([MarshalAs(UnmanagedType.LPWStr)] string pszName, [In] BIND_OPTS_V pBindOptions, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); - - /// - /// Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker. - /// - /// The display name of the object to be created. - /// - /// The binding options used to create a moniker that creates the actual object. For details, see BIND_OPTS. This parameter can be NULL. - /// - /// A reference to the identifier of an interface that is implemented on the object to be created. - /// The address of a pointer to the interface specified by riid on the object that is created. - /// - /// - /// This function can return the standard return values E_FAIL, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values. - /// - /// - /// - /// Return code - /// Description - /// - /// - /// S_OK - /// The object was created successfully. - /// - /// - /// MK_E_SYNTAX - /// The pszName parameter is not a properly formed display name. - /// - /// - /// MK_E_NOOBJECT - /// - /// The object identified by this moniker, or some object identified by the composite moniker of which this moniker is a part, could - /// not be found. - /// - /// - /// - /// MK_E_EXCEEDEDDEADLINE - /// The binding operation could not be completed within the time limit specified by the BIND_OPTS structure passed in pBindOptions. - /// - /// - /// MK_E_CONNECTMANUALLY - /// - /// The binding operation requires assistance from the end user. The most common reasons for returning this value are that a - /// password is needed or that a floppy needs to be mounted. - /// - /// - /// - /// MK_E_INTERMEDIATEINTERFACENOTSUPPORTED - /// - /// An intermediate object was found but it did not support an interface required to complete the binding operation. For example, an - /// item moniker returns this value if its container does not support the IOleItemContainer interface. - /// - /// - /// - /// - /// CoGetObject encapsulates calls to the COM library functions CreateBindCtx, MkParseDisplayName, and IMoniker::BindToObject. - // https://docs.microsoft.com/en-us/windows/win32/api/objbase/nf-objbase-cogetobject HRESULT CoGetObject( LPCWSTR pszName, BIND_OPTS - // *pBindOptions, REFIID riid, void **ppv ); - [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("objbase.h", MSDNShortId = "0f5c9ef5-3918-4f93-bfd1-1017029b3dc1")] - public static extern HRESULT CoGetObject([MarshalAs(UnmanagedType.LPWStr)] string pszName, [Optional] IntPtr pBindOptions, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); + public static extern HRESULT CoGetObject([MarshalAs(UnmanagedType.LPWStr)] string pszName, [In, Optional] BIND_OPTS_V? pBindOptions, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown)] out object ppv); /// /// Returns the default values of the Security Descriptors of the machine-wide launch and access permissions, as well as launch and @@ -1383,7 +1333,7 @@ public static partial class Ole32 /// [DllImport(Lib.Ole32, ExactSpelling = true, CallingConvention = CallingConvention.StdCall, SetLastError = false)] [PInvokeData("Objbase.h", MSDNShortId = "ms695279")] - public static extern HRESULT CoInitializeEx([Optional] IntPtr pvReserved, COINIT coInit); + public static extern HRESULT CoInitializeEx([Optional] IntPtr pvReserved, COINIT coInit = COINIT.COINIT_MULTITHREADED); /// Registers security and sets the default security values for the process. /// @@ -1468,9 +1418,186 @@ public static partial class Ole32 // dwCapabilities, _In_opt_ void *pReserved3); https://msdn.microsoft.com/en-us/library/windows/desktop/ms693736(v=vs.85).aspx [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("Objbase.h", MSDNShortId = "ms693736")] - public static extern HRESULT CoInitializeSecurity([Optional] IntPtr pSecDesc, int cAuthSvc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] SOLE_AUTHENTICATION_SERVICE[] asAuthSvc, - [Optional] IntPtr pReserved1, RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, in SOLE_AUTHENTICATION_LIST pAuthList, EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities, - [Optional] IntPtr pReserved3); + public static extern HRESULT CoInitializeSecurity([Optional] PSECURITY_DESCRIPTOR pSecDesc, int cAuthSvc, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] SOLE_AUTHENTICATION_SERVICE[]? asAuthSvc, [Optional] IntPtr pReserved1, + RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, [In, Optional] SOLE_AUTHENTICATION_LIST? pAuthList, + EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities, IntPtr pReserved3 = default); + + /// Registers security and sets the default security values for the process. + /// + /// The access permissions that a server will use to receive calls. This parameter is used by COM only when a server calls + /// CoInitializeSecurity. Its value is a pointer to one of three types: an AppID, an IAccessControl object, or a + /// SECURITY_DESCRIPTOR, in absolute format. See the Remarks section for more information. + /// + /// + /// The count of entries in the asAuthSvc parameter. This parameter is used by COM only when a server calls + /// CoInitializeSecurity. If this parameter is 0, no authentication services will be registered and the server cannot receive + /// secure calls. A value of -1 tells COM to choose which authentication services to register, and if this is the case, the + /// asAuthSvc parameter must be NULL. However, Schannel will never be chosen as an authentication service by the server if + /// this parameter is -1. + /// + /// + /// An array of authentication services that a server is willing to use to receive a call. This parameter is used by COM only when a + /// server calls CoInitializeSecurity. For more information, see SOLE_AUTHENTICATION_SERVICE. + /// + /// This parameter is reserved and must be NULL. + /// + /// The default authentication level for the process. Both servers and clients use this parameter when they call + /// CoInitializeSecurity. COM will fail calls that arrive with a lower authentication level. By default, all proxies will use + /// at least this authentication level. This value should contain one of the authentication level constants. By default, all calls + /// to IUnknown are made at this level. + /// + /// + /// + /// The default impersonation level for proxies. The value of this parameter is used only when the process is a client. It should be + /// a value from the impersonation level constants, except for RPC_C_IMP_LEVEL_DEFAULT, which is not for use with CoInitializeSecurity. + /// + /// + /// Outgoing calls from the client always use the impersonation level as specified. (It is not negotiated.) Incoming calls to the + /// client can be at any impersonation level. By default, all IUnknown calls are made with this impersonation level, so even + /// security-aware applications should set this level carefully. To determine which impersonation levels each authentication service + /// supports, see the description of the authentication services in COM and Security Packages. For more information about + /// impersonation levels, see Impersonation. + /// + /// + /// + /// A pointer to SOLE_AUTHENTICATION_LIST, which is an array of SOLE_AUTHENTICATION_INFO structures. This list + /// indicates the information for each authentication service that a client can use to call a server. This parameter is used by COM + /// only when a client calls CoInitializeSecurity. + /// + /// + /// Additional capabilities of the client or server, specified by setting one or more EOLE_AUTHENTICATION_CAPABILITIES + /// values. Some of these value cannot be used simultaneously, and some cannot be set when particular authentication services are + /// being used. For more information about these flags, see the Remarks section. + /// + /// This parameter is reserved and must be NULL. + /// + /// This function can return the standard return value E_INVALIDARG, as well as the following values. + /// + /// + /// + /// Return code + /// Description + /// + /// + /// S_OK + /// Indicates success. + /// + /// + /// RPC_E_TOO_LATE + /// CoInitializeSecurity has already been called. + /// + /// + /// RPC_E_NO_GOOD_SECURITY_PACKAGES + /// + /// The asAuthSvc parameter was not NULL, and none of the authentication services in the list could be registered. Check the results + /// saved in asAuthSvc for authentication service–specific error codes. + /// + /// + /// + /// E_OUT_OF_MEMORY + /// Out of memory. + /// + /// + /// + /// + // HRESULT CoInitializeSecurity( _In_opt_ PSECURITY_DESCRIPTOR pSecDesc, _In_ LONG cAuthSvc, _In_opt_ SOLE_AUTHENTICATION_SERVICE + // *asAuthSvc, _In_opt_ void *pReserved1, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_opt_ void *pAuthList, _In_ DWORD + // dwCapabilities, _In_opt_ void *pReserved3); https://msdn.microsoft.com/en-us/library/windows/desktop/ms693736(v=vs.85).aspx + [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] + [PInvokeData("Objbase.h", MSDNShortId = "ms693736")] + public static extern HRESULT CoInitializeSecurity([Optional] IAccessControl? pSecDesc, int cAuthSvc, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] SOLE_AUTHENTICATION_SERVICE[]? asAuthSvc, [Optional] IntPtr pReserved1, + RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, [In, Optional] SOLE_AUTHENTICATION_LIST? pAuthList, + EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities = EOLE_AUTHENTICATION_CAPABILITIES.EOAC_ACCESS_CONTROL, IntPtr pReserved3 = default); + + /// Registers security and sets the default security values for the process. + /// + /// The access permissions that a server will use to receive calls. This parameter is used by COM only when a server calls + /// CoInitializeSecurity. Its value is a pointer to one of three types: an AppID, an IAccessControl object, or a + /// SECURITY_DESCRIPTOR, in absolute format. See the Remarks section for more information. + /// + /// + /// The count of entries in the asAuthSvc parameter. This parameter is used by COM only when a server calls + /// CoInitializeSecurity. If this parameter is 0, no authentication services will be registered and the server cannot receive + /// secure calls. A value of -1 tells COM to choose which authentication services to register, and if this is the case, the + /// asAuthSvc parameter must be NULL. However, Schannel will never be chosen as an authentication service by the server if + /// this parameter is -1. + /// + /// + /// An array of authentication services that a server is willing to use to receive a call. This parameter is used by COM only when a + /// server calls CoInitializeSecurity. For more information, see SOLE_AUTHENTICATION_SERVICE. + /// + /// This parameter is reserved and must be NULL. + /// + /// The default authentication level for the process. Both servers and clients use this parameter when they call + /// CoInitializeSecurity. COM will fail calls that arrive with a lower authentication level. By default, all proxies will use + /// at least this authentication level. This value should contain one of the authentication level constants. By default, all calls + /// to IUnknown are made at this level. + /// + /// + /// + /// The default impersonation level for proxies. The value of this parameter is used only when the process is a client. It should be + /// a value from the impersonation level constants, except for RPC_C_IMP_LEVEL_DEFAULT, which is not for use with CoInitializeSecurity. + /// + /// + /// Outgoing calls from the client always use the impersonation level as specified. (It is not negotiated.) Incoming calls to the + /// client can be at any impersonation level. By default, all IUnknown calls are made with this impersonation level, so even + /// security-aware applications should set this level carefully. To determine which impersonation levels each authentication service + /// supports, see the description of the authentication services in COM and Security Packages. For more information about + /// impersonation levels, see Impersonation. + /// + /// + /// + /// A pointer to SOLE_AUTHENTICATION_LIST, which is an array of SOLE_AUTHENTICATION_INFO structures. This list + /// indicates the information for each authentication service that a client can use to call a server. This parameter is used by COM + /// only when a client calls CoInitializeSecurity. + /// + /// + /// Additional capabilities of the client or server, specified by setting one or more EOLE_AUTHENTICATION_CAPABILITIES + /// values. Some of these value cannot be used simultaneously, and some cannot be set when particular authentication services are + /// being used. For more information about these flags, see the Remarks section. + /// + /// This parameter is reserved and must be NULL. + /// + /// This function can return the standard return value E_INVALIDARG, as well as the following values. + /// + /// + /// + /// Return code + /// Description + /// + /// + /// S_OK + /// Indicates success. + /// + /// + /// RPC_E_TOO_LATE + /// CoInitializeSecurity has already been called. + /// + /// + /// RPC_E_NO_GOOD_SECURITY_PACKAGES + /// + /// The asAuthSvc parameter was not NULL, and none of the authentication services in the list could be registered. Check the results + /// saved in asAuthSvc for authentication service–specific error codes. + /// + /// + /// + /// E_OUT_OF_MEMORY + /// Out of memory. + /// + /// + /// + /// + // HRESULT CoInitializeSecurity( _In_opt_ PSECURITY_DESCRIPTOR pSecDesc, _In_ LONG cAuthSvc, _In_opt_ SOLE_AUTHENTICATION_SERVICE + // *asAuthSvc, _In_opt_ void *pReserved1, _In_ DWORD dwAuthnLevel, _In_ DWORD dwImpLevel, _In_opt_ void *pAuthList, _In_ DWORD + // dwCapabilities, _In_opt_ void *pReserved3); https://msdn.microsoft.com/en-us/library/windows/desktop/ms693736(v=vs.85).aspx + [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] + [PInvokeData("Objbase.h", MSDNShortId = "ms693736")] + public static extern HRESULT CoInitializeSecurity(in Guid pSecDesc, int cAuthSvc, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] SOLE_AUTHENTICATION_SERVICE[]? asAuthSvc, [Optional] IntPtr pReserved1, + RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, [In, Optional] SOLE_AUTHENTICATION_LIST? pAuthList, + EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities = EOLE_AUTHENTICATION_CAPABILITIES.EOAC_APPID, IntPtr pReserved3 = default); /// Determines whether the specified CLSID represents an OLE 1 object. /// The CLSID to be checked. @@ -1664,7 +1791,7 @@ public static partial class Ole32 // LPMESSAGEFILTER lpMessageFilter, LPMESSAGEFILTER *lplpMessageFilter ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "caa5b277-ddbd-4ba9-892d-590d953b8433")] - public static extern HRESULT CoRegisterMessageFilter(IMessageFilter lpMessageFilter, out IMessageFilter lplpMessageFilter); + public static extern HRESULT CoRegisterMessageFilter(IMessageFilter? lpMessageFilter, out IMessageFilter lplpMessageFilter); /// Revokes a registered implementation of the IInitializeSpy interface. /// A ULARGE_INTEGER cookie identifying the registration. @@ -1865,7 +1992,7 @@ public static partial class Ole32 // *ppmk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "1f8fcbd6-8f05-4d32-af8a-d8de1b56dacf")] - public static extern HRESULT CreateAntiMoniker(out IMoniker ppmk); + public static extern HRESULT CreateAntiMoniker(out IMoniker? ppmk); /// /// Returns a pointer to an implementation of IBindCtx (a bind context object). This object stores information about a particular @@ -1880,7 +2007,7 @@ public static partial class Ole32 /// This function can return the standard return values E_OUTOFMEMORY and S_OK. [DllImport(Lib.Ole32, ExactSpelling = true)] [PInvokeData("Objbase.h", MSDNShortId = "ms678542")] - public static extern HRESULT CreateBindCtx([Optional] uint reserved, out IBindCtx ppbc); + public static extern HRESULT CreateBindCtx([Optional] uint reserved, out IBindCtx? ppbc); /// Creates a class moniker that refers to the specified class. /// A reference to the CLSID of the object type to which this moniker binds. @@ -1911,7 +2038,7 @@ public static partial class Ole32 // rclsid, LPMONIKER *ppmk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "9361b2c1-ef26-4225-92ff-e0bef0285bc4")] - public static extern HRESULT CreateClassMoniker(in Guid rclsid, out IMoniker ppmk); + public static extern HRESULT CreateClassMoniker(in Guid rclsid, out IMoniker? ppmk); /// Retrieves a pointer to a new instance of an OLE-provided implementation of a data cache. /// @@ -1956,7 +2083,8 @@ public static partial class Ole32 // pUnkOuter, REFCLSID rclsid, REFIID iid, LPVOID *ppv ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "8a64675b-1337-4555-b9a6-e19f9b987ba2")] - public static extern HRESULT CreateDataCache([MarshalAs(UnmanagedType.IUnknown), Optional] object pUnkOuter, in Guid rclsid, in Guid iid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv); + public static extern HRESULT CreateDataCache([MarshalAs(UnmanagedType.IUnknown), Optional] object? pUnkOuter, in Guid rclsid, in Guid iid, + [MarshalAs(UnmanagedType.IUnknown)] out object? ppv); /// Creates a file moniker based on the specified path. /// @@ -2014,7 +2142,7 @@ public static partial class Ole32 // lpszPathName, LPMONIKER *ppmk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "d9677fa0-cda0-4b63-a21f-1fd0e27c8f3f")] - public static extern HRESULT CreateFileMoniker([MarshalAs(UnmanagedType.LPWStr)] string lpszPathName, out IMoniker ppmk); + public static extern HRESULT CreateFileMoniker([MarshalAs(UnmanagedType.LPWStr)] string lpszPathName, out IMoniker? ppmk); /// Performs a generic composition of two monikers and supplies a pointer to the resulting composite moniker. /// @@ -2076,7 +2204,7 @@ public static partial class Ole32 // LPMONIKER pmkFirst, LPMONIKER pmkRest, LPMONIKER *ppmkComposite ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "7fe5b3ff-6e9b-4a28-93d3-52c76d3e8b77")] - public static extern HRESULT CreateGenericComposite(IMoniker pmkFirst, IMoniker pmkRest, out IMoniker ppmkComposite); + public static extern HRESULT CreateGenericComposite(IMoniker pmkFirst, IMoniker pmkRest, out IMoniker? ppmkComposite); /// Creates an item moniker that identifies an object within a containing object (typically a compound document). /// @@ -2129,7 +2257,7 @@ public static partial class Ole32 // lpszDelim, LPCOLESTR lpszItem, LPMONIKER *ppmk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "339919ed-660c-4239-825b-7fa96c48e5cd")] - public static extern HRESULT CreateItemMoniker([MarshalAs(UnmanagedType.LPWStr)] string lpszDelim, [MarshalAs(UnmanagedType.LPWStr)] string lpszItem, out IMoniker ppmk); + public static extern HRESULT CreateItemMoniker([MarshalAs(UnmanagedType.LPWStr)] string lpszDelim, [MarshalAs(UnmanagedType.LPWStr)] string lpszItem, out IMoniker? ppmk); /// Creates an OBJREF moniker based on a pointer to an object. /// A pointer to the IUnknown interface on the object that the moniker is to represent. @@ -2190,7 +2318,7 @@ public static partial class Ole32 // LPUNKNOWN punk, LPMONIKER *ppmk ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "d4d40fd5-6035-4ddc-a443-01d32dcf4bca")] - public static extern HRESULT CreatePointerMoniker([MarshalAs(UnmanagedType.IUnknown)] object punk, out IMoniker ppmk); + public static extern HRESULT CreatePointerMoniker([MarshalAs(UnmanagedType.IUnknown)] object punk, out IMoniker? ppmk); /// Returns the CLSID associated with the specified file name. /// A pointer to the filename for which you are requesting the associated CLSID. @@ -2472,7 +2600,7 @@ public static partial class Ole32 // LPMONIKER pmkThis, LPMONIKER pmkOther, LPMONIKER *ppmkCommon ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "6caa8c2e-c3d6-45d5-8efe-74d6a2c4a926")] - public static extern HRESULT MonikerCommonPrefixWith(IMoniker pmkThis, IMoniker pmkOther, out IMoniker ppmkCommon); + public static extern HRESULT MonikerCommonPrefixWith(IMoniker pmkThis, IMoniker pmkOther, out IMoniker? ppmkCommon); /// /// @@ -2537,7 +2665,8 @@ public static partial class Ole32 // LPMONIKER pmkSrc, LPMONIKER pmkDest, LPMONIKER *ppmkRelPath, BOOL dwReserved ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("objbase.h", MSDNShortId = "55ab4db3-a94e-48ba-abe3-44963c35e062")] - public static extern HRESULT MonikerRelativePathTo(IMoniker pmkSrc, IMoniker pmkDest, out IMoniker ppmkRelPath, [MarshalAs(UnmanagedType.Bool)] bool dwReserved = false); + public static extern HRESULT MonikerRelativePathTo(IMoniker pmkSrc, IMoniker pmkDest, out IMoniker? ppmkRelPath, + [MarshalAs(UnmanagedType.Bool)] bool dwReserved = false); /// Provides a CO_MTA_USAGE_COOKIE. [StructLayout(LayoutKind.Sequential)] @@ -2550,7 +2679,7 @@ public static partial class Ole32 public CO_MTA_USAGE_COOKIE(IntPtr preexistingHandle) => handle = preexistingHandle; /// Returns an invalid handle by instantiating a object with . - public static CO_MTA_USAGE_COOKIE NULL => new CO_MTA_USAGE_COOKIE(IntPtr.Zero); + public static CO_MTA_USAGE_COOKIE NULL => new(IntPtr.Zero); /// Gets a value indicating whether this instance is a null handle. public bool IsNull => handle == IntPtr.Zero; @@ -2563,7 +2692,7 @@ public static partial class Ole32 /// Performs an implicit conversion from to . /// The pointer to a handle. /// The result of the conversion. - public static implicit operator CO_MTA_USAGE_COOKIE(IntPtr h) => new CO_MTA_USAGE_COOKIE(h); + public static implicit operator CO_MTA_USAGE_COOKIE(IntPtr h) => new(h); /// Implements the operator !=. /// The first handle. @@ -2578,7 +2707,7 @@ public static partial class Ole32 public static bool operator ==(CO_MTA_USAGE_COOKIE h1, CO_MTA_USAGE_COOKIE h2) => h1.Equals(h2); /// - public override bool Equals(object obj) => obj is CO_MTA_USAGE_COOKIE h ? handle == h.handle : false; + public override bool Equals(object? obj) => obj is CO_MTA_USAGE_COOKIE h && handle == h.handle; /// public override int GetHashCode() => handle.GetHashCode(); @@ -2680,7 +2809,7 @@ public static partial class Ole32 /// The name of the computer. [MarshalAs(UnmanagedType.LPWStr)] - public string pwszName; + public string? pwszName; /// /// A pointer to a COAUTHINFO structure to override the default activation security for machine remote activations. Otherwise, diff --git a/PInvoke/Ole/Ole32/ObjIdl.cs b/PInvoke/Ole/Ole32/ObjIdl.cs index 22bea7bc..4de87664 100644 --- a/PInvoke/Ole/Ole32/ObjIdl.cs +++ b/PInvoke/Ole/Ole32/ObjIdl.cs @@ -605,7 +605,7 @@ public static partial class Ole32 // LPOLESTR pszKey, IUnknown **ppunk ); [PInvokeData("objidl.h", MSDNShortId = "8f423495-7a34-4901-968e-1fe204680d8a")] [PreserveSig] - HRESULT GetObjectParam([MarshalAs(UnmanagedType.LPWStr)] string pszKey, [MarshalAs(UnmanagedType.Interface)] out object ppunk); + HRESULT GetObjectParam([MarshalAs(UnmanagedType.LPWStr)] string pszKey, [MarshalAs(UnmanagedType.Interface)] out object? ppunk); /// /// Retrieves a pointer to an interface that can be used to enumerate the keys of the bind context's string-keyed table of pointers. @@ -633,7 +633,7 @@ public static partial class Ole32 // IEnumString **ppenum ); [PInvokeData("objidl.h", MSDNShortId = "9e799ce4-e9b3-4b31-98a0-2167a0c19848")] [PreserveSig] - HRESULT EnumObjectParam(out IEnumString ppenum); + HRESULT EnumObjectParam(out IEnumString? ppenum); /// /// Removes the specified key and its associated pointer from the bind context's string-keyed table of objects. The key must @@ -802,7 +802,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-idataadviseholder-advise HRESULT Advise( IDataObject // *pDataObject, FORMATETC *pFetc, DWORD advf, IAdviseSink *pAdvise, DWORD *pdwConnection ); [PreserveSig] - HRESULT Advise([Optional] IDataObject pDataObject, in FORMATETC pFetc, ADVF advf, IAdviseSink pAdvise, out uint pdwConnection); + HRESULT Advise([Optional] IDataObject? pDataObject, in FORMATETC pFetc, ADVF advf, IAdviseSink pAdvise, out uint pdwConnection); /// /// Removes a connection between a data object and an advisory sink that was set up through a previous call to @@ -850,7 +850,7 @@ public static partial class Ole32 // https://docs.microsoft.com/zh-cn/windows/win32/api/objidl/nf-objidl-idataadviseholder-enumadvise HRESULT EnumAdvise( // IEnumSTATDATA **ppenumAdvise ); [PreserveSig] - HRESULT EnumAdvise(out IEnumSTATDATA ppenumAdvise); + HRESULT EnumAdvise(out IEnumSTATDATA? ppenumAdvise); /// /// Sends notifications to each advise sink for which there is a connection established by calling the IAdviseSink::OnDataChange @@ -885,7 +885,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-idataadviseholder-sendondatachange HRESULT // SendOnDataChange( IDataObject *pDataObject, DWORD dwReserved, DWORD advf ); [PreserveSig] - HRESULT SendOnDataChange(IDataObject pDataObject, [Optional] uint dwReserved, ADVF advf); + HRESULT SendOnDataChange(IDataObject pDataObject, [Optional] uint dwReserved, [Optional] ADVF advf); } /// @@ -1539,7 +1539,7 @@ public static partial class Ole32 // https://learn.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-idataobject-dadvise HRESULT DAdvise( [in] FORMATETC // *pformatetc, [in] DWORD advf, [in] IAdviseSink *pAdvSink, [out] DWORD *pdwConnection ); [PreserveSig] - HRESULT DAdvise(in FORMATETC pformatetc, ADVF advf, [In, Optional, MarshalAs(UnmanagedType.Interface)] IAdviseSink pAdvSink, out uint pdwConnection); + HRESULT DAdvise(in FORMATETC pformatetc, ADVF advf, [In, Optional, MarshalAs(UnmanagedType.Interface)] IAdviseSink? pAdvSink, out uint pdwConnection); /// Destroys a notification connection that had been previously set up. /// @@ -1618,7 +1618,7 @@ public static partial class Ole32 // https://learn.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-idataobject-enumdadvise HRESULT EnumDAdvise( [out] // IEnumSTATDATA **ppenumAdvise ); [PreserveSig] - HRESULT EnumDAdvise([Optional, MarshalAs(UnmanagedType.Interface)] out IEnumSTATDATA ppenumAdvise); + HRESULT EnumDAdvise([Optional, MarshalAs(UnmanagedType.Interface)] out IEnumSTATDATA? ppenumAdvise); } /// diff --git a/PInvoke/Ole/Ole32/ObjIdl2.cs b/PInvoke/Ole/Ole32/ObjIdl2.cs index 5fac7708..b85edd48 100644 --- a/PInvoke/Ole/Ole32/ObjIdl2.cs +++ b/PInvoke/Ole/Ole32/ObjIdl2.cs @@ -497,7 +497,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-imessagefilter-handleincomingcall DWORD // HandleInComingCall( DWORD dwCallType, HTASK htaskCaller, DWORD dwTickCount, LPINTERFACEINFO lpInterfaceInfo ); [PreserveSig] - SERVERCALL HandleInComingCall(CALLTYPE dwCallType, HTASK htaskCaller, uint dwTickCount, [Optional] INTERFACEINFO lpInterfaceInfo); + SERVERCALL HandleInComingCall(CALLTYPE dwCallType, HTASK htaskCaller, uint dwTickCount, [Optional] INTERFACEINFO? lpInterfaceInfo); /// /// Provides applications with an opportunity to display a dialog box offering retry, cancel, or task-switching options. @@ -1039,7 +1039,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-ipersiststorage-savecompleted HRESULT SaveCompleted( // IStorage *pStgNew ); - void SaveCompleted([In] IStorage pStgNew); + void SaveCompleted([In] IStorage? pStgNew); /// /// Instructs the object to release all storage objects that have been passed to it by its container and to enter HandsOff mode. @@ -1501,7 +1501,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-irunnableobject-run HRESULT Run( LPBINDCTX pbc ); [PreserveSig] - HRESULT Run(IBindCtx pbc); + HRESULT Run(IBindCtx? pbc); /// Determines whether an object is currently in the running state. /// If the object is in the running state, the return value is TRUE. Otherwise, it is FALSE. diff --git a/PInvoke/Ole/Ole32/ObjIdl3.cs b/PInvoke/Ole/Ole32/ObjIdl3.cs index e5fac7c3..edb5282a 100644 --- a/PInvoke/Ole/Ole32/ObjIdl3.cs +++ b/PInvoke/Ole/Ole32/ObjIdl3.cs @@ -194,47 +194,32 @@ public static partial class Ole32 /// /// A pointer to the IMoniker interface on the moniker. /// - /// This method can return the following values. - /// - /// - /// Return code - /// Description - /// - /// - /// S_OK - /// Indicates that pmkObjectName was found in the ROT and a pointer was retrieved. - /// - /// - /// S_FALSE - /// - /// There is no entry for pmkObjectName in the ROT, or that the object it identifies is no longer running (in which case, the - /// entry is revoked). - /// - /// - /// + /// A pointer to an IUnknown pointer variable that receives the interface pointer to the running object. When successful, the + /// implementation calls AddRef on the object; it is the caller's responsibility to call Release. If the object is not running or if + /// an error occurs, the implementation sets * ppunkObject to NULL. /// /// /// - /// This method checks the ROT for the moniker specified by pmkObjectName. If that moniker had previously been registered with a - /// call to IRunningObjectTable::Register, this method returns the pointer that was registered at that time. + /// This method checks the ROT for the moniker specified by pmkObjectName. If that moniker had previously been registered with + /// a call to IRunningObjectTable::Register, this method returns the pointer that was registered at that time. /// /// Notes to Callers /// - /// Generally, you call the IRunningObjectTable::GetObject method only if you are writing your own moniker class (that - /// is, implementing the IMoniker interface). You typically call this method from your implementation of IMoniker::BindToObject. + /// Generally, you call the IRunningObjectTable::GetObject method only if you are writing your own moniker class (that is, + /// implementing the IMoniker interface). You typically call this method from your implementation of IMoniker::BindToObject. /// /// - /// However, note that not all implementations of IMoniker::BindToObject need to call this method. If you expect your moniker to - /// have a prefix (indicated by a non- NULL pmkToLeft parameter to IMoniker::BindToObject), you should not check - /// the ROT. The reason for this is that only complete monikers are registered with the ROT, and if your moniker has a prefix, - /// your moniker is part of a composite and thus not complete. Instead, your moniker should request services from the object - /// identified by the prefix (for example, the container of the object identified by your moniker). + /// However, note that not all implementations of IMoniker::BindToObject need to call this method. If you expect your moniker to have + /// a prefix (indicated by a non- NULLpmkToLeft parameter to IMoniker::BindToObject), you should not check the + /// ROT. The reason for this is that only complete monikers are registered with the ROT, and if your moniker has a prefix, your + /// moniker is part of a composite and thus not complete. Instead, your moniker should request services from the object identified by + /// the prefix (for example, the container of the object identified by your moniker). /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-irunningobjecttable-getobject HRESULT GetObject( - // IMoniker *pmkObjectName, IUnknown **ppunkObject ); + // https://learn.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-irunningobjecttable-getobject + // HRESULT GetObject( [in] IMoniker *pmkObjectName, [out] IUnknown **ppunkObject ); [return: MarshalAs(UnmanagedType.IUnknown)] - object GetObject([In] IMoniker pmkObjectName); + object? GetObject([In] IMoniker pmkObjectName); /// /// Records the time that a running object was last modified. The object must have previously been registered with the running @@ -313,7 +298,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-irunningobjecttable-enumrunning HRESULT EnumRunning( // IEnumMoniker **ppenumMoniker ); - IEnumMoniker EnumRunning(); + IEnumMoniker? EnumRunning(); } /// @@ -363,9 +348,7 @@ public static partial class Ole32 [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.Interface)] IStream CreateStream([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, - [In] STGM grfMode, - [In, Optional] uint reserved1, - [In, Optional] uint reserved2); + [In] STGM grfMode, [In, Optional] uint reserved1, [In, Optional] uint reserved2); /// The OpenStream method opens an existing stream object within this storage object in the specified access mode. /// @@ -383,8 +366,7 @@ public static partial class Ole32 [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.Interface)] IStream OpenStream([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, [In, Optional] IntPtr reserved1, - [In] STGM grfMode, - [In, Optional] uint reserved2); + [In] STGM grfMode, [In, Optional] uint reserved2); /// /// The CreateStorage method creates and opens a new storage object nested within this storage object with the specified name in @@ -405,9 +387,7 @@ public static partial class Ole32 /// On return, the new IStorage interface pointer. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.Interface)] - IStorage CreateStorage([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, - [In] STGM grfMode, - [In, Optional] uint reserved1, + IStorage CreateStorage([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, [In] STGM grfMode, [In, Optional] uint reserved1, [In, Optional] uint reserved2); /// The OpenStorage method opens an existing storage object with the specified name in the specified access mode. @@ -426,11 +406,8 @@ public static partial class Ole32 /// On return, the IStorage interface pointer to the opened storage. [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.Interface)] - IStorage OpenStorage([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, - [In, Optional, MarshalAs(UnmanagedType.Interface)] IStorage pstgPriority, - [In] STGM grfMode, - [In, Optional] SNB snbExclude, - [In, Optional] uint reserved); + IStorage OpenStorage([In, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, [In, Optional, MarshalAs(UnmanagedType.Interface)] IStorage? pstgPriority, + [In] STGM grfMode, [In, Optional] SNB? snbExclude, [In, Optional] uint reserved); /// The CopyTo method copies the entire contents of an open storage object to another storage object. /// @@ -455,10 +432,8 @@ public static partial class Ole32 /// calling its IStorage::Revert method. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CopyTo([In, Optional] uint ciidExclude, - [In, Optional, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] Guid[]? rgiidExclude, - [In] SNB snbExclude, - [In, MarshalAs(UnmanagedType.Interface)] IStorage pstgDest); + void CopyTo([In, Optional] uint ciidExclude, [In, Optional, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] Guid[]? rgiidExclude, + [In, Optional] SNB? snbExclude, [In, MarshalAs(UnmanagedType.Interface)] IStorage pstgDest); /// /// The MoveElementTo method copies or moves a substorage or stream from this storage object to another storage object. @@ -470,9 +445,8 @@ public static partial class Ole32 /// Specifies whether the operation should be a move (STGMOVE_MOVE) or a copy (STGMOVE_COPY). See the STGMOVE enumeration. /// [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void MoveElementTo([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, - [In, MarshalAs(UnmanagedType.Interface)] IStorage pstgDest, [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsNewName, - [In] STGMOVE grfFlags); + void MoveElementTo([In, MarshalAs(UnmanagedType.LPWStr)] string pwcsName, [In, MarshalAs(UnmanagedType.Interface)] IStorage pstgDest, + [In, MarshalAs(UnmanagedType.LPWStr)] string pwcsNewName, [In] STGMOVE grfFlags); /// /// The Commit method ensures that any changes made to a storage object open in transacted mode are reflected in the parent @@ -657,7 +631,7 @@ public static partial class Ole32 /// /// The instance. /// The enumerated values. - public static IEnumerable Enumerate(this IEnumUnknown e) where T : class => e.Enumerate().Select(p => p == IntPtr.Zero ? null : (T)Marshal.GetObjectForIUnknown(p)); + public static IEnumerable Enumerate(this IEnumUnknown e) where T : class => e.Enumerate().Select(p => p == IntPtr.Zero ? null : (T)Marshal.GetObjectForIUnknown(p)); /// Structure returned by IEnumContextProps::Enum [PInvokeData("objidl.h", MSDNShortId = "64591e45-5478-4360-8c1f-08b09b5aef8e")] @@ -691,35 +665,67 @@ public static partial class Ole32 // tdSize; WORD tdDriverNameOffset; WORD tdDeviceNameOffset; WORD tdPortNameOffset; WORD tdExtDevmodeOffset; BYTE tdData[1]; } DVTARGETDEVICE; [PInvokeData("objidl.h", MSDNShortId = "724ff714-c170-4d06-92cb-e042e41c0af2")] [StructLayout(LayoutKind.Sequential)] - public struct DVTARGETDEVICE + public class DVTARGETDEVICE : SafeCoTaskMemHandle { - /// - /// The size, in bytes, of the DVTARGETDEVICE structure. The initial size is included so the structure can be copied more easily. - /// - public uint tdSize; + private const int structSz = 13; + private readonly List names = new() { "", null, null }; + private readonly ushort dataOff = 12, nameOff; + + /// Initializes a new instance of the class. + public DVTARGETDEVICE() : base(structSz + Marshal.SizeOf(typeof(DEVMODE)) + 8) + { + nameOff = (ushort)(dataOff + Marshal.SizeOf(typeof(DEVMODE))); + Write((uint)structSz, false, 0); // tdSize + Write(dataOff, false, 10); // tdExtDevmodeOffset + UpdateNames(); + } + + /// Initializes a new instance of the class with values. + /// Name of the driver. + /// Name of the device. + /// Name of the port. + /// The DEVMODE structure reference retrieved by calling DocumentProperties. + public DVTARGETDEVICE(string driverName, string? deviceName, string? portName, DEVMODE? devMode = null) : this() + { + names[0] = driverName; + names[1] = deviceName; + names[2] = portName; + UpdateNames(); + if (devMode.HasValue) + Write(devMode.Value, false, dataOff); + } + + private void UpdateNames() + { + using SafeCoTaskMemHandle mem = CreateFromStringList(names.Select(n => n ?? ""), StringListPackMethod.Concatenated, CharSet.Unicode); + Size = (uint)nameOff + mem.Size; + mem.DangerousGetHandle().CopyTo(handle.Offset(nameOff), mem.Size); + + var off = nameOff; + mem.Write(off, false, 4); // tdDriverNameOffset + off += (ushort)names[0].GetByteCount(true, CharSet.Unicode); + mem.Write(names[1] is null ? 0 : off, false, 6); // tdDeviceNameOffset + off += (ushort)(names[1] ?? "").GetByteCount(true, CharSet.Unicode); + mem.Write(names[2] is null ? 0 : off, false, 8); // tdPortNameOffset + } /// - /// The offset, in bytes, from the beginning of the structure to the device driver name, which is stored as a NULL-terminated - /// string in the tdData buffer. + /// The device driver name. /// - public ushort tdDriverNameOffset; + public string tdDriverName { get => names[0]!; set { names[0] = value ?? throw new ArgumentNullException(); UpdateNames(); } } /// - /// The offset, in bytes, from the beginning of the structure to the device name, which is stored as a NULL-terminated string in - /// the tdData buffer. This value can be zero to indicate no device name. + /// The device name, which can be to indicate no device name. /// - public ushort tdDeviceNameOffset; + public string? tdDeviceName { get => names[1] == string.Empty ? null : names[1]; set { names[1] = value; UpdateNames(); } } /// - /// The offset, in bytes, from the beginning of the structure to the port name, which is stored as a NULL-terminated string in - /// the tdData buffer. This value can be zero to indicate no port name. + /// The port name, which can be to indicate no port name. /// - public ushort tdPortNameOffset; + public string? tdPortName { get => names[2] == string.Empty ? null : names[2]; set { names[2] = value; UpdateNames(); } } - /// The offset, in bytes, from the beginning of the structure to the DEVMODE structure retrieved by calling DocumentProperties. - public ushort tdExtDevmodeOffset; - - private byte _tdData; + /// The DEVMODE structure reference retrieved by calling DocumentProperties. + public ref DEVMODE tdExtDevmode => ref handle.AsRef(dataOff, Size); } /// @@ -863,7 +869,8 @@ public static partial class Ole32 /// The instance. /// The result of the conversion. public static implicit operator System.Runtime.InteropServices.ComTypes.BIND_OPTS(BIND_OPTS_V bo) => - new System.Runtime.InteropServices.ComTypes.BIND_OPTS { cbStruct = (int)bo.cbStruct, grfFlags = (int)bo.grfFlags, grfMode = (int)bo.grfFlags, dwTickCountDeadline = (int)bo.dwTickCountDeadline }; + new() + { cbStruct = (int)bo.cbStruct, grfFlags = (int)bo.grfFlags, grfMode = (int)bo.grfFlags, dwTickCountDeadline = (int)bo.dwTickCountDeadline }; /// /// Performs an implicit conversion from to . @@ -871,7 +878,7 @@ public static partial class Ole32 /// The instance. /// The result of the conversion. public static implicit operator BIND_OPTS_V(System.Runtime.InteropServices.ComTypes.BIND_OPTS bo) => - new BIND_OPTS_V() { grfFlags = (BIND_FLAGS)bo.grfFlags, grfMode = (STGM)bo.grfFlags, dwTickCountDeadline = (uint)bo.dwTickCountDeadline }; + new() { grfFlags = (BIND_FLAGS)bo.grfFlags, grfMode = (STGM)bo.grfFlags, dwTickCountDeadline = (uint)bo.dwTickCountDeadline }; } /// Contains parameters used during a moniker-binding operation. @@ -969,8 +976,8 @@ public static partial class Ole32 /// Simple generic implementation of . /// The type to enumerate. - /// - /// + /// + /// public class IEnumUnknownImpl : IReadOnlyList, IEnumUnknown where T : class { private int current = -1; @@ -1073,7 +1080,8 @@ public static partial class Ole32 public class INTERFACEINFO { /// A pointer to the IUnknown interface on the object. - [MarshalAs(UnmanagedType.IUnknown)] public object pUnk; + [MarshalAs(UnmanagedType.IUnknown)] + public object? pUnk; /// The identifier of the requested interface. public Guid iid; @@ -1087,7 +1095,7 @@ public static partial class Ole32 /// used by the IStorage interface and by function calls that open storage objects. The strings point to contained storage objects /// or streams that are to be excluded in the open calls. /// - /// + /// [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public class SNB : IDisposable { @@ -1095,10 +1103,10 @@ public static partial class Ole32 /// Initializes a new instance of the class. /// The list of names to associate with this instance. - public SNB(IEnumerable names) => ptr = names == null ? SafeCoTaskMemHandle.Null : SafeCoTaskMemHandle.CreateFromStringList(names, StringListPackMethod.Packed, CharSet.Unicode); + public SNB(IEnumerable names) => ptr = names == null ? SafeCoTaskMemHandle.Null : SafeCoTaskMemHandle.CreateFromStringList(names!, StringListPackMethod.Packed, CharSet.Unicode); /// Prevents a default instance of the class from being created. - private SNB() { } + private SNB() => ptr = SafeCoTaskMemHandle.Null; /// Initializes a new instance of the class. /// The native pointer. @@ -1106,19 +1114,19 @@ public static partial class Ole32 /// Gets the names. /// The names. - public IEnumerable Names => ptr.ToStringEnum(Count, CharSet.Unicode); + public IEnumerable Names => ptr.ToStringEnum(Count, CharSet.Unicode); private int Count => ptr.DangerousGetHandle().GetNulledPtrArrayLength(); /// Performs an implicit conversion from to . /// The native pointer to take ownership of. /// The result of the conversion. - public static implicit operator SNB(IntPtr p) => new SNB(p); + public static implicit operator SNB(IntPtr p) => new(p); /// Performs an implicit conversion from to . /// The names. /// The result of the conversion. - public static implicit operator SNB(string[] names) => new SNB(names); + public static implicit operator SNB(string?[] names) => new(names); /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. void IDisposable.Dispose() => ptr?.Dispose(); diff --git a/PInvoke/Ole/Ole32/ObjIdlBase.cs b/PInvoke/Ole/Ole32/ObjIdlBase.cs index ace7a186..bae35180 100644 --- a/PInvoke/Ole/Ole32/ObjIdlBase.cs +++ b/PInvoke/Ole/Ole32/ObjIdlBase.cs @@ -294,7 +294,7 @@ public static partial class Ole32 public enum RPCOPT_PROPERTIES { /// Controls how long your machine will attempt to establish RPC communications with another before failing. - [CorrespondingType(typeof(Rpc.RCP_C_BINDING_TIMEOUT), CorrespondingAction.GetSet)] + [CorrespondingType(typeof(RCP_C_BINDING_TIMEOUT), CorrespondingAction.GetSet)] COMBND_RPCTIMEOUT = 0x01, /// Describes the degree of remoteness of the RPC connection. @@ -420,7 +420,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-icallfactory-createcall HRESULT CreateCall( REFIID riid, // IUnknown *pCtrlUnk, REFIID riid2, IUnknown **ppv ); [PreserveSig] - HRESULT CreateCall(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] object pCtrlUnk, + HRESULT CreateCall(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] object? pCtrlUnk, in Guid riid2, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 2)] out object ppv); } @@ -799,7 +799,7 @@ public static partial class Ole32 // *pAuthInfo, DWORD dwCapabilities ); [PreserveSig] HRESULT SetBlanket([In, MarshalAs(UnmanagedType.IUnknown)] object pProxy, RPC_C_AUTHN dwAuthnSvc, RPC_C_AUTHZ dwAuthzSvc, - [MarshalAs(UnmanagedType.LPWStr)] string pServerPrincName, RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, + [MarshalAs(UnmanagedType.LPWStr)] string? pServerPrincName, RPC_C_AUTHN_LEVEL dwAuthnLevel, RPC_C_IMP_LEVEL dwImpLevel, [In, Optional] IntPtr pAuthInfo, EOLE_AUTHENTICATION_CAPABILITIES dwCapabilities); /// Makes a private copy of the proxy for the specified interface. @@ -1398,58 +1398,133 @@ public static partial class Ole32 /// Values /// /// - /// COMGLB_APPID - /// The AppID for the process. This is the only supported property on Windows XP. + /// COMGLB_APPID + /// The AppID for the process. This is the only supported property on Windows XP. /// /// - /// COMGLB_EXCEPTION_HANDLING - /// - /// Possible values for the COMGLB_EXCEPTION_HANDLING property are: By default, the COM runtime handles fatal exceptions raised - /// during method invocations by returning the RPC_E_SERVERFAULT error code to the client. An application disables this behavior to - /// allow exceptions to propagate to WER, which creates application process dumps and terminates the application. This prevents - /// possible data corruption and allows an application vendor to debug the dumps. For new applications, it is recommended that the - /// COMGLB_EXCEPTION_HANDLING property be set to COMGLB_EXCEPTION_DONOT_HANDLE_ANY. - /// - /// + /// COMGLB_EXCEPTION_HANDLING + /// + /// Possible values for the COMGLB_EXCEPTION_HANDLING property are: + /// + /// COMGLB_EXCEPTION_HANDLE: This is the default behavior. This setting causes the COM runtime to handle fatal exceptions. + /// COMGLB_EXCEPTION_DONOT_HANDLE: This causes the COM runtime not to handle fatal exceptions. + /// COMGLB_EXCEPTION_DONOT_HANDLE_FATAL: Alias for COMGLB_EXCEPTION_DONOT_HANDLE. Supported in Windows 7 and later. /// - /// COMGLB_RPC_THREADPOOL_SETTING - /// - /// Possible values for the COMGLB_RPC_THREADPOOL_SETTING property in the Set method are: Possible values for the - /// COMGLB_RPC_THREADPOOL_SETTING property in the Query method are: RPC uses the system thread pool by default in Windows 7. Since - /// the system thread pool is shared by multiple components in the process, COM and RPC operations may behave incorrectly if the - /// thread pool state is corrupted by a component. The COMGLB_RPC_THREADPOOL_SETTING property can be used to change the RPC thread - /// pool behavior. Changing the default behavior will incur a performance penalty since this causes RPC to use an extra thread. - /// Therefore, care should be exercised when changing this setting. It is recommended that this setting is changed only for - /// application compatibility reasons. Note This property is only supported in Windows 7 and later versions of Windows. - /// - /// - /// - /// COMGLB_RO_SETTINGS - /// - /// Possible values for the COMGLB_RO_SETTINGS property are: Note This property is only supported in Windows 8 and later versions of Windows. - /// - /// - /// - /// COMGLB_UNMARSHALING_POLICY - /// - /// Possible values for the COMGLB_UNMARSHALING_POLICY property are: Note This property is only supported in Windows 8 and later - /// versions of Windows. - /// + /// COMGLB_EXCEPTION_DONOT_HANDLE_ANY: When set and a fatal exception occurs in a COM method, this causes the COM runtime to not handle + /// the exception.
When set and a non-fatal exception occurs in a COM method, this causes the COM runtime to create a Windows Error + /// Reporting (WER) dump and terminate the process. Supported in Windows 7 and later. ///
///
/// - /// It's important for applications that detect crashes and other exceptions that might be generated while executing inbound COM - /// calls, for example a call on a local server or when executing the IDropTarget::Drop method, to set COMGLB_EXCEPTION_HANDLING to - /// COMGLB_EXCEPTION_DONOT_HANDLE to disable COM behavior of catching exceptions. Failure to do this can lead to corrupt process - /// state, for example locks held when these exceptions are thrown are abandoned, and the process could enter an inconsistent state. + /// By default, the COM runtime handles fatal exceptions raised during method invocations by returning the RPC_E_SERVERFAULT error code + /// to the client. An application disables this behavior to allow exceptions to propagate to WER, which creates application process dumps + /// and terminates the application. This prevents possible data corruption and allows an application vendor to debug the dumps. + /// + /// + /// Even if COM runtime exception handling is disabled, exceptions might not propagate to WER if there is another + /// application-level exception handler in the process that handles the exception. + /// + /// For new applications, it is recommended that the COMGLB_EXCEPTION_HANDLING property be set to COMGLB_EXCEPTION_DONOT_HANDLE_ANY. + ///
+ /// + /// + /// COMGLB_RPC_THREADPOOL_SETTING + /// + /// Possible values for the COMGLB_RPC_THREADPOOL_SETTING property in the Set method are: + /// + /// COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL: Instructs RPC to use a dedicated private thread pool. + /// + /// Possible values for the COMGLB_RPC_THREADPOOL_SETTING property in the Query method are: + /// + /// COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL: RPC uses a dedicated private thread pool. + /// COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL: RPC uses the system default thread pool. + /// + /// + /// RPC uses the system thread pool by default in Windows 7. Since the system thread pool is shared by multiple components in the + /// process, COM and RPC operations may behave incorrectly if the thread pool state is corrupted by a component. The + /// COMGLB_RPC_THREADPOOL_SETTING property can be used to change the RPC thread pool behavior. Changing the default behavior will incur a + /// performance penalty since this causes RPC to use an extra thread. Therefore, care should be exercised when changing this setting. It + /// is recommended that this setting is changed only for application compatibility reasons. + /// + ///
+ /// + /// This property must be set immediately after COM is initialized in the process. If this property is set after + /// performing any operations that cause COM to initialize the RPC channel (for example, marshaling or unmarshalling object references), + /// the Set method will fail. + /// + ///
+ /// Note: This property is only supported in Windows 7 and later versions of Windows. + ///
+ ///
+ /// + /// COMGLB_RO_SETTINGS + /// + /// Possible values for the COMGLB_RO_SETTINGS property are: + /// + /// + /// COMGLB_FAST_RUNDOWN: Indicates that stubs in the current process are subjected to fast stub rundown behavior, which means that stubs + /// are run down on termination of the client process, instead of waiting for normal cleanup timeouts to expire. + /// + /// COMGLB_STA_MODALLOOP_REMOVE_TOUCH_MESSAGES: Remove touch messages from the message queue in the STA modal loop. + /// + /// COMGLB_STA_MODALLOOP_SHARED_QUEUE_REMOVE_INPUT_MESSAGES: Input messages are removed in the STA modal loop when the thread's message + /// queue is attached. + /// + /// + /// COMGLB_STA_MODALLOOP_SHARED_QUEUE_DONOT_REMOVE_INPUT_MESSAGES: Input messages aren't removed in the STA modal loop when the thread's + /// message queue is attached. + /// + /// + /// COMGLB_STA_MODALLOOP_SHARED_QUEUE_REORDER_POINTER_MESSAGES: Pointer input messages aren't removed in the STA modal loop when the + /// thread's message queue is attached but are temporarily masked to avoid deadlocks arising from the attached queue. + /// + /// COMGLB_RESERVED1: Reserved for future use. + /// COMGLB_RESERVED2: Reserved for future use. + /// COMGLB_RESERVED3: Reserved for future use. + /// + /// Note This property is only supported in Windows 8 and later versions of Windows. + /// + /// + /// + /// COMGLB_UNMARSHALING_POLICY + /// + /// Possible values for the COMGLB_UNMARSHALING_POLICY property are: + /// + /// + /// COMGLB_UNMARSHALING_POLICY_NORMAL: Unmarshaling behavior is the same as versions before than Windows 8. EOAC_NO_CUSTOM_MARSHAL + /// restrictions apply if this flag is set in CoInitializeSecurity. Otherwise, there are no restrictions. This is the default for + /// processes that aren't in the app container. + /// + /// + /// COMGLB_UNMARSHALING_POLICY_STRONG: Unmarshaling allows only a system-trusted list of hardened unmarshalers and unmarshalers allowed + /// per-process by the CoAllowUnmarshalerCLSID function. This is the default for processes in the app container. + /// + /// + /// COMGLB_UNMARSHALING_POLICY_HYBRID: Unmarshaling data whose source is app container allows only a system-trusted list of hardened + /// unmarshalers and unmarshalers allowed per-process by the CoAllowUnmarshalerCLSID function. Unmarshaling behavior for data with a + /// source that's not app container is unchanged from previous versions. + /// + /// + /// Note This property is only supported in Windows 8 and later versions of Windows. + /// + /// + /// + /// + /// It's important for applications that detect crashes and other exceptions that might be generated while executing inbound COM calls, + /// for example a call on a local server or when executing the IDropTarget::Drop method, to set COMGLB_EXCEPTION_HANDLING to + /// COMGLB_EXCEPTION_DONOT_HANDLE to disable COM behavior of catching exceptions. Failure to do this can lead to corrupt process state, + /// for example locks held when these exceptions are thrown are abandoned, and the process could enter an inconsistent state. /// /// All such applications should execute this code at startup. /// - /// IGlobalOptions *pGlobalOptions; hr = CoCreateInstance(CLSID_GlobalOptions, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pGlobalOptions)); if (SUCCEEDED(hr)) { hr = pGlobalOptions->Set(COMGLB_EXCEPTION_HANDLING, COMGLB_EXCEPTION_DONOT_HANDLE); pGlobalOptions->Release(); } + ///
C#
IGlobalOptions *pGlobalOptions; 
hr = + /// CoCreateInstance(CLSID_GlobalOptions, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pGlobalOptions));
if (SUCCEEDED(hr))
{ + ///
hr = pGlobalOptions->Set(COMGLB_EXCEPTION_HANDLING, COMGLB_EXCEPTION_DONOT_HANDLE);
pGlobalOptions->Release();
}
///
/// - // https://docs.microsoft.com/en-us/windows/win32/api/objidlbase/nn-objidlbase-iglobaloptions - [PInvokeData("objidlbase.h", MSDNShortId = "NN:objidlbase.IGlobalOptions")] + // https://learn.microsoft.com/en-us/windows/win32/api/objidl/nn-objidl-iglobaloptions + [PInvokeData("objidl.h", MSDNShortId = "NN:objidl.IGlobalOptions")] [ComImport, Guid("0000015B-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IGlobalOptions { @@ -1516,7 +1591,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidlbase/nf-objidlbase-iinternalunknown-queryinternalinterface HRESULT // QueryInternalInterface( REFIID riid, void **ppv ); [PreserveSig] - HRESULT QueryInternalInterface(in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] out object ppv); + HRESULT QueryInternalInterface(in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] out object? ppv); } /// Allocates, frees, and manages memory. @@ -1888,7 +1963,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-imarshal-getunmarshalclass HRESULT GetUnmarshalClass( // REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, CLSID *pCid ); - Guid GetUnmarshalClass(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object pv, [In] MSHCTX dwDestContext, + Guid GetUnmarshalClass(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object? pv, [In] MSHCTX dwDestContext, [In, Optional] IntPtr pvDestContext, [In] MSHLFLAGS mshlflags); /// Retrieves the maximum size of the buffer that will be needed during marshaling. @@ -1960,7 +2035,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-imarshal-getmarshalsizemax HRESULT GetMarshalSizeMax( // REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags, DWORD *pSize ); - uint GetMarshalSizeMax(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object pv, [In] MSHCTX dwDestContext, + uint GetMarshalSizeMax(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object? pv, [In] MSHCTX dwDestContext, [In, Optional] IntPtr pvDestContext, [In] MSHLFLAGS mshlflags); /// Marshals an interface pointer. @@ -2046,7 +2121,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-imarshal-marshalinterface HRESULT MarshalInterface( // IStream *pStm, REFIID riid, void *pv, DWORD dwDestContext, void *pvDestContext, DWORD mshlflags ); - void MarshalInterface([In] IStream pStm, in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object pv, + void MarshalInterface([In] IStream pStm, in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object? pv, [In] MSHCTX dwDestContext, [In, Optional] IntPtr pvDestContext, [In] MSHLFLAGS mshlflags); /// Unmarshals an interface pointer. @@ -2472,7 +2547,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-clone HRESULT Clone( IStream **ppstm ); [PreserveSig] - new HRESULT Clone(out IStream ppstm); + new HRESULT Clone(out IStream? ppstm); /// Gets information about the marshaling context. /// The attribute to query. @@ -2703,7 +2778,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidlbase/nf-objidlbase-ipsfactorybuffer-createstub HRESULT CreateStub( // REFIID riid, IUnknown *pUnkServer, IRpcStubBuffer **ppStub ); [PreserveSig] - HRESULT CreateStub(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object pUnkServer, out IRpcStubBuffer ppStub); + HRESULT CreateStub(in Guid riid, [In, Optional, MarshalAs(UnmanagedType.IUnknown)] object? pUnkServer, out IRpcStubBuffer ppStub); } /// Marshals data between a COM client proxy and a COM server stub. @@ -2753,7 +2828,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-irpcchannelbuffer-getdestctx HRESULT GetDestCtx( DWORD // *pdwDestContext, void **ppvDestContext ); [PreserveSig] - HRESULT GetDestCtx(out MSHCTX pdwDestContext, out IntPtr ppvDestContext); + HRESULT GetDestCtx(out MSHCTX pdwDestContext, [Optional] IntPtr ppvDestContext); /// Determines whether the RPC channel is connected. /// If the RPC channel exists, the return value is TRUE. Otherwise, it is FALSE. @@ -2924,7 +2999,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-irpcstubbuffer-isiidsupported IRpcStubBuffer * // IsIIDSupported( REFIID riid ); [PreserveSig] - IRpcStubBuffer IsIIDSupported(in Guid riid); + IRpcStubBuffer? IsIIDSupported(in Guid riid); /// Retrieves the total number of references that a stub has on the server object to which it is connected. /// This method returns the total number of references that a stub has on the server object to which it is connected. @@ -3077,8 +3152,8 @@ public static partial class Ole32 // *pAuthnSvc, DWORD *pAuthzSvc, OLECHAR **pServerPrincName, DWORD *pAuthnLevel, DWORD *pImpLevel, void **pPrivs, DWORD // *pCapabilities ); [PreserveSig] - HRESULT QueryBlanket(out Rpc.RPC_C_AUTHN pAuthnSvc, out Rpc.RPC_C_AUTHZ pAuthzSvc, [MarshalAs(UnmanagedType.LPWStr)] out string pServerPrincName, - out Rpc.RPC_C_AUTHN_LEVEL pAuthnLevel, out Rpc.RPC_C_IMP_LEVEL pImpLevel, out IntPtr pPrivs, ref uint pCapabilities); + HRESULT QueryBlanket(out RPC_C_AUTHN pAuthnSvc, out RPC_C_AUTHZ pAuthzSvc, [MarshalAs(UnmanagedType.LPWStr)] out string pServerPrincName, + out RPC_C_AUTHN_LEVEL pAuthnLevel, out RPC_C_IMP_LEVEL pImpLevel, out IntPtr pPrivs, ref uint pCapabilities); /// Enables a server to impersonate a client for the duration of a call. /// If the method succeeds, the return value is S_OK. Otherwise, it is E_FAIL. @@ -3576,7 +3651,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/objidl/nf-objidl-istream-clone HRESULT Clone( IStream **ppstm ); [PreserveSig] - HRESULT Clone(out IStream ppstm); + HRESULT Clone(out IStream? ppstm); } /// @@ -3851,7 +3926,8 @@ public static partial class Ole32 public GuidPtr pIID; /// A pointer to the interface requested in pIID. This member must be NULL on input. - [MarshalAs(UnmanagedType.IUnknown)] public object pItf; + [MarshalAs(UnmanagedType.IUnknown)] + public object? pItf; /// /// The return value of the QueryInterface call to locate the requested interface. Common return values include S_OK and @@ -3954,7 +4030,7 @@ public static partial class Ole32 // tagSOLE_AUTHENTICATION_LIST { DWORD cAuthInfo; SOLE_AUTHENTICATION_INFO *aAuthInfo; } SOLE_AUTHENTICATION_LIST, *PSOLE_AUTHENTICATION_LIST; [PInvokeData("objidl.h", MSDNShortId = "21f7aef3-b6be-41cc-a6ed-16d3778e3cee")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct SOLE_AUTHENTICATION_LIST : IArrayStruct + public class SOLE_AUTHENTICATION_LIST : IArrayStruct { /// /// The count of pointers in the array pointed to by aAuthInfo. @@ -3996,7 +4072,7 @@ public static partial class Ole32 /// RPC_E_NO_GOOD_SECURITY_PACKAGES is returned. /// [MarshalAs(UnmanagedType.LPWStr)] - public string pPrincipalName; + public string? pPrincipalName; /// /// When used in CoInitializeSecurity, set on return to indicate the status of the call to register the authentication services. diff --git a/PInvoke/Ole/Ole32/Ole2.cs b/PInvoke/Ole/Ole32/Ole2.cs index 3912a1c3..191cdb61 100644 --- a/PInvoke/Ole/Ole32/Ole2.cs +++ b/PInvoke/Ole/Ole32/Ole2.cs @@ -283,7 +283,7 @@ public static partial class Ole32 // LPSTGMEDIUM pmedium, OUT LPOLESTREAM polestm ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "a6026b71-4223-40ab-b209-44531480db57")] - public static extern HRESULT OleConvertIStorageToOLESTREAMEx([In] IStorage pstg, CLIPFORMAT cfFormat, int lWidth, int lHeight, uint dwSize, in STGMEDIUM pmedium, out OLESTREAM polestm); + public static extern HRESULT OleConvertIStorageToOLESTREAMEx([In] IStorage pstg, [Optional] CLIPFORMAT cfFormat, int lWidth, int lHeight, uint dwSize, in STGMEDIUM pmedium, out OLESTREAM polestm); /// /// @@ -345,7 +345,7 @@ public static partial class Ole32 // OleConvertOLESTREAMToIStorage( IN LPOLESTREAM lpolestream, OUT LPSTORAGE pstg, IN const DVTARGETDEVICE *ptd ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "8fed879c-5f97-4450-8259-da9643dd828c")] - public static extern HRESULT OleConvertOLESTREAMToIStorage(in OLESTREAM lpolestream, out IStorage pstg, in DVTARGETDEVICE ptd); + public static extern HRESULT OleConvertOLESTREAMToIStorage(in OLESTREAM lpolestream, out IStorage pstg, [In] DVTARGETDEVICE ptd); /// /// The OleConvertOLESTREAMToIStorageEx function converts the specified object from the OLE 1 storage model to an OLE 2 @@ -387,7 +387,8 @@ public static partial class Ole32 // LONG *plHeight, OUT DWORD *pdwSize, OUT LPSTGMEDIUM pmedium ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "2e77fa0e-1d98-4c59-8d3c-65bd7235ec8f")] - public static extern HRESULT OleConvertOLESTREAMToIStorageEx(in OLESTREAM polestm, out IStorage pstg, out CLIPFORMAT pcfFormat, out int plwWidth, out int plHeight, out uint pdwSize, out STGMEDIUM pmedium); + public static extern HRESULT OleConvertOLESTREAMToIStorageEx(in OLESTREAM polestm, out IStorage pstg, out CLIPFORMAT pcfFormat, + out int plwWidth, out int plHeight, out uint pdwSize, out STGMEDIUM pmedium); /// /// Creates an embedded object identified by a CLSID. You use it typically to implement the menu item that allows the end user to @@ -467,7 +468,8 @@ public static partial class Ole32 // IN DWORD renderopt, IN LPFORMATETC pFormatEtc, IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "00b7edd2-8e2e-4e0a-91a6-d966f6c8d456")] - public static extern HRESULT OleCreate(in Guid rclsid, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, [In, Optional] IOleClientSite pClientSite, [In] IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreate(in Guid rclsid, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, [In, Optional] IOleClientSite? pClientSite, + [In] IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Creates a new instance of the default embedding handler. This instance is initialized so it creates a local server when the @@ -501,7 +503,8 @@ public static partial class Ole32 // REFCLSID clsid, IN LPUNKNOWN pUnkOuter, IN REFIID riid, OUT LPVOID *lplpObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "ffe87012-b000-4ed7-b0b2-78ffdc794d3b")] - public static extern HRESULT OleCreateDefaultHandler(in Guid clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object pUnkOuter, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object lplpObj); + public static extern HRESULT OleCreateDefaultHandler(in Guid clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object? pUnkOuter, + in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object lplpObj); /// /// Creates an OLE embedding helper object using application-supplied code aggregated with pieces of the OLE default object handler. @@ -616,7 +619,8 @@ public static partial class Ole32 // REFCLSID clsid, IN LPUNKNOWN pUnkOuter, IN DWORD flags, IN LPCLASSFACTORY pCF, IN REFIID riid, OUT LPVOID *lplpObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "5c67b513-0692-4e0a-beab-8b514089699c")] - public static extern HRESULT OleCreateEmbeddingHelper(in Guid clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object pUnkOuter, EMBDHLP flags, [Optional] IClassFactory pCF, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object lplpObj); + public static extern HRESULT OleCreateEmbeddingHelper(in Guid clsid, [MarshalAs(UnmanagedType.IUnknown), Optional] object? pUnkOuter, + EMBDHLP flags, [Optional] IClassFactory? pCF, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object lplpObj); /// /// Extends OleCreate functionality by supporting more efficient instantiation of objects in containers requiring caching of multiple @@ -721,8 +725,9 @@ public static partial class Ole32 // *lpAdviseSink, OUT DWORD *rgdwConnection, IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "11f2703c-b596-4cb9-855a-d8cf4b947fae")] - public static extern HRESULT OleCreateEx(in Guid rclsid, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateEx(in Guid rclsid, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, + [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, [Optional] IAdviseSink? lpAdviseSink, + [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Creates an embedded object from a data transfer object retrieved either from the clipboard or as part of an OLE drag-and-drop @@ -854,7 +859,8 @@ public static partial class Ole32 // LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "aa5e997e-60d4-472d-9c81-5359c277bde3")] - public static extern HRESULT OleCreateFromData(IDataObject pSrcDataObj, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateFromData(IDataObject pSrcDataObj, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, + [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Extends OleCreateFromData functionality by supporting more efficient instantiation of objects in containers requiring caching of @@ -962,8 +968,9 @@ public static partial class Ole32 // LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "10091a24-6a50-4eb2-a518-b92a572daa6c")] - public static extern HRESULT OleCreateFromDataEx(IDataObject pSrcDataObj, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateFromDataEx(IDataObject pSrcDataObj, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, + uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, [Optional] IAdviseSink? lpAdviseSink, + [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// Creates an embedded object from the contents of a named file. /// This parameter is reserved and must be CLSID_NULL. @@ -1036,7 +1043,8 @@ public static partial class Ole32 // LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "98c63646-6617-46b6-8c3e-82d1c4d0adb6")] - public static extern HRESULT OleCreateFromFile(in Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLERENDER renderopt, in FORMATETC lpFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateFromFile(in Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, + OLERENDER renderopt, in FORMATETC lpFormatEtc, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Extends OleCreateFromFile functionality by supporting more efficient instantiation of objects in containers requiring caching of @@ -1145,8 +1153,10 @@ public static partial class Ole32 // pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "a75bb031-6e4a-4440-82f3-6a6f9417c62b")] - public static extern HRESULT OleCreateFromFileEx(in Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateFromFileEx(in Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, + OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, + [Optional] IAdviseSink? lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, + [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// Creates an OLE compound-document linked object. /// @@ -1191,7 +1201,8 @@ public static partial class Ole32 // REFIID riid, IN DWORD renderopt, IN LPFORMATETC lpFormatEtc, IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "ef52dc37-aa63-47f3-a04f-f9d22178690f")] - public static extern HRESULT OleCreateLink(IMoniker pmkLinkSrc, in Guid riid, OLERENDER renderopt, in FORMATETC lpFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLink(IMoniker pmkLinkSrc, in Guid riid, OLERENDER renderopt, in FORMATETC lpFormatEtc, + [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Extends OleCreateLink functionality by supporting more efficient instantiation of objects in containers requiring caching @@ -1298,8 +1309,9 @@ public static partial class Ole32 // IAdviseSink *lpAdviseSink, OUT DWORD *rgdwConnection, IN LPOLECLIENTSITE pClientSite, IN LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "b43acd14-3cf8-45da-8c2c-f2f6dc2ada78")] - public static extern HRESULT OleCreateLinkEx(IMoniker pmkLinkSrc, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLinkEx(IMoniker pmkLinkSrc, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, + [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, [Optional] IAdviseSink? lpAdviseSink, + [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Creates a linked object from a data transfer object retrieved either from the clipboard or as part of an OLE drag-and-drop operation. @@ -1386,7 +1398,8 @@ public static partial class Ole32 // LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "3eda0cf5-c33d-43cf-ba8a-02a4f6383adc")] - public static extern HRESULT OleCreateLinkFromData(IDataObject pSrcDataObj, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLinkFromData(IDataObject pSrcDataObj, in Guid riid, OLERENDER renderopt, in FORMATETC pFormatEtc, + [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Extends OleCreateLinkFromData functionality by supporting more efficient instantiation of objects in containers requiring caching @@ -1494,8 +1507,9 @@ public static partial class Ole32 // pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "f486dc73-3cb9-4839-931a-91cc3a5837d3")] - public static extern HRESULT OleCreateLinkFromDataEx(IDataObject pSrcDataObj, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLinkFromDataEx(IDataObject pSrcDataObj, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, + uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, [Optional] IAdviseSink? lpAdviseSink, + [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// Creates an object that is linked to a file. /// Pointer to a string naming the source file to be linked to. @@ -1546,7 +1560,8 @@ public static partial class Ole32 // OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "06b013db-0554-4dbc-b19d-28314fb4fee0")] - public static extern HRESULT OleCreateLinkToFile([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLERENDER renderopt, in FORMATETC lpFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLinkToFile([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLERENDER renderopt, + in FORMATETC lpFormatEtc, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Extends OleCreateLinkToFile functionality by supporting more efficient instantiation of objects in containers requiring caching @@ -1654,8 +1669,9 @@ public static partial class Ole32 // LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "9a333bac-8ee3-4941-8e4b-78a2befceff8")] - public static extern HRESULT OleCreateLinkToFileEx([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLECREATE dwFlags, OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, - [Optional] IAdviseSink lpAdviseSink, [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateLinkToFileEx([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, in Guid riid, OLECREATE dwFlags, + OLERENDER renderopt, uint cFormats, [In, Optional] ADVF[]? rgAdvf, [In, Optional] FORMATETC[]? rgFormatEtc, [Optional] IAdviseSink? lpAdviseSink, + [Out, Optional] uint[]? rgdwConnection, [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// /// Creates and returns an OLE menu descriptor (that is, an OLE-provided data structure that describes the menus) for OLE to use when @@ -1736,7 +1752,8 @@ public static partial class Ole32 // LPSTORAGE pStg, OUT LPVOID *ppvObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "847d82f5-149d-48a4-a228-f5551a07a790")] - public static extern HRESULT OleCreateStaticFromData(IDataObject pSrcDataObj, in Guid iid, OLERENDER renderopt, in FORMATETC pFormatEtc, [Optional] IOleClientSite pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); + public static extern HRESULT OleCreateStaticFromData(IDataObject pSrcDataObj, in Guid iid, OLERENDER renderopt, in FORMATETC pFormatEtc, + [Optional] IOleClientSite? pClientSite, IStorage pStg, [MarshalAs(UnmanagedType.IUnknown)] out object ppvObj); /// Called by the container to free the shared menu descriptor allocated by the OleCreateMenuDescriptor function. /// Handle to the shared menu descriptor that was returned by the OleCreateMenuDescriptor function. @@ -1887,7 +1904,7 @@ public static partial class Ole32 // CLIPFORMAT cfFormat, IN UINT uiFlags ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "c4ba0b54-e9e1-4c05-b4f8-ce5390cada17")] - public static extern HANDLE OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, Kernel32.GMEM uiFlags); + public static extern HANDLE OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, Kernel32.GMEM uiFlags = Kernel32.GMEM.GMEM_MOVEABLE); /// /// Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the @@ -2189,7 +2206,8 @@ public static partial class Ole32 // *targetDescription, PWSTR *dataDescription ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true, CharSet = CharSet.Unicode)] [PInvokeData("ole2.h", MSDNShortId = "1DAD2A9A-EDA2-49D2-90F7-2A9022988177")] - public static extern HRESULT OleGetClipboardWithEnterpriseInfo(out IDataObject dataObject, out StrPtrUni dataEnterpriseId, out StrPtrUni sourceDescription, out StrPtrUni targetDescription, out StrPtrUni dataDescription); + public static extern HRESULT OleGetClipboardWithEnterpriseInfo(out IDataObject dataObject, out StrPtrUni dataEnterpriseId, + out StrPtrUni sourceDescription, out StrPtrUni targetDescription, out StrPtrUni dataDescription); /// Returns a handle to a metafile containing an icon and a string label for the specified CLSID. /// The CLSID for which the icon and string are to be requested. @@ -2203,7 +2221,8 @@ public static partial class Ole32 // LPOLESTR lpszLabel, IN BOOL fUseTypeAsLabel ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "88ac1c14-b5a8-4100-9fa5-d7af35052b48")] - public static extern SafeHGlobalHandle OleGetIconOfClass(in Guid rclsid, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? lpszLabel, [MarshalAs(UnmanagedType.Bool)] bool fUseTypeAsLabel); + public static extern SafeHGlobalHandle OleGetIconOfClass(in Guid rclsid, [Optional, MarshalAs(UnmanagedType.LPWStr)] string? lpszLabel, + [MarshalAs(UnmanagedType.Bool)] bool fUseTypeAsLabel); /// Returns a handle to a metafile containing an icon and string label for the specified file name. /// A pointer to a file for which the icon and string are to be requested. @@ -2487,7 +2506,8 @@ public static partial class Ole32 // OleMetafilePictFromIconAndLabel( IN HICON hIcon, LPOLESTR lpszLabel, LPOLESTR lpszSourceFile, IN UINT iIconIndex ); [DllImport(Lib.Ole32, SetLastError = true, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "627a79eb-46dd-4df7-a0d6-cab37b73387a")] - public static extern SafeHGlobalHandle OleMetafilePictFromIconAndLabel(HICON hIcon, [MarshalAs(UnmanagedType.LPWStr), Optional] string? lpszLabel, [MarshalAs(UnmanagedType.LPWStr), Optional] string? lpszSourceFile, [In] uint iIconIndex); + public static extern SafeHGlobalHandle OleMetafilePictFromIconAndLabel(HICON hIcon, [MarshalAs(UnmanagedType.LPWStr), Optional] string? lpszLabel, + [MarshalAs(UnmanagedType.LPWStr), Optional] string? lpszSourceFile, [In] uint iIconIndex); /// Increments or decrements an external reference that keeps an object in the running state. /// Pointer to the IUnknown interface on the object that is to be locked or unlocked. @@ -3139,7 +3159,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/ole2/nf-ole2-olesetclipboard HRESULT OleSetClipboard( IN LPDATAOBJECT pDataObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "741def10-d2b5-4395-8049-1eba2e29b0e8")] - public static extern HRESULT OleSetClipboard([In, Optional] IDataObject pDataObj); + public static extern HRESULT OleSetClipboard([In, Optional] IDataObject? pDataObj); /// /// Notifies an object that it is embedded in an OLE container, which ensures that reference counting is done correctly for @@ -3206,7 +3226,8 @@ public static partial class Ole32 // holemenu, IN HWND hwndFrame, IN HWND hwndActiveObject, IN LPOLEINPLACEFRAME lpFrame, IN LPOLEINPLACEACTIVEOBJECT lpActiveObj ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("ole2.h", MSDNShortId = "c80fe36d-5093-4814-83a9-0c11c5a7cf5f")] - public static extern HRESULT OleSetMenuDescriptor([In] HOLEMENU holemenu, [In] HWND hwndFrame, [In] HWND hwndActiveObject, [In] IOleInPlaceFrame lpFrame, [In] IOleInPlaceActiveObject lpActiveObj); + public static extern HRESULT OleSetMenuDescriptor([In, Optional] HOLEMENU holemenu, [In] HWND hwndFrame, [In] HWND hwndActiveObject, + [In] IOleInPlaceFrame? lpFrame, [In] IOleInPlaceActiveObject? lpActiveObj); /// /// Called by the object application, allows an object's container to translate accelerators according to the container's accelerator table. @@ -3500,7 +3521,7 @@ public static partial class Ole32 public HOLEMENU(IntPtr preexistingHandle) => handle = preexistingHandle; /// Returns an invalid handle by instantiating a object with . - public static HOLEMENU NULL => new HOLEMENU(IntPtr.Zero); + public static HOLEMENU NULL => new(IntPtr.Zero); /// Gets a value indicating whether this instance is a null handle. public bool IsNull => handle == IntPtr.Zero; @@ -3513,7 +3534,7 @@ public static partial class Ole32 /// Performs an implicit conversion from to . /// The pointer to a handle. /// The result of the conversion. - public static implicit operator HOLEMENU(IntPtr h) => new HOLEMENU(h); + public static implicit operator HOLEMENU(IntPtr h) => new(h); /// Implements the operator !=. /// The first handle. @@ -3528,7 +3549,7 @@ public static partial class Ole32 public static bool operator ==(HOLEMENU h1, HOLEMENU h2) => h1.Equals(h2); /// - public override bool Equals(object obj) => obj is HOLEMENU h ? handle == h.handle : false; + public override bool Equals(object? obj) => obj is HOLEMENU h && handle == h.handle; /// public override int GetHashCode() => handle.GetHashCode(); diff --git a/PInvoke/Ole/Ole32/OleIdl.cs b/PInvoke/Ole/Ole32/OleIdl.cs index 1db223ef..d6870eca 100644 --- a/PInvoke/Ole/Ole32/OleIdl.cs +++ b/PInvoke/Ole/Ole32/OleIdl.cs @@ -1060,9 +1060,7 @@ public static partial class Ole32 // rgelt, ULONG *pceltFetched ); [PInvokeData("oleidl.h", MSDNShortId = "bb934017-9054-42b5-89d4-a24f12829503")] [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Next([In] uint celt, - [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] OLEVERB[] rgelt, - out uint pceltFetched); + HRESULT Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] OLEVERB[] rgelt, out uint pceltFetched); /// Skips over the specified number of items in the enumeration sequence. /// The number of items to be skipped. @@ -1374,7 +1372,7 @@ public static partial class Ole32 /// data stored in an array of STATDATA structures containing information about current cache connections. /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolecache-enumcache - IEnumSTATDATA EnumCache(); + IEnumSTATDATA? EnumCache(); /// Fills the cache as needed using the data provided by the specified data object. /// A pointer to the IDataObject interface on the data object from which the cache is to be initialized. @@ -1526,7 +1524,7 @@ public static partial class Ole32 /// data stored in an array of STATDATA structures containing information about current cache connections. /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolecache-enumcache - new IEnumSTATDATA EnumCache(); + new IEnumSTATDATA? EnumCache(); /// Fills the cache as needed using the data provided by the specified data object. /// A pointer to the IDataObject interface on the data object from which the cache is to be initialized. @@ -1660,7 +1658,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolecache2-updatecache HRESULT UpdateCache( LPDATAOBJECT // pDataObject, DWORD grfUpdf, LPVOID pReserved ); - HRESULT UpdateCache(IDataObject pDataObject, UPDFCACHE grfUpdf, [In, Optional] IntPtr pReserved); + HRESULT UpdateCache(IDataObject? pDataObject, UPDFCACHE grfUpdf, [In, Optional] IntPtr pReserved); /// Discards the caches found in memory. /// @@ -1894,7 +1892,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleclientsite-getmoniker HRESULT GetMoniker( DWORD // dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk ); [PreserveSig] - HRESULT GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out IMoniker ppmk); + HRESULT GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out IMoniker? ppmk); /// Retrieves a pointer to the object's container. /// @@ -1937,7 +1935,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleclientsite-getcontainer HRESULT GetContainer( // IOleContainer **ppContainer ); [PreserveSig] - HRESULT GetContainer(out IOleContainer ppContainer); + HRESULT GetContainer(out IOleContainer? ppContainer); /// /// Asks a container to display its object to the user. This method ensures that the container itself is visible and not minimized. @@ -2094,7 +2092,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iparsedisplayname-parsedisplayname HRESULT // ParseDisplayName( IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut ); [PreserveSig] - new HRESULT ParseDisplayName(IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, out uint pchEaten, out IMoniker ppmkOut); + new HRESULT ParseDisplayName(IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, out uint pchEaten, out IMoniker? ppmkOut); /// Enumerates the objects in the current container. /// Specifies which objects in a container are to be enumerated, as defined in the enumeration OLECONTF. @@ -2112,7 +2110,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolecontainer-enumobjects HRESULT EnumObjects( DWORD // grfFlags, IEnumUnknown **ppenum ); [PreserveSig] - HRESULT EnumObjects(OLECONTF grfFlags, out IEnumUnknown ppenum); + HRESULT EnumObjects(OLECONTF grfFlags, out IEnumUnknown? ppenum); /// Keeps the container for embedded objects running until explicitly released. /// Indicates whether to lock ( TRUE) or unlock ( FALSE) a container. @@ -2681,7 +2679,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleinplaceuiwindow-setborderspace HRESULT // SetBorderSpace( LPCBORDERWIDTHS pborderwidths ); - new void SetBorderSpace(in RECT pborderwidths); + new void SetBorderSpace([In] PRECT? pborderwidths); /// Provides a direct channel of communication between the object and each of the frame and document windows. /// A pointer to the IOleInPlaceActiveObject interface on the active in-place object. @@ -2719,7 +2717,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleinplaceuiwindow-setactiveobject HRESULT // SetActiveObject( IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName ); - new void SetActiveObject([In] IOleInPlaceActiveObject pActiveObject, [MarshalAs(UnmanagedType.LPWStr)] string pszObjName); + new void SetActiveObject([In] IOleInPlaceActiveObject pActiveObject, [MarshalAs(UnmanagedType.LPWStr)] string? pszObjName); /// Enables the container to insert menu groups into the composite menu to be used during the in-place session. /// A handle to an empty menu. @@ -2829,7 +2827,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleinplaceframe-setstatustext HRESULT SetStatusText( // LPCOLESTR pszStatusText ); - void SetStatusText([MarshalAs(UnmanagedType.LPWStr)] string pszStatusText); + void SetStatusText([MarshalAs(UnmanagedType.LPWStr)] string? pszStatusText); /// Enables or disables a frame's modeless dialog boxes. /// @@ -3525,7 +3523,7 @@ public static partial class Ole32 // GetWindowContext( IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, // LPOLEINPLACEFRAMEINFO lpFrameInfo ); [PreserveSig] - unsafe HRESULT GetWindowContext(out IOleInPlaceFrame ppFrame, out IOleInPlaceUIWindow ppDoc, [Out] RECT* lprcPosRect, [Out] RECT* lprcClipRect, [Out] OLEINPLACEFRAMEINFO* lpFrameInfo); + unsafe HRESULT GetWindowContext(out IOleInPlaceFrame? ppFrame, out IOleInPlaceUIWindow? ppDoc, [Out] RECT* lprcPosRect, [Out] RECT* lprcClipRect, [Out] OLEINPLACEFRAMEINFO* lpFrameInfo); /// Instructs the container to scroll the view of the object by the specified number of pixels. /// The number of pixels by which to scroll in the X and Y directions. @@ -3977,7 +3975,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleinplaceuiwindow-setborderspace HRESULT // SetBorderSpace( LPCBORDERWIDTHS pborderwidths ); - void SetBorderSpace(in RECT pborderwidths); + void SetBorderSpace([In] PRECT? pborderwidths); /// Provides a direct channel of communication between the object and each of the frame and document windows. /// A pointer to the IOleInPlaceActiveObject interface on the active in-place object. @@ -4015,7 +4013,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleinplaceuiwindow-setactiveobject HRESULT // SetActiveObject( IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName ); - void SetActiveObject([In] IOleInPlaceActiveObject pActiveObject, [MarshalAs(UnmanagedType.LPWStr)] string pszObjName); + void SetActiveObject([In] IOleInPlaceActiveObject pActiveObject, [MarshalAs(UnmanagedType.LPWStr)] string? pszObjName); } /// @@ -4161,7 +4159,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-setsourcemoniker HRESULT SetSourceMoniker( [in] // IMoniker *pmk, [in] REFCLSID rclsid ); [PreserveSig] - HRESULT SetSourceMoniker([In, Optional] IMoniker pmk, in Guid rclsid); + HRESULT SetSourceMoniker([In, Optional] IMoniker? pmk, in Guid rclsid); /// Retrieves the moniker identifying the link source of a linked object. /// @@ -4212,7 +4210,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-getsourcemoniker HRESULT GetSourceMoniker( [out] // IMoniker **ppmk ); [PreserveSig] - HRESULT GetSourceMoniker(out IMoniker ppmk); + HRESULT GetSourceMoniker(out IMoniker? ppmk); /// Sets the display name for the link source. /// A pointer to the display name of the new link source. This parameter cannot be NULL. @@ -4302,7 +4300,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-getsourcedisplayname HRESULT // GetSourceDisplayName( [out] LPOLESTR *ppszDisplayName ); [PreserveSig] - HRESULT GetSourceDisplayName(out IntPtr ppszDisplayName); + HRESULT GetSourceDisplayName([MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplayName); /// Activates the connection to the link source by binding the moniker stored within the linked object. /// @@ -4386,7 +4384,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-bindtosource HRESULT BindToSource( [in] DWORD // bindflags, [in] IBindCtx *pbc ); [PreserveSig] - HRESULT BindToSource(OLELINKBIND bindflags, [In, Optional] IBindCtx pbc); + HRESULT BindToSource(OLELINKBIND bindflags, [In, Optional] IBindCtx? pbc); /// Activates the connection between the linked object and the link source if the link source is already running. /// @@ -4442,7 +4440,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-getboundsource HRESULT GetBoundSource( [out] // IUnknown **ppunk ); [PreserveSig] - HRESULT GetBoundSource(out IDataObject ppunk); + HRESULT GetBoundSource(out IDataObject? ppunk); /// Breaks the connection between a linked object and its link source. /// This method returns S_OK on success. @@ -4523,7 +4521,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iolelink-update HRESULT Update( [in] IBindCtx *pbc ); [PreserveSig] - HRESULT Update([In, Optional] IBindCtx pbc); + HRESULT Update([In, Optional] IBindCtx? pbc); } /// @@ -4580,7 +4578,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-setclientsite HRESULT SetClientSite( // IOleClientSite *pClientSite ); [PreserveSig] - HRESULT SetClientSite(IOleClientSite pClientSite); + HRESULT SetClientSite(IOleClientSite? pClientSite); /// Retrieves a pointer to an embedded object's client site. /// @@ -4610,7 +4608,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-getclientsite HRESULT GetClientSite( // IOleClientSite **ppClientSite ); [PreserveSig] - HRESULT GetClientSite(out IOleClientSite ppClientSite); + HRESULT GetClientSite(out IOleClientSite? ppClientSite); /// Provides an object with the names of its container application and the compound document in which it is embedded. /// Pointer to the name of the container application in which the object is running. @@ -4645,7 +4643,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-sethostnames HRESULT SetHostNames( LPCOLESTR // szContainerApp, LPCOLESTR szContainerObj ); [PreserveSig] - HRESULT SetHostNames([MarshalAs(UnmanagedType.LPWStr)] string szContainerApp, [MarshalAs(UnmanagedType.LPWStr)] string szContainerObj); + HRESULT SetHostNames([MarshalAs(UnmanagedType.LPWStr)] string szContainerApp, [MarshalAs(UnmanagedType.LPWStr)] string? szContainerObj); /// Changes an embedded object from the running to the loaded state. Disconnects a linked object from its link source. /// @@ -4826,7 +4824,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-getmoniker HRESULT GetMoniker( DWORD dwAssign, // DWORD dwWhichMoniker, IMoniker **ppmk ); [PreserveSig] - HRESULT GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out IMoniker ppmk); + HRESULT GetMoniker(OLEGETMONIKER dwAssign, OLEWHICHMK dwWhichMoniker, out IMoniker? ppmk); /// /// Initializes a newly created object with data from a specified data object, which can reside either in the same container or @@ -4907,7 +4905,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-initfromdata HRESULT InitFromData( IDataObject // *pDataObject, BOOL fCreation, DWORD dwReserved ); [PreserveSig] - HRESULT InitFromData(IDataObject pDataObject, [MarshalAs(UnmanagedType.Bool)] bool fCreation, uint dwReserved = 0); + HRESULT InitFromData(IDataObject? pDataObject, [MarshalAs(UnmanagedType.Bool)] bool fCreation, uint dwReserved = 0); /// /// Retrieves a data object containing the current contents of the embedded object on which this method is called. Using the @@ -4955,7 +4953,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-getclipboarddata HRESULT GetClipboardData( // DWORD dwReserved, IDataObject **ppDataObject ); [PreserveSig] - HRESULT GetClipboardData([Optional] uint dwReserved, out IDataObject ppDataObject); + HRESULT GetClipboardData([Optional] uint dwReserved, out IDataObject? ppDataObject); /// /// Requests that an object perform an action in response to an end-user's action. The possible actions are enumerated for the @@ -5192,7 +5190,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-enumverbs HRESULT EnumVerbs( IEnumOLEVERB // **ppEnumOleVerb ); [PreserveSig] - HRESULT EnumVerbs(out IEnumOLEVERB ppEnumOleVerb); + HRESULT EnumVerbs(out IEnumOLEVERB? ppEnumOleVerb); /// Updates an object handler's or link object's data or view caches. /// @@ -5363,7 +5361,7 @@ public static partial class Ole32 // dwFormOfType, LPOLESTR *pszUserType ); [return: MarshalAs(UnmanagedType.LPWStr)] [PreserveSig] - HRESULT GetUserType(USERCLASSTYPE dwFormOfType, [MarshalAs(UnmanagedType.LPWStr)] out string pszUserType); + HRESULT GetUserType(USERCLASSTYPE dwFormOfType, [MarshalAs(UnmanagedType.LPWStr)] out string? pszUserType); /// Informs an object of how much display space its container has assigned it. /// @@ -5601,7 +5599,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-ioleobject-enumadvise HRESULT EnumAdvise( IEnumSTATDATA // **ppenumAdvise ); [PreserveSig] - HRESULT EnumAdvise(out IEnumSTATDATA ppenumAdvise); + HRESULT EnumAdvise(out IEnumSTATDATA? ppenumAdvise); /// Retrieves the status of an object at creation and loading. /// @@ -5931,7 +5929,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iparsedisplayname-parsedisplayname HRESULT // ParseDisplayName( IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut ); [PreserveSig] - HRESULT ParseDisplayName(IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, out uint pchEaten, out IMoniker ppmkOut); + HRESULT ParseDisplayName(IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, out uint pchEaten, out IMoniker? ppmkOut); } /// @@ -6123,9 +6121,9 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-draw HRESULT Draw( DWORD dwDrawAspect, LONG // lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(* // )(ULONG_PTR dwContinue) pfnContinue, ULONG_PTR dwContinue ); - unsafe HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, - [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT lprcBounds, [In, Optional] PRECT lprcWBounds, - [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func pfnContinue, [In, Optional] IntPtr dwContinue); + HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, + [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT? lprcBounds, [In, Optional] PRECT? lprcWBounds, + [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func? pfnContinue, [In, Optional] IntPtr dwContinue); /// /// Returns the logical palette that the object will use for drawing in its IViewObject::Draw method with the corresponding parameters. @@ -6208,7 +6206,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-getcolorset HRESULT GetColorSet( DWORD // dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet ); - unsafe HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, + HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, [In, Optional] HDC hicTargetDev, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(VanaraCustomMarshaler))] out LOGPALETTE ppColorSet); /// @@ -6273,7 +6271,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-freeze HRESULT Freeze( DWORD dwDrawAspect, // LONG lindex, void *pvAspect, DWORD *pdwFreeze ); - unsafe HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, out uint pdwFreeze); + HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, out uint pdwFreeze); /// /// Releases a drawing that was previously frozen using IViewObject::Freeze. The most common use of this method is for banded printing. @@ -6372,7 +6370,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-setadvise HRESULT SetAdvise( DWORD aspects, // DWORD advf, IAdviseSink *pAdvSink ); - HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink pAdvSink); + HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink? pAdvSink); /// Retrieves the advisory connection on the object that was used in the most recent call to IViewObject::SetAdvise. /// @@ -6573,9 +6571,9 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-draw HRESULT Draw( DWORD dwDrawAspect, LONG // lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(* // )(ULONG_PTR dwContinue) pfnContinue, ULONG_PTR dwContinue ); - new unsafe HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, - [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT lprcBounds, [In, Optional] PRECT lprcWBounds, - [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func pfnContinue, [In, Optional] IntPtr dwContinue); + new HRESULT Draw(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, + [In, Optional] HDC hdcTargetDev, [In] HDC hdcDraw, [In, Optional] PRECT? lprcBounds, [In, Optional] PRECT? lprcWBounds, + [In, Optional, MarshalAs(UnmanagedType.FunctionPtr)] Func? pfnContinue, [In, Optional] IntPtr dwContinue); /// /// Returns the logical palette that the object will use for drawing in its IViewObject::Draw method with the corresponding parameters. @@ -6658,7 +6656,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-getcolorset HRESULT GetColorSet( DWORD // dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet ); - new unsafe HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, [In, Optional] DVTARGETDEVICE* ptd, + new HRESULT GetColorSet(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, [In, Optional] DVTARGETDEVICE? ptd, [In, Optional] HDC hicTargetDev, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(VanaraCustomMarshaler))] out LOGPALETTE ppColorSet); /// @@ -6723,7 +6721,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-freeze HRESULT Freeze( DWORD dwDrawAspect, // LONG lindex, void *pvAspect, DWORD *pdwFreeze ); - new unsafe HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO* pvAspect, out uint pdwFreeze); + new HRESULT Freeze(DVASPECT dwDrawAspect, int lindex, [In, Optional] DVASPECTINFO? pvAspect, out uint pdwFreeze); /// /// Releases a drawing that was previously frozen using IViewObject::Freeze. The most common use of this method is for banded printing. @@ -6822,7 +6820,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject-setadvise HRESULT SetAdvise( DWORD aspects, // DWORD advf, IAdviseSink *pAdvSink ); - new HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink pAdvSink); + new HRESULT SetAdvise(DVASPECT aspects, ADVF advf, [In, Optional] IAdviseSink? pAdvSink); /// Retrieves the advisory connection on the object that was used in the most recent call to IViewObject::SetAdvise. /// @@ -6886,7 +6884,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/win32/api/oleidl/nf-oleidl-iviewobject2-getextent HRESULT GetExtent( DWORD // dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel ); - HRESULT GetExtent(uint dwDrawAspect, int lindex, in DVTARGETDEVICE ptd, out SIZE lpsizel); + HRESULT GetExtent(uint dwDrawAspect, int lindex, [In] DVTARGETDEVICE ptd, out SIZE lpsizel); } /// diff --git a/PInvoke/Ole/Ole32/PropIdl.PROPVARIANT.cs b/PInvoke/Ole/Ole32/PropIdl.PROPVARIANT.cs index 327b9d85..0facdee8 100644 --- a/PInvoke/Ole/Ole32/PropIdl.PROPVARIANT.cs +++ b/PInvoke/Ole/Ole32/PropIdl.PROPVARIANT.cs @@ -72,7 +72,7 @@ public static partial class Ole32 public uint ClipboardFormat => ulClipFmt is (-1) or (-2) ? (uint)Marshal.ReadInt32(pClipData) : 0; /// The clipboard name. - public string ClipboardFormatName => ulClipFmt > 0 ? Marshal.PtrToStringUni(pClipData) : null; + public string? ClipboardFormatName => ulClipFmt > 0 ? Marshal.PtrToStringUni(pClipData) : null; /// The clipboard format id. public Guid FMTID => ulClipFmt == -3 ? pClipData.ToStructure() : Guid.Empty; @@ -169,7 +169,7 @@ public static partial class Ole32 public bool boolVal => GetRawValue().GetValueOrDefault(); /// Gets the BSTR value. - public string bstrVal => GetString(VarType); + public string? bstrVal => GetString(VarType); /// Gets the byte value. public byte bVal => GetRawValue().GetValueOrDefault(); @@ -178,7 +178,7 @@ public static partial class Ole32 public IEnumerable cabool => GetVector().Select(s => s != 0); /// Gets the string array value. - public IEnumerable cabstr => GetStringVector(); + public IEnumerable cabstr => GetStringVector(); /// Gets the sbyte array value. public IEnumerable cac => GetVector(); @@ -211,10 +211,10 @@ public static partial class Ole32 public IEnumerable cal => GetVector(); /// Gets the ANSI string array value. - public IEnumerable calpstr => GetStringVector(); + public IEnumerable calpstr => GetStringVector(); /// Gets the Unicode string array value. - public IEnumerable calpwstr => GetStringVector(); + public IEnumerable calpwstr => GetStringVector(); /// Gets the PROPVARIANT array value. public IEnumerable capropvar => GetVector(); @@ -286,7 +286,7 @@ public static partial class Ole32 public int lVal => GetRawValue().GetValueOrDefault(); /// Gets the array of objects. - public IEnumerable parray => GetSafeArray(); + public IEnumerable parray => GetSafeArray(); /// Gets the "by value" boolean value. public bool? pboolVal => GetRawValue(); @@ -330,7 +330,7 @@ public static partial class Ole32 public decimal? pdecVal => GetRawValue(); /// Gets the "by value" pointer value. - public object pdispVal => punkVal; + public object? pdispVal => punkVal; /// Gets the "by value" float value. public float? pfltVal => GetRawValue(); @@ -361,13 +361,13 @@ public static partial class Ole32 } /// Gets the IStorage value. - public IStorage pStorage => (IStorage)punkVal; + public IStorage? pStorage => (IStorage?)punkVal; /// Gets the IStream value. - public IStream pStream => (IStream)punkVal; + public IStream? pStream => (IStream?)punkVal; /// Gets the ANSI string value. - public string pszVal => GetString(VarType); + public string? pszVal => GetString(VarType); /// Gets the "by value" uint value. public uint? puintVal => GetRawValue(); @@ -379,19 +379,19 @@ public static partial class Ole32 public uint? pulVal => GetRawValue(); /// Gets the "by value" IUnknown value. - public object punkVal => _ptr == IntPtr.Zero ? null : Marshal.GetObjectForIUnknown(_ptr); + public object? punkVal => _ptr == IntPtr.Zero ? null : Marshal.GetObjectForIUnknown(_ptr); /// Gets the "by value" Guid value. public Guid? puuid => GetRawValue(); /// Gets the "by value" PROPVARIANT value. - public PROPVARIANT pvarVal => _ptr.ToStructure(); + public PROPVARIANT? pvarVal => _ptr.ToStructure(); /// Gets a stream with a Guid version. public IntPtr pVersionedStream => GetRawValue().GetValueOrDefault(); /// Gets the Unicode string value. - public string pwszVal => GetString(VarType); + public string? pwszVal => GetString(VarType); /// Gets the Win32Error value. public Win32Error scode => new(GetRawValue().GetValueOrDefault()); @@ -409,7 +409,7 @@ public static partial class Ole32 public uint ulVal => GetRawValue().GetValueOrDefault(); /// Gets the value base on the value. - public object Value + public object? Value { get => GetValue(); private set => SetValue(value); @@ -439,7 +439,7 @@ public static partial class Ole32 /// Gets the Type for a provided VARTYPE. /// The VARTYPE value to lookup. /// A best fit for the provided VARTYPE. - public static Type GetType(VARTYPE vt) + public static Type? GetType(VARTYPE vt) { // Safe arrays are always pointers if (vt.IsFlagSet(VARTYPE.VT_ARRAY)) return typeof(IntPtr); @@ -447,17 +447,17 @@ public static partial class Ole32 // VT_NULL is always DBNull if (elemType == VARTYPE.VT_NULL) return typeof(DBNull); // Get type of element, return null if VT_EMPTY or not found - var type = CorrespondingTypeAttribute.GetCorrespondingTypes(elemType).FirstOrDefault(); + Type? type = CorrespondingTypeAttribute.GetCorrespondingTypes(elemType).FirstOrDefault(); if (type == null || elemType == 0) return null; // Change type if by reference if (vt.IsFlagSet(VARTYPE.VT_BYREF)) { type = Nullable.GetUnderlyingType(type); - if (type.IsValueType) + if (type is not null && type.IsValueType) type = typeof(Nullable<>).MakeGenericType(type); } // Change type if vector - if (vt.IsFlagSet(VARTYPE.VT_VECTOR)) + if (vt.IsFlagSet(VARTYPE.VT_VECTOR) && type is not null) { type = typeof(IEnumerable<>).MakeGenericType(type); } @@ -467,7 +467,7 @@ public static partial class Ole32 /// Gets the VARTYPE for a provided type. /// The type to analyze. /// A best fit for the provided type. - public static VARTYPE GetVarType(Type type) + public static VARTYPE GetVarType(Type? type) { if (type == null) return VARTYPE.VT_NULL; @@ -508,7 +508,9 @@ public static partial class Ole32 return ret | VARTYPE.VT_HRESULT; if (elemtype.IsCOMObject) { - Type[] intf = elemtype.GetInterfaces(); +#pragma warning disable IL2065 // The method has a DynamicallyAccessedMembersAttribute (which applies to the implicit 'this' parameter), but the value used for the 'this' parameter can not be statically analyzed. + Type[] intf = elemtype!.GetInterfaces(); +#pragma warning restore IL2065 // The method has a DynamicallyAccessedMembersAttribute (which applies to the implicit 'this' parameter), but the value used for the 'this' parameter can not be statically analyzed. if (intf.Contains(typeof(IStream))) return ret | VARTYPE.VT_STREAM; if (intf.Contains(typeof(IStorage))) return ret | VARTYPE.VT_STORAGE; return ret | VARTYPE.VT_UNKNOWN; @@ -610,7 +612,7 @@ public static partial class Ole32 /// position in the sort order as . Greater than zero This instance follows in /// the sort order. /// - public int CompareTo(object other) + public int CompareTo(object? other) { var v = Value; if (other is null) return v == null ? 0 : 1; @@ -632,12 +634,12 @@ public static partial class Ole32 /// Determines whether the specified , is equal to this instance. /// The to compare with this instance. /// true if the specified is equal to this instance; otherwise, false. - public override bool Equals(object obj) => obj is PROPVARIANT pv ? Equals(pv.Value) : obj == this; + public override bool Equals(object? obj) => obj is PROPVARIANT pv ? Equals(pv.Value) : obj == this; /// Indicates whether the current object is equal to another object of the same type. /// An object to compare with this object. /// true if the current object is equal to the parameter; otherwise, false. - public bool Equals(PROPVARIANT other) => CompareTo(other) == 0; + public bool Equals(PROPVARIANT? other) => CompareTo(other) == 0; /// Returns a hash code for this instance. /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. @@ -647,7 +649,7 @@ public static partial class Ole32 /// A that represents this instance. public override string ToString() { - string s = null; + string s = ""; if (IsVector && Value is IEnumerable ie) s = string.Join(",", ie.Cast().Select(o => o.ToString()).ToArray()); else if (PropVariantToStringAlloc(this, out var str).Succeeded) @@ -670,11 +672,11 @@ public static partial class Ole32 /// meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is /// equal to . Greater than zero This object is greater than . /// - int IComparable.CompareTo(PROPVARIANT other) => CompareTo(other); + int IComparable.CompareTo(PROPVARIANT? other) => CompareTo(other); - private static IEnumerable ConvertToEnum(object array, Func conv = null) + private static IEnumerable ConvertToEnum(object array, Func? conv = null) { - if (array is null) return null; + if (array is null) return new T[0]; if (array is IEnumerable iet) return iet; @@ -687,11 +689,11 @@ public static partial class Ole32 } catch { - return null; + return new T[0]; } } - private static string GetString(VarEnum ve, IntPtr ptr) => (VARTYPE)ve switch + private static string? GetString(VarEnum ve, IntPtr ptr) => (VARTYPE)ve switch { VARTYPE.VT_LPSTR => Marshal.PtrToStringAnsi(ptr), VARTYPE.VT_LPWSTR => Marshal.PtrToStringUni(ptr), @@ -729,9 +731,9 @@ public static partial class Ole32 return _ptr.ToNullableStructure(); } - private IEnumerable GetSafeArray() + private IEnumerable GetSafeArray() { - if (_ptr == IntPtr.Zero) return null; + if (_ptr == IntPtr.Zero) return new object[0]; var sa = new SafeSAFEARRAY(_ptr, false); var dims = SafeArrayGetDim(sa); if (dims != 1) throw new NotSupportedException("Only single-dimensional arrays are supported"); @@ -752,19 +754,22 @@ public static partial class Ole32 if (elemSz == 0) throw new Win32Exception(); using var mem = new SafeCoTaskMemHandle(elemSz); SafeArrayGetVartype(sa, out var elemVT); - var elemType = GetType(elemVT); - for (int i = lBound; i <= uBound; i++) + Type? elemType = GetType(elemVT); + if (elemType is not null) { - SafeArrayGetElement(sa, i, mem).ThrowIfFailed(); - ret[i - lBound] = mem.DangerousGetHandle().Convert(mem.Size, elemType); + for (int i = lBound; i <= uBound; i++) + { + SafeArrayGetElement(sa, i, mem).ThrowIfFailed(); + ret[i - lBound] = mem.DangerousGetHandle().Convert(mem.Size, elemType)!; + } } return ret; } } - private string GetString(VarEnum ve) => GetString(ve, _ptr); + private string? GetString(VarEnum ve) => GetString(ve, _ptr); - private string[] GetStringVector() + private string?[] GetStringVector() { var ve = (VarEnum)((int)vt & 0x0FFF); if (ve == VarEnum.VT_LPSTR) @@ -773,7 +778,7 @@ public static partial class Ole32 return vals; } - private object GetValue() + private object? GetValue() { if (vt.IsFlagSet(VARTYPE.VT_ARRAY)) return GetSafeArray(); var isVector = vt.IsFlagSet(VARTYPE.VT_VECTOR); @@ -794,7 +799,7 @@ public static partial class Ole32 VARTYPE.VT_R8 => isRef ? dblVal : (isVector ? cadbl : dblVal), VARTYPE.VT_BOOL => isRef ? pboolVal : (isVector ? cabool : boolVal), VARTYPE.VT_ERROR => isRef ? pscode : (isVector ? cascode : scode), - VARTYPE.VT_HRESULT => isRef ? (pulVal.HasValue ? new HRESULT(plVal.Value) : (HRESULT?)null) : (isVector ? cal.Select(u => new HRESULT(u)) : new HRESULT(lVal)), + VARTYPE.VT_HRESULT => isRef ? (pulVal.HasValue ? new HRESULT(plVal.GetValueOrDefault()) : (HRESULT?)null) : (isVector ? cal.Select(u => new HRESULT(u)) : new HRESULT(lVal)), VARTYPE.VT_CY => isRef ? pcyVal : (isVector ? cacy : cyVal), VARTYPE.VT_DATE => isRef ? pdate : (isVector ? cadate : date), VARTYPE.VT_FILETIME => isRef ? filetime : (isVector ? cafiletime : filetime), @@ -814,7 +819,7 @@ public static partial class Ole32 }; } - private IEnumerable GetVector() => vt.IsFlagSet(VARTYPE.VT_VECTOR) ? (_blob.cbSize <= 0 ? new T[0] : _blob.pBlobData.ToArray((int)_blob.cbSize)) : throw new InvalidCastException(); + private IEnumerable GetVector() => vt.IsFlagSet(VARTYPE.VT_VECTOR) ? (_blob.cbSize <= 0 ? new T[0] : _blob.pBlobData.ToArray((int)_blob.cbSize))! : throw new InvalidCastException(); private void SetSafeArray(IList array) { @@ -851,13 +856,13 @@ public static partial class Ole32 case VARTYPE.VT_BSTR: vt = svt | VARTYPE.VT_VECTOR; _blob.cbSize = (uint)sc.Length; - _blob.pBlobData = value.Select(Marshal.StringToBSTR).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); + _blob.pBlobData = value.Select(Marshal.StringToBSTR).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); break; case VARTYPE.VT_LPSTR: vt = svt | VARTYPE.VT_VECTOR; _blob.cbSize = (uint)sc.Length; - _blob.pBlobData = value.Select(Marshal.StringToCoTaskMemAnsi).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); + _blob.pBlobData = value.Select(Marshal.StringToCoTaskMemAnsi).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); break; case VARTYPE.VT_LPWSTR: @@ -894,7 +899,7 @@ public static partial class Ole32 /// /// If this value equals VT_EMPTY, the method will attempt to ascertain the value type from the . /// - private void SetValue(object value, VarEnum vEnum = VarEnum.VT_EMPTY) + private void SetValue(object? value, VarEnum vEnum = VarEnum.VT_EMPTY) { Clear(); var newVT = vt = vEnum == VarEnum.VT_EMPTY ? GetVarType(value?.GetType()) : (VARTYPE)vEnum; @@ -913,7 +918,7 @@ public static partial class Ole32 } else { - SetSafeArray(ConvertToEnum(value).ToList()); + SetSafeArray(ConvertToEnum(value!).ToList()); vt = VARTYPE.VT_ARRAY | VARTYPE.VT_VARIANT; } return; @@ -1032,37 +1037,37 @@ public static partial class Ole32 if (isVector) AllocVector(GetArray(out sz), sz); else - _ptr = ((CLIPDATA)value).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); + _ptr = ((CLIPDATA)value!).MarshalToPtr(Marshal.AllocCoTaskMem, out var _); break; case VARTYPE.VT_BSTR: if (isVector) - SetStringVector(ConvertToEnum(value), VarType); + SetStringVector(ConvertToEnum(value!), VarType); else { if (isRef) - SetStruct((IntPtr?)value, VarType); + SetStruct((IntPtr)value!, VarType); else - _ptr = Marshal.StringToBSTR(value?.ToString()); + _ptr = Marshal.StringToBSTR(value!.ToString()); } break; case VARTYPE.VT_BLOB: case VARTYPE.VT_BLOB_OBJECT: if (!isVector && !isRef) - _blob = (BLOB)value; + _blob = (BLOB)value!; break; case VARTYPE.VT_LPSTR: if (isVector) - SetStringVector(ConvertToEnum(value), VarType); + SetStringVector(ConvertToEnum(value!), VarType); else _ptr = Marshal.StringToCoTaskMemAnsi(value?.ToString()); break; case VARTYPE.VT_LPWSTR: if (isVector) - SetStringVector(ConvertToEnum(value), VarType); + SetStringVector(ConvertToEnum(value!), VarType); else _ptr = Marshal.StringToCoTaskMemUni(value?.ToString()); break; @@ -1072,7 +1077,7 @@ public static partial class Ole32 if (isVector) AllocVector(GetArray(out sz, ToIUnkPtr), sz); else - SetStruct(ToIUnkPtr(value), VarType); + SetStruct(ToIUnkPtr(value!), VarType); break; #if !(NETSTANDARD2_0) @@ -1081,20 +1086,20 @@ public static partial class Ole32 if (isVector) AllocVector(GetArray(out sz, ToIDispPtr), sz); else - SetStruct(ToIDispPtr(value), VarType); + SetStruct(ToIDispPtr(value!), VarType); break; #endif case VARTYPE.VT_STREAM: case VARTYPE.VT_STREAMED_OBJECT: if (!isVector && !isRef) - SetStruct(Marshal.GetComInterfaceForObject(value, typeof(IStream)), VarType); + SetStruct(Marshal.GetComInterfaceForObject(value!, typeof(IStream)), VarType); break; case VARTYPE.VT_STORAGE: case VARTYPE.VT_STORED_OBJECT: if (!isVector && !isRef) - SetStruct(Marshal.GetComInterfaceForObject(value, typeof(IStorage)), VarType); + SetStruct(Marshal.GetComInterfaceForObject(value!, typeof(IStorage)), VarType); break; case VARTYPE.VT_DECIMAL: @@ -1110,7 +1115,7 @@ public static partial class Ole32 if (isVector) AllocVector(GetArray(out sz, o => { ((PROPVARIANT)o).Clone(out var oo); return oo; }), sz); else if (isRef) - InitPropVariantVectorFromPropVariant((PROPVARIANT)value, this); + InitPropVariantVectorFromPropVariant((PROPVARIANT)value!, this); break; case VARTYPE.VT_USERDEFINED: @@ -1121,26 +1126,26 @@ public static partial class Ole32 throw new ArgumentOutOfRangeException(nameof(Value), $"{vt}={value}"); } - HRESULT AllocVector(T[] vector, uint vsz, PROPVARIANT pv = null) + HRESULT AllocVector(T[] vector, uint vsz, PROPVARIANT? pv = null) { _blob.cbSize = vsz; _blob.pBlobData = vector.MarshalToPtr(global::System.Runtime.InteropServices.Marshal.AllocCoTaskMem, out var _); return HRESULT.S_OK; } - T[] GetArray(out uint len, Func conv = null) + T[] GetArray(out uint len, Func? conv = null) { - var ret = ConvertToEnum(value, conv).ToArray(); + var ret = ConvertToEnum(value!, conv).ToArray(); len = (uint)ret.Length; return ret; } - void Init(Func init, Func conv = null) where T : struct + void Init(Func init, Func? conv = null) where T : struct { if (isVector) init(GetArray(out sz, conv), sz, this).ThrowIfFailed(); else - SetStruct((T?)(conv?.Invoke(value) ?? value), VarType); + SetStruct((T?)(conv?.Invoke(value!) ?? value), VarType); } } } diff --git a/PInvoke/Ole/Ole32/PropIdl.cs b/PInvoke/Ole/Ole32/PropIdl.cs index 1888cb6a..412a81b3 100644 --- a/PInvoke/Ole/Ole32/PropIdl.cs +++ b/PInvoke/Ole/Ole32/PropIdl.cs @@ -376,7 +376,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertysetstorage-create [PreserveSig] - HRESULT Create(in Guid rfmtid, [In] IntPtr pclsid, [In] PROPSETFLAG grfFlags, [In] STGM grfMode, out IPropertyStorage ppprstg); + HRESULT Create(in Guid rfmtid, [In, Optional] IntPtr pclsid, [In] PROPSETFLAG grfFlags, [In] STGM grfMode, out IPropertyStorage ppprstg); /// /// The Open method opens a property set contained in the property set storage object. @@ -739,7 +739,8 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertystorage-readpropertynames [PreserveSig] - HRESULT ReadPropertyNames(uint cpropid, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] rgpropid, [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0)] string[] rglpwstrName); + HRESULT ReadPropertyNames(uint cpropid, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] rgpropid, + [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0)] string[] rglpwstrName); /// /// @@ -791,7 +792,8 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertystorage-writepropertynames [PreserveSig] - HRESULT WritePropertyNames(uint cpropid, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] rgpropid, [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0)] string[] rglpwstrName); + HRESULT WritePropertyNames(uint cpropid, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] uint[] rgpropid, + [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0)] string[] rglpwstrName); /// /// The DeletePropertyNames method deletes specified string names from the current property set. @@ -980,7 +982,7 @@ public static partial class Ole32 /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertystorage-settimes [PreserveSig] - HRESULT SetTimes(in FILETIME pctime, in FILETIME patime, in FILETIME pmtime); + HRESULT SetTimes([In, Optional] IntPtr pctime, [In, Optional] IntPtr patime, [In, Optional] IntPtr pmtime); /// /// @@ -1105,7 +1107,7 @@ public static partial class Ole32 /// For more information, see Property Storage Considerations. /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertystorage-readmultiple - public static HRESULT ReadMultiple(this IPropertyStorage ipst, PROPSPEC[] rgpspec, out PROPVARIANT[] rgpropvar) + public static HRESULT ReadMultiple(this IPropertyStorage ipst, PROPSPEC[] rgpspec, out PROPVARIANT[]? rgpropvar) { if (ipst is null) throw new ArgumentNullException(nameof(ipst)); if (rgpspec is null) throw new ArgumentNullException(nameof(rgpspec)); @@ -1115,6 +1117,52 @@ public static partial class Ole32 return hr; } + /// + /// + /// The SetTimes method sets the modification, access, and creation times of this property set, if supported by the + /// implementation. Not all implementations support all these time values. + /// + /// + /// The reference. + /// + /// + /// Pointer to the new creation time for the property set. May be NULL, indicating that this time is not to be modified by + /// this call. + /// + /// + /// + /// + /// Pointer to the new access time for the property set. May be NULL, indicating that this time is not to be modified by + /// this call. + /// + /// + /// + /// + /// Pointer to the new modification time for the property set. May be NULL, indicating that this time is not to be + /// modified by this call. + /// + /// + /// + /// This method supports the standard return value E_UNEXPECTED, in addition to the following: + /// + /// + /// + /// Sets the modification, access, and creation times of the current open property set, if supported by the implementation (not + /// all implementations support all these time values). Unsupported time stamps are always reported as zero, enabling the caller + /// to test for support. A call to IPropertyStorage::Stat supplies (among other data) time-stamp information. + /// + /// + /// Notice that this functionality is provided as an IPropertyStorage method on a property-storage object that is already open, + /// in contrast to being provided as a method in IPropertySetStorage. Normally, when the SetTimes method is not explicitly + /// called, the access and modification times are updated as a side effect of reading and writing the property set. When + /// SetTimes is used, the latest specified times supersede either default times or time values specified in previous calls + /// to SetTimes. + /// + /// + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertystorage-settimes + public static HRESULT SetTimes(this IPropertyStorage ipst, [In, Optional] FILETIME? pctime, [In, Optional] FILETIME? patime, [In, Optional] FILETIME? pmtime) => + ipst.SetTimes((SafeCoTaskMemStruct)pctime, (SafeCoTaskMemStruct)patime, (SafeCoTaskMemStruct)pmtime); + /// /// The WriteMultiple method writes a specified group of properties to the current property set. If a property with a /// specified name or property identifier already exists, it is replaced, even when the old and new types for the property value diff --git a/PInvoke/Ole/Ole32/UnknwnBase.cs b/PInvoke/Ole/Ole32/UnknwnBase.cs index 3f93a30a..22415dc1 100644 --- a/PInvoke/Ole/Ole32/UnknwnBase.cs +++ b/PInvoke/Ole/Ole32/UnknwnBase.cs @@ -93,7 +93,7 @@ public static partial class Ole32 // https://docs.microsoft.com/en-us/windows/desktop/api/unknwn/nf-unknwn-iclassfactory-createinstance HRESULT CreateInstance( // IUnknown *pUnkOuter, REFIID riid, void **ppvObject ); [PreserveSig] - HRESULT CreateInstance([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkOuter, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 1)] out object ppvObject); + HRESULT CreateInstance([In, MarshalAs(UnmanagedType.IUnknown)] object? pUnkOuter, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 1)] out object? ppvObject); /// Locks an object application open in memory. This enables instances to be created more quickly. /// If TRUE, increments the lock count; if FALSE, decrements the lock count. diff --git a/PInvoke/Ole/Ole32/WTypes.PROPERTYKEY.cs b/PInvoke/Ole/Ole32/WTypes.PROPERTYKEY.cs index 4f27344f..8628922f 100644 --- a/PInvoke/Ole/Ole32/WTypes.PROPERTYKEY.cs +++ b/PInvoke/Ole/Ole32/WTypes.PROPERTYKEY.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; @@ -7,71 +8,79 @@ using System.Text; namespace Vanara.PInvoke; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member + public static partial class Ole32 { /// - public const uint PID_DICTIONARY = 0; + public const uint PID_BEHAVIOR = 0x80000003; /// public const uint PID_CODEPAGE = 0x1; /// - public const uint PID_FIRST_USABLE = 0x2; + public const uint PID_DICTIONARY = 0; /// public const uint PID_FIRST_NAME_DEFAULT = 0xfff; + /// + public const uint PID_FIRST_USABLE = 0x2; + + /// + public const uint PID_ILLEGAL = 0xffffffff; + /// public const uint PID_LOCALE = 0x80000000; + /// Range which is read-only to downlevel implementations + public const uint PID_MAX_READONLY = 0xbfffffff; + + /// Range which is read-only to downlevel implementations + public const uint PID_MIN_READONLY = 0x80000000; + /// public const uint PID_MODIFY_TIME = 0x80000001; /// public const uint PID_SECURITY = 0x80000002; - /// - public const uint PID_BEHAVIOR = 0x80000003; - - /// - public const uint PID_ILLEGAL = 0xffffffff; - - /// Range which is read-only to downlevel implementations - public const uint PID_MIN_READONLY = 0x80000000; - - /// Range which is read-only to downlevel implementations - public const uint PID_MAX_READONLY = 0xbfffffff; - /// Specifies the FMTID/PID identifier that programmatically identifies a property. Replaces SHCOLUMNID. /// /// As of Windows Vista, the SHCOLUMNID structure is simply an alias for PROPERTYKEY, as shown in this declaration from Shobjidl.h. - /// SHCOLUMNID can be considered a legacy structure with PROPERTYKEY being the new, preferred form. PROPERTYKEY has a broader purpose than SHCOLUMNID, and the new name is more descriptive of its uses. + /// + /// SHCOLUMNID can be considered a legacy structure with PROPERTYKEY being the new, preferred form. PROPERTYKEY has a broader + /// purpose than SHCOLUMNID, and the new name is more descriptive of its uses. + /// /// - // https://docs.microsoft.com/en-us/windows/win32/api/wtypes/ns-wtypes-propertykey - // typedef struct _tagpropertykey { GUID fmtid; DWORD pid; } PROPERTYKEY; + // https://docs.microsoft.com/en-us/windows/win32/api/wtypes/ns-wtypes-propertykey typedef struct _tagpropertykey { GUID fmtid; DWORD + // pid; } PROPERTYKEY; [PInvokeData("wtypes.h", MSDNShortId = "3f5f31af-f040-443b-9045-9761055381ea")] [StructLayout(LayoutKind.Sequential, Pack = 4)] public partial struct PROPERTYKEY : IComparable, IEquatable { - private static Dictionary revIndex; + private static readonly Lazy> revIndex = new(() => { + var d = new Dictionary(); + AddMembersToIndex(d, typeof(System)); + return d; + }); /// - /// Type: GUID - /// A unique GUID for the property. + /// Type: GUID + /// A unique GUID for the property. /// public Guid fmtid; /// - /// Type: DWORD - /// A property identifier (PID). This parameter is not used as in SHCOLUMNID. It is recommended that you set this value to PID_FIRST_USABLE. Any value greater than or equal to 2 is acceptable. - /// - /// Note Values of 0 and 1 are reserved and should not be used. + /// Type: DWORD + /// + /// A property identifier (PID). This parameter is not used as in SHCOLUMNID. It is recommended that you set this value to + /// PID_FIRST_USABLE. Any value greater than or equal to 2 is acceptable. + /// + /// Note Values of 0 and 1 are reserved and should not be used. /// public uint pid; - /// - /// Initializes a new instance of the struct. - /// + /// Initializes a new instance of the struct. /// The key. /// The identifier. public PROPERTYKEY(Guid key, uint id) @@ -80,31 +89,27 @@ public static partial class Ole32 pid = id; } - /// - /// A unique GUID for the property. - /// - public Guid Key => fmtid; + /// A unique GUID for the property. + public readonly Guid Key => fmtid; /// - /// A property identifier (PID). This parameter is not used as in SHCOLUMNID. It is recommended that you set this value to PID_FIRST_USABLE. Any value greater than or equal to 2 is acceptable. /// - /// Note Values of 0 and 1 are reserved and should not be used. + /// A property identifier (PID). This parameter is not used as in SHCOLUMNID. It is recommended that you set this value to + /// PID_FIRST_USABLE. Any value greater than or equal to 2 is acceptable. + /// + /// Note Values of 0 and 1 are reserved and should not be used. /// - public uint Id => pid; + public readonly uint Id => pid; /// public override string ToString() => GetCanonicalName() ?? ReverseLookup(this) ?? $"{Key:B} {Id}"; /// - public override bool Equals(object obj) => obj is PROPERTYKEY other && Equals(other); + public override bool Equals(object? obj) => obj is PROPERTYKEY other && Equals(other); - /// - /// Indicates whether the current object is equal to another object of the same type. - /// + /// Indicates whether the current object is equal to another object of the same type. /// An object to compare with this object. - /// - /// true if the current object is equal to the parameter; otherwise, false. - /// + /// true if the current object is equal to the parameter; otherwise, false. public bool Equals(PROPERTYKEY other) => Id == other.Id && Equals(Key, other.Key); /// Implements the equality operator. @@ -122,67 +127,56 @@ public static partial class Ole32 /// public override int GetHashCode() => new { Key, Id }.GetHashCode(); - /// - /// Compares the current object with another object of the same type. - /// + /// Compares the current object with another object of the same type. /// An object to compare with this object. /// - /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following + /// meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal + /// to . Greater than zero This object is greater than . /// int IComparable.CompareTo(PROPERTYKEY other) { - var ret = Key.GetHashCode() - other.Key.GetHashCode(); + int ret = Key.GetHashCode() - other.Key.GetHashCode(); if (ret == 0) ret = (int)(Id - other.Id); return ret; } - /// - /// Gets the canonical name of the key. - /// + /// Gets the canonical name of the key. /// The name returned from PSGetNameFromPropertyKey. - public string GetCanonicalName() + public readonly string? GetCanonicalName() { - var pk = this; - return PropSys.PSGetNameFromPropertyKey(pk, out var str).Succeeded ? str : null; + PROPERTYKEY pk = this; + return PropSys.PSGetNameFromPropertyKey(pk, out string? str).Succeeded ? str : null; } /// Provided a key, use reflection to do a reverse lookup and find the string value. /// The key. /// The string value of the name. - public static string ReverseLookup(PROPERTYKEY key) - { - if (revIndex == null) - { - revIndex = new Dictionary(); - AddMembersToIndex(typeof(System)); - } - revIndex.TryGetValue(key, out var ret); - return ret; + public static string? ReverseLookup(PROPERTYKEY key) => revIndex.Value.TryGetValue(key, out string? ret) ? ret : null; - void AddMembersToIndex(Type type, int level = 0) + private static void AddMembersToIndex(Dictionary dict, Type type, int level = 0) + { + foreach (PropertyInfo pi in type.GetProperties(BindingFlags.Public | BindingFlags.Static).Where(p => p.PropertyType == typeof(PROPERTYKEY))) { - foreach (var pi in type.GetProperties(BindingFlags.Public | BindingFlags.Static)) + Type pType = type; + StringBuilder name = new(pi.Name); + for (int i = 0; i < level; i++) { - if (pi.PropertyType == typeof(PROPERTYKEY)) - { - var pType = type; - var name = new StringBuilder(pi.Name); - for (var i = 0; i < level; i++) - { - name.Insert(0, pType.Name + "."); - pType = pType.DeclaringType; - } - try - { - revIndex.Add((PROPERTYKEY)pi.GetValue(null, null), name.ToString()); - } - catch { } - } + name.Insert(0, pType.Name + "."); + if (pType.DeclaringType is null) + break; + pType = pType.DeclaringType; } - foreach (var ti in type.GetNestedTypes(BindingFlags.Public)) - AddMembersToIndex(ti, level + 1); + try + { + if (pi.GetValue(null, null) is PROPERTYKEY pk) + dict.Add(pk, name.ToString()); + } + catch { } } + foreach (Type ti in type.GetNestedTypes(BindingFlags.Public)) + AddMembersToIndex(dict, ti, level + 1); } [PInvokeData("Propkey.h", MSDNShortId = "dd561977")] @@ -195,7 +189,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 17 (PIDSI_THUMBNAIL) /// public static PROPERTYKEY Thumbnail - = new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 17); + = new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 17); /// /// Name: System.AcquisitionID -- PKEY_AcquisitionID @@ -204,7 +198,7 @@ public static partial class Ole32 /// FormatID: {65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}, 100 /// public static PROPERTYKEY AcquisitionID - => new PROPERTYKEY(new Guid("{65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}"), 100); + => new(new Guid("{65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}"), 100); /// /// Name: System.ApplicationName -- PKEY_ApplicationName @@ -213,7 +207,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 18 (PIDSI_APPNAME) /// public static PROPERTYKEY ApplicationName - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 18); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 18); /// /// Name: System.Author -- PKEY_Author @@ -224,18 +218,16 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 4 (PIDSI_AUTHOR) /// public static PROPERTYKEY Author - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 4); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 4); /// /// Name: System.Capacity -- PKEY_Capacity /// Description: The amount of total space in bytes. /// Type: UInt64 -- VT_UI8 - /// - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties) - /// + /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties) /// public static PROPERTYKEY Capacity - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 3); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 3); /// /// Name: System.Category -- PKEY_Category @@ -244,7 +236,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 2 (PIDDSI_CATEGORY) /// public static PROPERTYKEY Category - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 2); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 2); /// /// Name: System.Comment -- PKEY_Comment @@ -253,7 +245,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 6 (PIDSI_COMMENTS) /// public static PROPERTYKEY Comment - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 6); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 6); /// /// Name: System.Company -- PKEY_Company @@ -262,7 +254,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 15 (PIDDSI_COMPANY) /// public static PROPERTYKEY Company - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 15); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 15); /// /// Name: System.ComputerName -- PKEY_ComputerName @@ -271,19 +263,19 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 5 (PID_COMPUTERNAME) /// public static PROPERTYKEY ComputerName - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 5); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 5); /// /// Name: System.ContainedItems -- PKEY_ContainedItems /// - /// Description: The list of type of items, this item contains. For example, this item contains urls, attachments etc. This - /// is represented as a vector array of GUIDs where each GUID represents certain type. + /// Description: The list of type of items, this item contains. For example, this item contains urls, attachments etc. This is + /// represented as a vector array of GUIDs where each GUID represents certain type. /// /// Type: Multivalue Guid -- VT_VECTOR | VT_CLSID (For variants: VT_ARRAY | VT_CLSID) /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 29 /// public static PROPERTYKEY ContainedItems - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 29); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 29); /// /// Name: System.ContentStatus -- PKEY_ContentStatus @@ -292,7 +284,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 27 /// public static PROPERTYKEY ContentStatus - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 27); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 27); /// /// Name: System.ContentType -- PKEY_ContentType @@ -301,7 +293,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 26 /// public static PROPERTYKEY ContentType - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 26); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 26); /// /// Name: System.Copyright -- PKEY_Copyright @@ -310,7 +302,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 11 (PIDMSI_COPYRIGHT) /// public static PROPERTYKEY Copyright - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 11); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 11); /// /// Name: System.DateAccessed -- PKEY_DateAccessed @@ -319,19 +311,19 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 16 (PID_STG_ACCESSTIME) /// public static PROPERTYKEY DateAccessed - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 16); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 16); /// /// Name: System.DateAcquired -- PKEY_DateAcquired /// - /// Description: The time the file entered the system via acquisition. This is not the same as System.DateImported. Examples - /// are when pictures are acquired from a camera, or when music is purchased online. + /// Description: The time the file entered the system via acquisition. This is not the same as System.DateImported. Examples are + /// when pictures are acquired from a camera, or when music is purchased online. /// /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) /// FormatID: {2CBAA8F5-D81F-47CA-B17A-F8D822300131}, 100 /// public static PROPERTYKEY DateAcquired - => new PROPERTYKEY(new Guid("{2CBAA8F5-D81F-47CA-B17A-F8D822300131}"), 100); + => new(new Guid("{2CBAA8F5-D81F-47CA-B17A-F8D822300131}"), 100); /// /// Name: System.DateArchived -- PKEY_DateArchived @@ -340,7 +332,7 @@ public static partial class Ole32 /// FormatID: {43F8D7B7-A444-4F87-9383-52271C9B915C}, 100 /// public static PROPERTYKEY DateArchived - => new PROPERTYKEY(new Guid("{43F8D7B7-A444-4F87-9383-52271C9B915C}"), 100); + => new(new Guid("{43F8D7B7-A444-4F87-9383-52271C9B915C}"), 100); /// /// Name: System.DateCompleted -- PKEY_DateCompleted @@ -349,7 +341,7 @@ public static partial class Ole32 /// FormatID: {72FAB781-ACDA-43E5-B155-B2434F85E678}, 100 /// public static PROPERTYKEY DateCompleted - => new PROPERTYKEY(new Guid("{72FAB781-ACDA-43E5-B155-B2434F85E678}"), 100); + => new(new Guid("{72FAB781-ACDA-43E5-B155-B2434F85E678}"), 100); /// /// Name: System.DateCreated -- PKEY_DateCreated @@ -358,7 +350,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 15 (PID_STG_CREATETIME) /// public static PROPERTYKEY DateCreated - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 15); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 15); /// /// Name: System.DateImported -- PKEY_DateImported @@ -370,7 +362,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18258 /// public static PROPERTYKEY DateImported - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18258); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18258); /// /// Name: System.DateModified -- PKEY_DateModified @@ -379,7 +371,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 14 (PID_STG_WRITETIME) /// public static PROPERTYKEY DateModified - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 14); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 14); /// /// Name: System.DescriptionID -- PKEY_DescriptionID @@ -388,7 +380,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 2 (PID_DESCRIPTIONID) /// public static PROPERTYKEY DescriptionID - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 2); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 2); /// /// Name: System.DueDate -- PKEY_DueDate @@ -397,7 +389,7 @@ public static partial class Ole32 /// FormatID: {3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}, 100 /// public static PROPERTYKEY DueDate - => new PROPERTYKEY(new Guid("{3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}"), 100); + => new(new Guid("{3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}"), 100); /// /// Name: System.EndDate -- PKEY_EndDate @@ -406,7 +398,7 @@ public static partial class Ole32 /// FormatID: {C75FAA05-96FD-49E7-9CB4-9F601082D553}, 100 /// public static PROPERTYKEY EndDate - => new PROPERTYKEY(new Guid("{C75FAA05-96FD-49E7-9CB4-9F601082D553}"), 100); + => new(new Guid("{C75FAA05-96FD-49E7-9CB4-9F601082D553}"), 100); /// /// Name: System.FileAllocationSize -- PKEY_FileAllocationSize @@ -415,7 +407,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 18 (PID_STG_ALLOCSIZE) /// public static PROPERTYKEY FileAllocationSize - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 18); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 18); /// /// Name: System.FileAttributes -- PKEY_FileAttributes @@ -424,7 +416,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 13 (PID_STG_ATTRIBUTES) /// public static PROPERTYKEY FileAttributes - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 13); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 13); /// /// Name: System.FileCount -- PKEY_FileCount @@ -433,7 +425,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 12 /// public static PROPERTYKEY FileCount - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 12); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 12); /// /// Name: System.FileDescription -- PKEY_FileDescription @@ -442,16 +434,15 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 3 (PIDVSI_FileDescription) /// public static PROPERTYKEY FileDescription - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 3); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 3); /// /// Name: System.FileExtension -- PKEY_FileExtension /// - /// Description: This is the file extension of the file based item, including the leading period. If System.FileName is - /// VT_EMPTY, then this property should be too. Otherwise, it should be derived appropriately by the data source from - /// System.FileName. If System.FileName does not have a file extension, this value should be VT_EMPTY. To obtain the type of - /// any item (including an item that is not a file), use System.ItemType. Example values: If the path is... The property - /// value is... + /// Description: This is the file extension of the file based item, including the leading period. If System.FileName is VT_EMPTY, + /// then this property should be too. Otherwise, it should be derived appropriately by the data source from System.FileName. If + /// System.FileName does not have a file extension, this value should be VT_EMPTY. To obtain the type of any item (including an + /// item that is not a file), use System.ItemType. Example values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" ".txt" /// "\\server\share\mydir\goodnews.doc" ".doc" "\\server\share\numbers.xls" ".xls" "\\server\share\folder" VT_EMPTY /// "c:\foo\MyFolder" VT_EMPTY [desktop] VT_EMPTY @@ -460,38 +451,38 @@ public static partial class Ole32 /// FormatID: {E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}, 100 /// public static PROPERTYKEY FileExtension - => new PROPERTYKEY(new Guid("{E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}"), 100); + => new(new Guid("{E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}"), 100); /// /// Name: System.FileFRN -- PKEY_FileFRN /// - /// Description: This is the unique file ID, also known as the File Reference Number. For a given file, this is the same - /// value as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx(). + /// Description: This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value as + /// is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx(). /// /// Type: UInt64 -- VT_UI8 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 21 (PID_STG_FRN) /// public static PROPERTYKEY FileFRN - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 21); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 21); /// /// Name: System.FileName -- PKEY_FileName /// /// Description: This is the file name (including extension) of the file. It is possible that the item might not exist on a - /// filesystem (ie, it may not be opened using CreateFile). Nonetheless, if the item is represented as a file from the - /// logical sense (and its name follows standard Win32 file-naming syntax), then the data source should emit this property. - /// If an item is not a file, then the value for this property is VT_EMPTY. See System.ItemNameDisplay. This has the same - /// value as System.ParsingName for items that are provided by the Shell's file folder. Example values: If the path is... The - /// property value is... + /// filesystem (ie, it may not be opened using CreateFile). Nonetheless, if the item is represented as a file from the logical + /// sense (and its name follows standard Win32 file-naming syntax), then the data source should emit this property. If an item is + /// not a file, then the value for this property is VT_EMPTY. See System.ItemNameDisplay. This has the same value as + /// System.ParsingName for items that are provided by the Shell's file folder. Example values: If the path is... The property + /// value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "hello.txt" - /// "\\server\share\mydir\goodnews.doc" "goodnews.doc" "\\server\share\numbers.xls" "numbers.xls" "c:\foo\MyFolder" - /// "MyFolder" (email message) VT_EMPTY (song on portable device) "song.wma" + /// "\\server\share\mydir\goodnews.doc" "goodnews.doc" "\\server\share\numbers.xls" "numbers.xls" "c:\foo\MyFolder" "MyFolder" + /// (email message) VT_EMPTY (song on portable device) "song.wma" /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {41CF5AE0-F75A-4806-BD87-59C7D9248EB9}, 100 /// public static PROPERTYKEY FileName - => new PROPERTYKEY(new Guid("{41CF5AE0-F75A-4806-BD87-59C7D9248EB9}"), 100); + => new(new Guid("{41CF5AE0-F75A-4806-BD87-59C7D9248EB9}"), 100); /// /// Name: System.FileOwner -- PKEY_FileOwner @@ -500,7 +491,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Misc) {9B174B34-40FF-11D2-A27E-00C04FC30871}, 4 (PID_MISC_OWNER) /// public static PROPERTYKEY FileOwner - => new PROPERTYKEY(new Guid("{9B174B34-40FF-11D2-A27E-00C04FC30871}"), 4); + => new(new Guid("{9B174B34-40FF-11D2-A27E-00C04FC30871}"), 4); /// /// Name: System.FileVersion -- PKEY_FileVersion @@ -509,7 +500,7 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 4 (PIDVSI_FileVersion) /// public static PROPERTYKEY FileVersion - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 4); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 4); /// /// Name: System.FindData -- PKEY_FindData @@ -518,7 +509,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 0 (PID_FINDDATA) /// public static PROPERTYKEY FindData - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 0); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 0); /// /// Name: System.FlagColor -- PKEY_FlagColor @@ -527,18 +518,16 @@ public static partial class Ole32 /// FormatID: {67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}, 100 /// public static PROPERTYKEY FlagColor - => new PROPERTYKEY(new Guid("{67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}"), 100); + => new(new Guid("{67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}"), 100); /// /// Name: System.FlagColorText -- PKEY_FlagColorText - /// - /// Description: This is the user-friendly form of System.FlagColor. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.FlagColor. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}, 100 /// public static PROPERTYKEY FlagColorText - => new PROPERTYKEY(new Guid("{45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}"), 100); + => new(new Guid("{45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}"), 100); /// /// Name: System.FlagStatus -- PKEY_FlagStatus @@ -547,29 +536,25 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 12 /// public static PROPERTYKEY FlagStatus - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 12); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 12); /// /// Name: System.FlagStatusText -- PKEY_FlagStatusText - /// - /// Description: This is the user-friendly form of System.FlagStatus. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.FlagStatus. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {DC54FD2E-189D-4871-AA01-08C2F57A4ABC}, 100 /// public static PROPERTYKEY FlagStatusText - => new PROPERTYKEY(new Guid("{DC54FD2E-189D-4871-AA01-08C2F57A4ABC}"), 100); + => new(new Guid("{DC54FD2E-189D-4871-AA01-08C2F57A4ABC}"), 100); /// /// Name: System.FreeSpace -- PKEY_FreeSpace /// Description: The amount of free space in bytes. /// Type: UInt64 -- VT_UI8 - /// - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties) - /// + /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties) /// public static PROPERTYKEY FreeSpace - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 2); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 2); /// /// Name: System.FullText -- PKEY_FullText @@ -581,7 +566,7 @@ public static partial class Ole32 /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 6 /// public static PROPERTYKEY FullText - => new PROPERTYKEY(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 6); + => new(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 6); /// /// Name: System.Identity -- PKEY_Identity @@ -590,7 +575,7 @@ public static partial class Ole32 /// FormatID: {A26F4AFC-7346-4299-BE47-EB1AE613139F}, 100 /// public static PROPERTYKEY IdentityProperty - => new PROPERTYKEY(new Guid("{A26F4AFC-7346-4299-BE47-EB1AE613139F}"), 100); + => new(new Guid("{A26F4AFC-7346-4299-BE47-EB1AE613139F}"), 100); /// /// Name: System.ImageParsingName -- PKEY_ImageParsingName @@ -599,7 +584,7 @@ public static partial class Ole32 /// FormatID: {D7750EE0-C6A4-48EC-B53E-B87B52E6D073}, 100 /// public static PROPERTYKEY ImageParsingName - => new PROPERTYKEY(new Guid("{D7750EE0-C6A4-48EC-B53E-B87B52E6D073}"), 100); + => new(new Guid("{D7750EE0-C6A4-48EC-B53E-B87B52E6D073}"), 100); /// /// Name: System.Importance -- PKEY_Importance @@ -608,18 +593,16 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 11 /// public static PROPERTYKEY Importance - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 11); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 11); /// /// Name: System.ImportanceText -- PKEY_ImportanceText - /// - /// Description: This is the user-friendly form of System.Importance. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Importance. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {A3B29791-7713-4E1D-BB40-17DB85F01831}, 100 /// public static PROPERTYKEY ImportanceText - => new PROPERTYKEY(new Guid("{A3B29791-7713-4E1D-BB40-17DB85F01831}"), 100); + => new(new Guid("{A3B29791-7713-4E1D-BB40-17DB85F01831}"), 100); /// /// Name: System.InfoTipText -- PKEY_InfoTipText @@ -628,7 +611,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 17 /// public static PROPERTYKEY InfoTipText - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 17); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 17); /// /// Name: System.InternalName -- PKEY_InternalName @@ -637,7 +620,7 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 5 (PIDVSI_InternalName) /// public static PROPERTYKEY InternalName - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 5); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 5); /// /// Name: System.IsAttachment -- PKEY_IsAttachment @@ -646,7 +629,7 @@ public static partial class Ole32 /// FormatID: {F23F425C-71A1-4FA8-922F-678EA4A60408}, 100 /// public static PROPERTYKEY IsAttachment - => new PROPERTYKEY(new Guid("{F23F425C-71A1-4FA8-922F-678EA4A60408}"), 100); + => new(new Guid("{F23F425C-71A1-4FA8-922F-678EA4A60408}"), 100); /// /// Name: System.IsDefaultNonOwnerSaveLocation -- PKEY_IsDefaultNonOwnerSaveLocation @@ -655,7 +638,7 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 5 /// public static PROPERTYKEY IsDefaultNonOwnerSaveLocation - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 5); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 5); /// /// Name: System.IsDefaultSaveLocation -- PKEY_IsDefaultSaveLocation @@ -664,7 +647,7 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 3 /// public static PROPERTYKEY IsDefaultSaveLocation - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 3); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 3); /// /// Name: System.IsDeleted -- PKEY_IsDeleted @@ -673,7 +656,7 @@ public static partial class Ole32 /// FormatID: {5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}, 100 /// public static PROPERTYKEY IsDeleted - => new PROPERTYKEY(new Guid("{5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}"), 100); + => new(new Guid("{5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}"), 100); /// /// Name: System.IsEncrypted -- PKEY_IsEncrypted @@ -682,7 +665,7 @@ public static partial class Ole32 /// FormatID: {90E5E14E-648B-4826-B2AA-ACAF790E3513}, 10 /// public static PROPERTYKEY IsEncrypted - => new PROPERTYKEY(new Guid("{90E5E14E-648B-4826-B2AA-ACAF790E3513}"), 10); + => new(new Guid("{90E5E14E-648B-4826-B2AA-ACAF790E3513}"), 10); /// /// Name: System.IsFlagged -- PKEY_IsFlagged @@ -691,7 +674,7 @@ public static partial class Ole32 /// FormatID: {5DA84765-E3FF-4278-86B0-A27967FBDD03}, 100 /// public static PROPERTYKEY IsFlagged - => new PROPERTYKEY(new Guid("{5DA84765-E3FF-4278-86B0-A27967FBDD03}"), 100); + => new(new Guid("{5DA84765-E3FF-4278-86B0-A27967FBDD03}"), 100); /// /// Name: System.IsFlaggedComplete -- PKEY_IsFlaggedComplete @@ -700,7 +683,7 @@ public static partial class Ole32 /// FormatID: {A6F360D2-55F9-48DE-B909-620E090A647C}, 100 /// public static PROPERTYKEY IsFlaggedComplete - => new PROPERTYKEY(new Guid("{A6F360D2-55F9-48DE-B909-620E090A647C}"), 100); + => new(new Guid("{A6F360D2-55F9-48DE-B909-620E090A647C}"), 100); /// /// Name: System.IsIncomplete -- PKEY_IsIncomplete @@ -709,7 +692,7 @@ public static partial class Ole32 /// FormatID: {346C8BD1-2E6A-4C45-89A4-61B78E8E700F}, 100 /// public static PROPERTYKEY IsIncomplete - => new PROPERTYKEY(new Guid("{346C8BD1-2E6A-4C45-89A4-61B78E8E700F}"), 100); + => new(new Guid("{346C8BD1-2E6A-4C45-89A4-61B78E8E700F}"), 100); /// /// Name: System.IsLocationSupported -- PKEY_IsLocationSupported @@ -718,7 +701,7 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 8 /// public static PROPERTYKEY IsLocationSupported - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 8); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 8); /// /// Name: System.IsPinnedToNameSpaceTree -- PKEY_IsPinnedToNameSpaceTree @@ -727,7 +710,7 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 2 /// public static PROPERTYKEY IsPinnedToNameSpaceTree - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 2); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 2); /// /// Name: System.IsRead -- PKEY_IsRead @@ -736,7 +719,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 10 /// public static PROPERTYKEY IsRead - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 10); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 10); /// /// Name: System.IsSearchOnlyItem -- PKEY_IsSearchOnlyItem @@ -745,7 +728,7 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 4 /// public static PROPERTYKEY IsSearchOnlyItem - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 4); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 4); /// /// Name: System.IsSendToTarget -- PKEY_IsSendToTarget @@ -754,7 +737,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 33 /// public static PROPERTYKEY IsSendToTarget - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 33); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 33); /// /// Name: System.IsShared -- PKEY_IsShared @@ -763,7 +746,7 @@ public static partial class Ole32 /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 100 /// public static PROPERTYKEY IsShared - => new PROPERTYKEY(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 100); + => new(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 100); /// /// Name: System.ItemAuthors -- PKEY_ItemAuthors @@ -775,7 +758,7 @@ public static partial class Ole32 /// FormatID: {D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}, 100 /// public static PROPERTYKEY ItemAuthors - => new PROPERTYKEY(new Guid("{D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}"), 100); + => new(new Guid("{D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}"), 100); /// /// Name: System.ItemClassType -- PKEY_ItemClassType @@ -784,26 +767,24 @@ public static partial class Ole32 /// FormatID: {048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}, 100 /// public static PROPERTYKEY ItemClassType - => new PROPERTYKEY(new Guid("{048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}"), 100); + => new(new Guid("{048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}"), 100); /// /// Name: System.ItemDate -- PKEY_ItemDate - /// - /// Description: This is the main date for an item. The date of interest. For example, for photos this maps to System.Photo.DateTaken. - /// + /// Description: This is the main date for an item. The date of interest. For example, for photos this maps to System.Photo.DateTaken. /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) /// FormatID: {F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}, 100 /// public static PROPERTYKEY ItemDate - => new PROPERTYKEY(new Guid("{F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}"), 100); + => new(new Guid("{F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}"), 100); /// /// Name: System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay /// /// Description: This is the user-friendly display name of the parent folder of an item. If System.ItemFolderPathDisplay is /// VT_EMPTY, then this property should be too. Otherwise, it should be derived appropriately by the data source from - /// System.ItemFolderPathDisplay. If the folder is a file folder, the value will be localized if a localized name is - /// available. Example values: If the path is... The property value is... + /// System.ItemFolderPathDisplay. If the folder is a file folder, the value will be localized if a localized name is available. + /// Example values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "bar" /// "\\server\share\mydir\goodnews.doc" "mydir" "\\server\share\numbers.xls" "share" "c:\foo\MyFolder" "foo" "/Mailbox /// Account/Inbox/'Re: Hello!'" "Inbox" @@ -812,32 +793,32 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 2 (PID_STG_DIRECTORY) /// public static PROPERTYKEY ItemFolderNameDisplay - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 2); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 2); /// /// Name: System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay /// - /// Description: This is the user-friendly display path of the parent folder of an item. If System.ItemPathDisplay is - /// VT_EMPTY, then this property should be too. Otherwise, it should be derived appropriately by the data source from + /// Description: This is the user-friendly display path of the parent folder of an item. If System.ItemPathDisplay is VT_EMPTY, + /// then this property should be too. Otherwise, it should be derived appropriately by the data source from /// System.ItemPathDisplay. Example values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "c:\foo\bar" - /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir" "\\server\share\numbers.xls" "\\server\share" - /// "c:\foo\MyFolder" "c:\foo" "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox" + /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir" "\\server\share\numbers.xls" "\\server\share" "c:\foo\MyFolder" + /// "c:\foo" "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox" /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 6 /// public static PROPERTYKEY ItemFolderPathDisplay - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 6); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 6); /// /// Name: System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow /// /// Description: This is the user-friendly display path of the parent folder of an item. The format of the string should be - /// tailored such that the folder name comes first, to optimize for a narrow viewing column. If the folder is a file folder, - /// the value includes localized names if they are present. If System.ItemFolderPathDisplay is VT_EMPTY, then this property - /// should be too. Otherwise, it should be derived appropriately by the data source from System.ItemFolderPathDisplay. - /// Example values: If the path is... The property value is... + /// tailored such that the folder name comes first, to optimize for a narrow viewing column. If the folder is a file folder, the + /// value includes localized names if they are present. If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be + /// too. Otherwise, it should be derived appropriately by the data source from System.ItemFolderPathDisplay. Example values: If + /// the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "bar (c:\foo)" /// "\\server\share\mydir\goodnews.doc" "mydir (\\server\share)" "\\server\share\numbers.xls" "share (\\server)" /// "c:\foo\MyFolder" "foo (c:\)" "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)" @@ -846,43 +827,42 @@ public static partial class Ole32 /// FormatID: {DABD30ED-0043-4789-A7F8-D013A4736622}, 100 /// public static PROPERTYKEY ItemFolderPathDisplayNarrow - => new PROPERTYKEY(new Guid("{DABD30ED-0043-4789-A7F8-D013A4736622}"), 100); + => new(new Guid("{DABD30ED-0043-4789-A7F8-D013A4736622}"), 100); /// /// Name: System.ItemName -- PKEY_ItemName /// - /// Description: This is the base-name of the System.ItemNameDisplay. If the item is a file this property includes the - /// extension in all cases, and will be localized if a localized name is available. If the item is a message, then the value - /// of this property does not include the forwarding or reply prefixes (see System.ItemNamePrefix). + /// Description: This is the base-name of the System.ItemNameDisplay. If the item is a file this property includes the extension + /// in all cases, and will be localized if a localized name is available. If the item is a message, then the value of this + /// property does not include the forwarding or reply prefixes (see System.ItemNamePrefix). /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}, 100 /// public static PROPERTYKEY ItemName - => new PROPERTYKEY(new Guid("{6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}"), 100); + => new(new Guid("{6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}"), 100); /// /// Name: System.ItemNameDisplay -- PKEY_ItemNameDisplay /// - /// Description: This is the display name in "most complete" form. This is the best effort unique representation of the name - /// of an item that makes sense for end users to read. It is the concatentation of System.ItemNamePrefix and System.ItemName. - /// If the item is a file this property includes the extension in all cases, and will be localized if a localized name is - /// available. There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property is completely - /// different. Email messages are a key example. If the item is an email message, the item name is likely the subject. In - /// that case, the value must be the concatenation of the System.ItemNamePrefix and System.ItemName. Since the value of - /// System.ItemNamePrefix excludes any trailing whitespace, the concatenation must include a whitespace when generating - /// System.ItemNameDisplay. Note that this property is not guaranteed to be unique, but the idea is to promote the most - /// likely candidate that can be unique and also makes sense for end users. For example, for documents, you might think about - /// using System.Title as the System.ItemNameDisplay, but in practice the title of the documents may not be useful or unique - /// enough to be of value as the sole System.ItemNameDisplay. Instead, providing the value of System.FileName as the value of - /// System.ItemNameDisplay is a better candidate. In Windows Mail, the emails are stored in the file system as .eml files and - /// the System.FileName for those files are not human-friendly as they contain GUIDs. In this example, promoting - /// System.Subject as System.ItemNameDisplay makes more sense. Compatibility notes: Shell folder implementations on Vista: - /// use PKEY_ItemNameDisplay for the name column when you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get - /// the value of the name. Use another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property - /// store or ISF2::GetDetailsEx in order to get the value of the name. Shell folder implementations on XP: the first column - /// needs to be the name column, and Explorer will call ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID - /// does not matter. Example values: + /// Description: This is the display name in "most complete" form. This is the best effort unique representation of the name of + /// an item that makes sense for end users to read. It is the concatentation of System.ItemNamePrefix and System.ItemName. If the + /// item is a file this property includes the extension in all cases, and will be localized if a localized name is available. + /// There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property is completely different. + /// Email messages are a key example. If the item is an email message, the item name is likely the subject. In that case, the + /// value must be the concatenation of the System.ItemNamePrefix and System.ItemName. Since the value of System.ItemNamePrefix + /// excludes any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay. Note + /// that this property is not guaranteed to be unique, but the idea is to promote the most likely candidate that can be unique + /// and also makes sense for end users. For example, for documents, you might think about using System.Title as the + /// System.ItemNameDisplay, but in practice the title of the documents may not be useful or unique enough to be of value as the + /// sole System.ItemNameDisplay. Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a + /// better candidate. In Windows Mail, the emails are stored in the file system as .eml files and the System.FileName for those + /// files are not human-friendly as they contain GUIDs. In this example, promoting System.Subject as System.ItemNameDisplay makes + /// more sense. Compatibility notes: Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when you + /// want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use another PKEY (like PKEY_ItemName) + /// when you want Explorer to call either the folder's property store or ISF2::GetDetailsEx in order to get the value of the + /// name. Shell folder implementations on XP: the first column needs to be the name column, and Explorer will call + /// ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID does not matter. Example values: /// File: "hello.txt" /// Message: "Re: Let's talk about Tom's argyle socks!" Device folder: "song.wma" /// Folder: "Documents" @@ -891,44 +871,44 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 10 (PID_STG_NAME) /// public static PROPERTYKEY ItemNameDisplay - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 10); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 10); /// /// Name: System.ItemNamePrefix -- PKEY_ItemNamePrefix /// - /// Description: This is the prefix of an item, used for email messages. where the subject begins with "Re:" which is the - /// prefix. If the item is a file, then the value of this property is VT_EMPTY. If the item is a message, then the value of - /// this property is the forwarding or reply prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there - /// is no prefix. Example values: System.ItemNamePrefix System.ItemName System.ItemNameDisplay - /// --------------------- ------------------- ---------------------- VT_EMPTY "Great day" "Great day" "Re:" "Great day" - /// "Re: Great day" "Fwd: " "Monthly budget" "Fwd: Monthly budget" VT_EMPTY "accounts.xls" "accounts.xls" + /// Description: This is the prefix of an item, used for email messages. where the subject begins with "Re:" which is the prefix. + /// If the item is a file, then the value of this property is VT_EMPTY. If the item is a message, then the value of this property + /// is the forwarding or reply prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix. + /// Example values: System.ItemNamePrefix System.ItemName System.ItemNameDisplay + /// --------------------- ------------------- ---------------------- VT_EMPTY "Great day" "Great day" "Re:" "Great day" "Re: + /// Great day" "Fwd: " "Monthly budget" "Fwd: Monthly budget" VT_EMPTY "accounts.xls" "accounts.xls" /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {D7313FF1-A77A-401C-8C99-3DBDD68ADD36}, 100 /// public static PROPERTYKEY ItemNamePrefix - => new PROPERTYKEY(new Guid("{D7313FF1-A77A-401C-8C99-3DBDD68ADD36}"), 100); + => new(new Guid("{D7313FF1-A77A-401C-8C99-3DBDD68ADD36}"), 100); /// /// Name: System.ItemParticipants -- PKEY_ItemParticipants /// - /// Description: This is the generic list of people associated with an item and who contributed to the item. For example, - /// this is the combination of people in the To list, Cc list and sender of an email message. + /// Description: This is the generic list of people associated with an item and who contributed to the item. For example, this is + /// the combination of people in the To list, Cc list and sender of an email message. /// /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) /// FormatID: {D4D0AA16-9948-41A4-AA85-D97FF9646993}, 100 /// public static PROPERTYKEY ItemParticipants - => new PROPERTYKEY(new Guid("{D4D0AA16-9948-41A4-AA85-D97FF9646993}"), 100); + => new(new Guid("{D4D0AA16-9948-41A4-AA85-D97FF9646993}"), 100); /// /// Name: System.ItemPathDisplay -- PKEY_ItemPathDisplay /// - /// Description: This is the user-friendly display path to the item. If the item is a file or folder this property includes - /// the extension in all cases, and will be localized if a localized name is available. For other items,this is the - /// user-friendly equivalent, assuming the item exists in hierarchical storage. Unlike System.ItemUrl, this property value - /// does not include the URL scheme. To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell - /// namespace items using shell APIs, use System.ParsingPath. Example values: If the path is... The property value is... + /// Description: This is the user-friendly display path to the item. If the item is a file or folder this property includes the + /// extension in all cases, and will be localized if a localized name is available. For other items,this is the user-friendly + /// equivalent, assuming the item exists in hierarchical storage. Unlike System.ItemUrl, this property value does not include the + /// URL scheme. To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell namespace items using shell + /// APIs, use System.ParsingPath. Example values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "c:\foo\bar\hello.txt" /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir\goodnews.doc" "\\server\share\numbers.xls" /// "\\server\share\numbers.xls" "c:\foo\MyFolder" "c:\foo\MyFolder" "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox @@ -938,16 +918,15 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 7 /// public static PROPERTYKEY ItemPathDisplay - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 7); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 7); /// /// Name: System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow /// - /// Description: This is the user-friendly display path to the item. The format of the string should be tailored such that - /// the name comes first, to optimize for a narrow viewing column. If the item is a file, the value excludes the file - /// extension, and includes localized names if they are present. If the item is a message, the value includes the - /// System.ItemNamePrefix. To parse an item path, use System.ItemUrl or System.ParsingPath. Example values: If the path is... - /// The property value is... + /// Description: This is the user-friendly display path to the item. The format of the string should be tailored such that the + /// name comes first, to optimize for a narrow viewing column. If the item is a file, the value excludes the file extension, and + /// includes localized names if they are present. If the item is a message, the value includes the System.ItemNamePrefix. To + /// parse an item path, use System.ItemUrl or System.ParsingPath. Example values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "hello (c:\foo\bar)" /// "\\server\share\mydir\goodnews.doc" "goodnews (\\server\share\mydir)" "\\server\share\folder" "folder (\\server\share)" /// "c:\foo\MyFolder" "MyFolder (c:\foo)" "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)" @@ -956,16 +935,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 8 /// public static PROPERTYKEY ItemPathDisplayNarrow - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 8); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 8); /// /// Name: System.ItemType -- PKEY_ItemType /// - /// Description: This is the canonical type of the item and is intended to be programmatically parsed. If there is no - /// canonical type, the value is VT_EMPTY. If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same - /// as System.FileExtension. Use System.ItemTypeText when you want to display the type to end users in a view. (If the item - /// is a file, passing the System.ItemType value to PSFormatForDisplay will result in the same value as System.ItemTypeText.) - /// Example values: If the path is... The property value is... + /// Description: This is the canonical type of the item and is intended to be programmatically parsed. If there is no canonical + /// type, the value is VT_EMPTY. If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as + /// System.FileExtension. Use System.ItemTypeText when you want to display the type to end users in a view. (If the item is a + /// file, passing the System.ItemType value to PSFormatForDisplay will result in the same value as System.ItemTypeText.) Example + /// values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" ".txt" /// "\\server\share\mydir\goodnews.doc" ".doc" "\\server\share\folder" "Directory" "c:\foo\MyFolder" "Directory" [desktop] /// "Folder" "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message" @@ -974,32 +953,32 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 11 /// public static PROPERTYKEY ItemType - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 11); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 11); /// /// Name: System.ItemTypeText -- PKEY_ItemTypeText /// /// Description: This is the user friendly type name of the item. This is not intended to be programmatically parsed. If - /// System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY. If the item is a file, the value of this - /// property is the same as if you passed the file's System.ItemType value to PSFormatForDisplay. This property should not be - /// confused with System.Kind, where System.Kind is a high-level user friendly kind name. For example, for a document, - /// System.Kind = "Document" and System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document" Example + /// System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY. If the item is a file, the value of this property + /// is the same as if you passed the file's System.ItemType value to PSFormatForDisplay. This property should not be confused + /// with System.Kind, where System.Kind is a high-level user friendly kind name. For example, for a document, System.Kind = + /// "Document" and System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document" Example /// values: If the path is... The property value is... /// ----------------- ------------------------ "c:\foo\bar\hello.txt" "Text File" - /// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document" "\\server\share\folder" "File Folder" "c:\foo\MyFolder" - /// "File Folder" "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message" + /// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document" "\\server\share\folder" "File Folder" "c:\foo\MyFolder" "File + /// Folder" "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message" /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 4 (PID_STG_STORAGETYPE) /// public static PROPERTYKEY ItemTypeText - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 4); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 4); /// /// Name: System.ItemUrl -- PKEY_ItemUrl /// - /// Description: This always represents a well formed URL that points to the item. To reference shell namespace items using - /// shell APIs, use System.ParsingPath. Example values: + /// Description: This always represents a well formed URL that points to the item. To reference shell namespace items using shell + /// APIs, use System.ParsingPath. Example values: /// Files: "file:///c:/foo/bar/hello.txt" "csc://{GUID}/..." /// Messages: "mapi://..." /// @@ -1007,7 +986,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 9 (DISPID_QUERY_VIRTUALPATH) /// public static PROPERTYKEY ItemUrl - => new PROPERTYKEY(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 9); + => new(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 9); /// /// Name: System.Keywords -- PKEY_Keywords @@ -1018,7 +997,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 5 (PIDSI_KEYWORDS) /// public static PROPERTYKEY Keywords - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 5); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 5); /// /// Name: System.Kind -- PKEY_Kind @@ -1030,18 +1009,16 @@ public static partial class Ole32 /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 3 /// public static PROPERTYKEY Kind - => new PROPERTYKEY(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 3); + => new(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 3); /// /// Name: System.KindText -- PKEY_KindText - /// - /// Description: This is the user-friendly form of System.Kind. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Kind. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}, 100 /// public static PROPERTYKEY KindText - => new PROPERTYKEY(new Guid("{F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}"), 100); + => new(new Guid("{F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}"), 100); /// /// Name: System.Language -- PKEY_Language @@ -1050,7 +1027,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 28 /// public static PROPERTYKEY Language - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 28); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 28); /// /// Name: System.MileageInformation -- PKEY_MileageInformation @@ -1059,7 +1036,7 @@ public static partial class Ole32 /// FormatID: {FDF84370-031A-4ADD-9E91-0D775F1C6605}, 100 /// public static PROPERTYKEY MileageInformation - => new PROPERTYKEY(new Guid("{FDF84370-031A-4ADD-9E91-0D775F1C6605}"), 100); + => new(new Guid("{FDF84370-031A-4ADD-9E91-0D775F1C6605}"), 100); /// /// Name: System.MIMEType -- PKEY_MIMEType @@ -1068,18 +1045,16 @@ public static partial class Ole32 /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 5 /// public static PROPERTYKEY MIMEType - => new PROPERTYKEY(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 5); + => new(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 5); /// /// Name: System.NamespaceCLSID -- PKEY_NamespaceCLSID - /// - /// Description: The CLSID of the name space extension for an item, the object that implements IShellFolder for this item - /// + /// Description: The CLSID of the name space extension for an item, the object that implements IShellFolder for this item /// Type: Guid -- VT_CLSID /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 6 /// public static PROPERTYKEY NamespaceCLSID - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 6); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 6); /// /// Name: System.Null -- PKEY_Null @@ -1088,7 +1063,7 @@ public static partial class Ole32 /// FormatID: {00000000-0000-0000-0000-000000000000}, 0 /// public static PROPERTYKEY Null - => new PROPERTYKEY(new Guid("{00000000-0000-0000-0000-000000000000}"), 0); + => new(new Guid("{00000000-0000-0000-0000-000000000000}"), 0); /// /// Name: System.OfflineAvailability -- PKEY_OfflineAvailability @@ -1097,7 +1072,7 @@ public static partial class Ole32 /// FormatID: {A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}, 100 /// public static PROPERTYKEY OfflineAvailability - => new PROPERTYKEY(new Guid("{A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}"), 100); + => new(new Guid("{A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}"), 100); /// /// Name: System.OfflineStatus -- PKEY_OfflineStatus @@ -1106,7 +1081,7 @@ public static partial class Ole32 /// FormatID: {6D24888F-4718-4BDA-AFED-EA0FB4386CD8}, 100 /// public static PROPERTYKEY OfflineStatus - => new PROPERTYKEY(new Guid("{6D24888F-4718-4BDA-AFED-EA0FB4386CD8}"), 100); + => new(new Guid("{6D24888F-4718-4BDA-AFED-EA0FB4386CD8}"), 100); /// /// Name: System.OriginalFileName -- PKEY_OriginalFileName @@ -1115,7 +1090,7 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 6 /// public static PROPERTYKEY OriginalFileName - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 6); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 6); /// /// Name: System.OwnerSID -- PKEY_OwnerSID @@ -1124,18 +1099,16 @@ public static partial class Ole32 /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 6 /// public static PROPERTYKEY OwnerSID - => new PROPERTYKEY(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 6); + => new(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 6); /// /// Name: System.ParentalRating -- PKEY_ParentalRating /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 21 (PIDMSI_PARENTAL_RATING) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 21 (PIDMSI_PARENTAL_RATING) /// public static PROPERTYKEY ParentalRating - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 21); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 21); /// /// Name: System.ParentalRatingReason -- PKEY_ParentalRatingReason @@ -1144,7 +1117,7 @@ public static partial class Ole32 /// FormatID: {10984E0A-F9F2-4321-B7EF-BAF195AF4319}, 100 /// public static PROPERTYKEY ParentalRatingReason - => new PROPERTYKEY(new Guid("{10984E0A-F9F2-4321-B7EF-BAF195AF4319}"), 100); + => new(new Guid("{10984E0A-F9F2-4321-B7EF-BAF195AF4319}"), 100); /// /// Name: System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization @@ -1153,7 +1126,7 @@ public static partial class Ole32 /// FormatID: {A7FE0840-1344-46F0-8D37-52ED712A4BF9}, 100 /// public static PROPERTYKEY ParentalRatingsOrganization - => new PROPERTYKEY(new Guid("{A7FE0840-1344-46F0-8D37-52ED712A4BF9}"), 100); + => new(new Guid("{A7FE0840-1344-46F0-8D37-52ED712A4BF9}"), 100); /// /// Name: System.ParsingBindContext -- PKEY_ParsingBindContext @@ -1162,7 +1135,7 @@ public static partial class Ole32 /// FormatID: {DFB9A04D-362F-4CA3-B30B-0254B17B5B84}, 100 /// public static PROPERTYKEY ParsingBindContext - => new PROPERTYKEY(new Guid("{DFB9A04D-362F-4CA3-B30B-0254B17B5B84}"), 100); + => new(new Guid("{DFB9A04D-362F-4CA3-B30B-0254B17B5B84}"), 100); /// /// Name: System.ParsingName -- PKEY_ParsingName @@ -1174,20 +1147,20 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 24 /// public static PROPERTYKEY ParsingName - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 24); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 24); /// /// Name: System.ParsingPath -- PKEY_ParsingPath /// - /// Description: This is the shell namespace path to the item. This path may be passed to SHParseDisplayName to parse the - /// path to the correct shell folder. If the item is a file, the value is identical to System.ItemPathDisplay. If the item - /// cannot be accessed through the shell namespace, this value is VT_EMPTY. + /// Description: This is the shell namespace path to the item. This path may be passed to SHParseDisplayName to parse the path to + /// the correct shell folder. If the item is a file, the value is identical to System.ItemPathDisplay. If the item cannot be + /// accessed through the shell namespace, this value is VT_EMPTY. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 30 /// public static PROPERTYKEY ParsingPath - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 30); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 30); /// /// Name: System.PerceivedType -- PKEY_PerceivedType @@ -1196,7 +1169,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 9 /// public static PROPERTYKEY PerceivedType - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 9); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 9); /// /// Name: System.PercentFull -- PKEY_PercentFull @@ -1205,7 +1178,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 5 (Filesystem Volume Properties) /// public static PROPERTYKEY PercentFull - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 5); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 5); /// /// Name: System.Priority -- PKEY_Priority @@ -1214,18 +1187,16 @@ public static partial class Ole32 /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 5 /// public static PROPERTYKEY Priority - => new PROPERTYKEY(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 5); + => new(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 5); /// /// Name: System.PriorityText -- PKEY_PriorityText - /// - /// Description: This is the user-friendly form of System.Priority. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Priority. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {D98BE98B-B86B-4095-BF52-9D23B2E0A752}, 100 /// public static PROPERTYKEY PriorityText - => new PROPERTYKEY(new Guid("{D98BE98B-B86B-4095-BF52-9D23B2E0A752}"), 100); + => new(new Guid("{D98BE98B-B86B-4095-BF52-9D23B2E0A752}"), 100); /// /// Name: System.Project -- PKEY_Project @@ -1234,7 +1205,7 @@ public static partial class Ole32 /// FormatID: {39A7F922-477C-48DE-8BC8-B28441E342E3}, 100 /// public static PROPERTYKEY Project - => new PROPERTYKEY(new Guid("{39A7F922-477C-48DE-8BC8-B28441E342E3}"), 100); + => new(new Guid("{39A7F922-477C-48DE-8BC8-B28441E342E3}"), 100); /// /// Name: System.ProviderItemID -- PKEY_ProviderItemID @@ -1243,30 +1214,28 @@ public static partial class Ole32 /// FormatID: {F21D9941-81F0-471A-ADEE-4E74B49217ED}, 100 /// public static PROPERTYKEY ProviderItemID - => new PROPERTYKEY(new Guid("{F21D9941-81F0-471A-ADEE-4E74B49217ED}"), 100); + => new(new Guid("{F21D9941-81F0-471A-ADEE-4E74B49217ED}"), 100); /// /// Name: System.Rating -- PKEY_Rating /// - /// Description: Indicates the users preference rating of an item on a scale of 1-99 (1-12 = One Star, 13-37 = Two Stars, - /// 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars). + /// Description: Indicates the users preference rating of an item on a scale of 1-99 (1-12 = One Star, 13-37 = Two Stars, 38-62 = + /// Three Stars, 63-87 = Four Stars, 88-99 = Five Stars). /// /// Type: UInt32 -- VT_UI4 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 9 (PIDMSI_RATING) /// public static PROPERTYKEY Rating - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 9); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 9); /// /// Name: System.RatingText -- PKEY_RatingText - /// - /// Description: This is the user-friendly form of System.Rating. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Rating. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {90197CA7-FD8F-4E8C-9DA3-B57E1E609295}, 100 /// public static PROPERTYKEY RatingText - => new PROPERTYKEY(new Guid("{90197CA7-FD8F-4E8C-9DA3-B57E1E609295}"), 100); + => new(new Guid("{90197CA7-FD8F-4E8C-9DA3-B57E1E609295}"), 100); /// /// Name: System.Sensitivity -- PKEY_Sensitivity @@ -1275,18 +1244,16 @@ public static partial class Ole32 /// FormatID: {F8D3F6AC-4874-42CB-BE59-AB454B30716A}, 100 /// public static PROPERTYKEY Sensitivity - => new PROPERTYKEY(new Guid("{F8D3F6AC-4874-42CB-BE59-AB454B30716A}"), 100); + => new(new Guid("{F8D3F6AC-4874-42CB-BE59-AB454B30716A}"), 100); /// /// Name: System.SensitivityText -- PKEY_SensitivityText - /// - /// Description: This is the user-friendly form of System.Sensitivity. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Sensitivity. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {D0C7F054-3F72-4725-8527-129A577CB269}, 100 /// public static PROPERTYKEY SensitivityText - => new PROPERTYKEY(new Guid("{D0C7F054-3F72-4725-8527-129A577CB269}"), 100); + => new(new Guid("{D0C7F054-3F72-4725-8527-129A577CB269}"), 100); /// /// Name: System.SFGAOFlags -- PKEY_SFGAOFlags @@ -1295,7 +1262,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 25 /// public static PROPERTYKEY SFGAOFlags - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 25); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 25); /// /// Name: System.SharedWith -- PKEY_SharedWith @@ -1304,18 +1271,16 @@ public static partial class Ole32 /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 200 /// public static PROPERTYKEY SharedWith - => new PROPERTYKEY(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 200); + => new(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 200); /// /// Name: System.ShareUserRating -- PKEY_ShareUserRating /// Description: /// Type: UInt32 -- VT_UI4 - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 12 (PIDMSI_SHARE_USER_RATING) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 12 (PIDMSI_SHARE_USER_RATING) /// public static PROPERTYKEY ShareUserRating - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 12); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 12); /// /// Name: System.SharingStatus -- PKEY_SharingStatus @@ -1324,19 +1289,19 @@ public static partial class Ole32 /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 300 /// public static PROPERTYKEY SharingStatus - => new PROPERTYKEY(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 300); + => new(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 300); /// /// Name: System.SimpleRating -- PKEY_SimpleRating /// - /// Description: Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, - /// 3=Three Stars, 4=Four Stars, 5=Five Stars) + /// Description: Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three + /// Stars, 4=Four Stars, 5=Five Stars) /// /// Type: UInt32 -- VT_UI4 /// FormatID: {A09F084E-AD41-489F-8076-AA5BE3082BCA}, 100 /// public static PROPERTYKEY SimpleRating - => new PROPERTYKEY(new Guid("{A09F084E-AD41-489F-8076-AA5BE3082BCA}"), 100); + => new(new Guid("{A09F084E-AD41-489F-8076-AA5BE3082BCA}"), 100); /// /// Name: System.Size -- PKEY_Size @@ -1345,7 +1310,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE) /// public static PROPERTYKEY Size - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 12); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 12); /// /// Name: System.SoftwareUsed -- PKEY_SoftwareUsed @@ -1354,7 +1319,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 305 /// public static PROPERTYKEY SoftwareUsed - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 305); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 305); /// /// Name: System.SourceItem -- PKEY_SourceItem @@ -1363,7 +1328,7 @@ public static partial class Ole32 /// FormatID: {668CDFA5-7A1B-4323-AE4B-E527393A1D81}, 100 /// public static PROPERTYKEY SourceItem - => new PROPERTYKEY(new Guid("{668CDFA5-7A1B-4323-AE4B-E527393A1D81}"), 100); + => new(new Guid("{668CDFA5-7A1B-4323-AE4B-E527393A1D81}"), 100); /// /// Name: System.StartDate -- PKEY_StartDate @@ -1372,7 +1337,7 @@ public static partial class Ole32 /// FormatID: {48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}, 100 /// public static PROPERTYKEY StartDate - => new PROPERTYKEY(new Guid("{48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}"), 100); + => new(new Guid("{48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}"), 100); /// /// Name: System.Status -- PKEY_Status @@ -1381,7 +1346,7 @@ public static partial class Ole32 /// FormatID: (FMTID_IntSite) {000214A1-0000-0000-C000-000000000046}, 9 /// public static PROPERTYKEY Status - => new PROPERTYKEY(new Guid("{000214A1-0000-0000-C000-000000000046}"), 9); + => new(new Guid("{000214A1-0000-0000-C000-000000000046}"), 9); /// /// Name: System.Subject -- PKEY_Subject @@ -1390,7 +1355,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 3 (PIDSI_SUBJECT) /// public static PROPERTYKEY Subject - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 3); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 3); /// /// Name: System.SyncTransferStatus -- PKEY_SyncTransferStatus @@ -1399,7 +1364,7 @@ public static partial class Ole32 /// FormatID: {FCEFF153-E839-4CF3-A9E7-EA22832094B8}, 103 /// public static PROPERTYKEY SyncTransferStatus - => new PROPERTYKEY(new Guid(0xFCEFF153, 0xE839, 0x4CF3, 0xA9, 0xE7, 0xEA, 0x22, 0x83, 0x20, 0x94, 0xB8), 103); + => new(new Guid(0xFCEFF153, 0xE839, 0x4CF3, 0xA9, 0xE7, 0xEA, 0x22, 0x83, 0x20, 0x94, 0xB8), 103); /// /// Name: System.ThumbnailCacheId -- PKEY_ThumbnailCacheId @@ -1411,18 +1376,16 @@ public static partial class Ole32 /// FormatID: {446D16B1-8DAD-4870-A748-402EA43D788C}, 100 /// public static PROPERTYKEY ThumbnailCacheId - => new PROPERTYKEY(new Guid("{446D16B1-8DAD-4870-A748-402EA43D788C}"), 100); + => new(new Guid("{446D16B1-8DAD-4870-A748-402EA43D788C}"), 100); /// /// Name: System.ThumbnailStream -- PKEY_ThumbnailStream - /// - /// Description: Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc). - /// + /// Description: Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc). /// Type: Stream -- VT_STREAM /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 27 /// public static PROPERTYKEY ThumbnailStream - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 27); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 27); /// /// Name: System.Title -- PKEY_Title @@ -1431,7 +1394,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 2 (PIDSI_TITLE) /// public static PROPERTYKEY Title - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 2); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 2); /// /// Name: System.TotalFileSize -- PKEY_TotalFileSize @@ -1440,7 +1403,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 14 /// public static PROPERTYKEY TotalFileSize - => new PROPERTYKEY(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 14); + => new(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 14); /// /// Name: System.Trademarks -- PKEY_Trademarks @@ -1449,7 +1412,7 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 9 (PIDVSI_Trademarks) /// public static PROPERTYKEY Trademarks - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 9); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 9); /// AppUserModel Properties public static class AppUserModel @@ -1461,7 +1424,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 8 /// public static PROPERTYKEY ExcludeFromShowInNewInstall - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 8); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 8); /// /// Name: System.AppUserModel.ID -- PKEY_AppUserModel_ID @@ -1470,7 +1433,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 5 /// public static PROPERTYKEY ID - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 5); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 5); /// /// Name: System.AppUserModel.IsDestListSeparator -- PKEY_AppUserModel_IsDestListSeparator @@ -1479,7 +1442,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 6 /// public static PROPERTYKEY IsDestListSeparator - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 6); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 6); /// /// Name: System.AppUserModel.IsDualMode -- PKEY_AppUserModel_IsDualMode @@ -1488,7 +1451,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 11 /// public static PROPERTYKEY IsDualMode - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 11); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 11); /// /// Name: System.AppUserModel.PreventPinning -- PKEY_AppUserModel_PreventPinning @@ -1497,7 +1460,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 9 /// public static PROPERTYKEY PreventPinning - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 9); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 9); /// /// Name: System.AppUserModel.RelaunchCommand -- PKEY_AppUserModel_RelaunchCommand @@ -1506,7 +1469,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 2 /// public static PROPERTYKEY RelaunchCommand - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 2); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 2); /// /// Name: System.AppUserModel.RelaunchDisplayNameResource -- PKEY_AppUserModel_RelaunchDisplayNameResource @@ -1515,7 +1478,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 4 /// public static PROPERTYKEY RelaunchDisplayNameResource - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 4); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 4); /// /// Name: System.AppUserModel.RelaunchIconResource -- PKEY_AppUserModel_RelaunchIconResource @@ -1524,7 +1487,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 3 /// public static PROPERTYKEY RelaunchIconResource - => new PROPERTYKEY(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 3); + => new(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 3); /// /// Name: System.AppUserModel.StartPinOption -- PKEY_AppUserModel_StartPinOption @@ -1533,7 +1496,7 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 12 /// public static PROPERTYKEY StartPinOption - => new PROPERTYKEY(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 12); + => new(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 12); /// /// Name: System.AppUserModel.ToastActivatorCLSID -- PKEY_AppUserModel_ToastActivatorCLSID @@ -1542,16 +1505,16 @@ public static partial class Ole32 /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 26 /// public static PROPERTYKEY ToastActivatorCLSID - => new PROPERTYKEY(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 26); + => new(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 26); /// /// Name: System.AppUserModel.VisualElementsManifestHintPath -- PKEY_AppUserModel_VisualElementsManifestHintPath /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) + /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 31 /// public static PROPERTYKEY VisualElementsManifestHintPath - => new PROPERTYKEY(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 31); + => new(new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), 31); } /// Audio Properties @@ -1564,7 +1527,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 7 (PIDASI_CHANNEL_COUNT) /// public static PROPERTYKEY ChannelCount - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 7); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 7); /// /// Name: System.Audio.Compression -- PKEY_Audio_Compression @@ -1573,7 +1536,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 10 (PIDASI_COMPRESSION) /// public static PROPERTYKEY Compression - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 10); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 10); /// /// Name: System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate @@ -1582,7 +1545,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 4 (PIDASI_AVG_DATA_RATE) /// public static PROPERTYKEY EncodingBitrate - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 4); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 4); /// /// Name: System.Audio.Format -- PKEY_Audio_Format @@ -1591,7 +1554,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 2 (PIDASI_FORMAT) /// public static PROPERTYKEY Format - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 2); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 2); /// /// Name: System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate @@ -1600,7 +1563,7 @@ public static partial class Ole32 /// FormatID: {E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}, 100 /// public static PROPERTYKEY IsVariableBitRate - => new PROPERTYKEY(new Guid("{E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}"), 100); + => new(new Guid("{E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}"), 100); /// /// Name: System.Audio.PeakValue -- PKEY_Audio_PeakValue @@ -1609,7 +1572,7 @@ public static partial class Ole32 /// FormatID: {2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}, 100 /// public static PROPERTYKEY PeakValue - => new PROPERTYKEY(new Guid("{2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}"), 100); + => new(new Guid("{2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}"), 100); /// /// Name: System.Audio.SampleRate -- PKEY_Audio_SampleRate @@ -1618,7 +1581,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 5 (PIDASI_SAMPLE_RATE) /// public static PROPERTYKEY SampleRate - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 5); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 5); /// /// Name: System.Audio.SampleSize -- PKEY_Audio_SampleSize @@ -1627,7 +1590,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 6 (PIDASI_SAMPLE_SIZE) /// public static PROPERTYKEY SampleSize - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 6); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 6); /// /// Name: System.Audio.StreamName -- PKEY_Audio_StreamName @@ -1636,7 +1599,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 9 (PIDASI_STREAM_NAME) /// public static PROPERTYKEY StreamName - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 9); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 9); /// /// Name: System.Audio.StreamNumber -- PKEY_Audio_StreamNumber @@ -1645,7 +1608,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 8 (PIDASI_STREAM_NUMBER) /// public static PROPERTYKEY StreamNumber - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 8); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 8); } /// Calendar Properties @@ -1658,7 +1621,7 @@ public static partial class Ole32 /// FormatID: {293CA35A-09AA-4DD2-B180-1FE245728A52}, 100 /// public static PROPERTYKEY Duration - => new PROPERTYKEY(new Guid("{293CA35A-09AA-4DD2-B180-1FE245728A52}"), 100); + => new(new Guid("{293CA35A-09AA-4DD2-B180-1FE245728A52}"), 100); /// /// Name: System.Calendar.IsOnline -- PKEY_Calendar_IsOnline @@ -1667,7 +1630,7 @@ public static partial class Ole32 /// FormatID: {BFEE9149-E3E2-49A7-A862-C05988145CEC}, 100 /// public static PROPERTYKEY IsOnline - => new PROPERTYKEY(new Guid("{BFEE9149-E3E2-49A7-A862-C05988145CEC}"), 100); + => new(new Guid("{BFEE9149-E3E2-49A7-A862-C05988145CEC}"), 100); /// /// Name: System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring @@ -1676,7 +1639,7 @@ public static partial class Ole32 /// FormatID: {315B9C8D-80A9-4EF9-AE16-8E746DA51D70}, 100 /// public static PROPERTYKEY IsRecurring - => new PROPERTYKEY(new Guid("{315B9C8D-80A9-4EF9-AE16-8E746DA51D70}"), 100); + => new(new Guid("{315B9C8D-80A9-4EF9-AE16-8E746DA51D70}"), 100); /// /// Name: System.Calendar.Location -- PKEY_Calendar_Location @@ -1685,7 +1648,7 @@ public static partial class Ole32 /// FormatID: {F6272D18-CECC-40B1-B26A-3911717AA7BD}, 100 /// public static PROPERTYKEY Location - => new PROPERTYKEY(new Guid("{F6272D18-CECC-40B1-B26A-3911717AA7BD}"), 100); + => new(new Guid("{F6272D18-CECC-40B1-B26A-3911717AA7BD}"), 100); /// /// Name: System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses @@ -1694,7 +1657,7 @@ public static partial class Ole32 /// FormatID: {D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}, 100 /// public static PROPERTYKEY OptionalAttendeeAddresses - => new PROPERTYKEY(new Guid("{D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}"), 100); + => new(new Guid("{D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}"), 100); /// /// Name: System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames @@ -1703,7 +1666,7 @@ public static partial class Ole32 /// FormatID: {09429607-582D-437F-84C3-DE93A2B24C3C}, 100 /// public static PROPERTYKEY OptionalAttendeeNames - => new PROPERTYKEY(new Guid("{09429607-582D-437F-84C3-DE93A2B24C3C}"), 100); + => new(new Guid("{09429607-582D-437F-84C3-DE93A2B24C3C}"), 100); /// /// Name: System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress @@ -1712,7 +1675,7 @@ public static partial class Ole32 /// FormatID: {744C8242-4DF5-456C-AB9E-014EFB9021E3}, 100 /// public static PROPERTYKEY OrganizerAddress - => new PROPERTYKEY(new Guid("{744C8242-4DF5-456C-AB9E-014EFB9021E3}"), 100); + => new(new Guid("{744C8242-4DF5-456C-AB9E-014EFB9021E3}"), 100); /// /// Name: System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName @@ -1721,7 +1684,7 @@ public static partial class Ole32 /// FormatID: {AAA660F9-9865-458E-B484-01BC7FE3973E}, 100 /// public static PROPERTYKEY OrganizerName - => new PROPERTYKEY(new Guid("{AAA660F9-9865-458E-B484-01BC7FE3973E}"), 100); + => new(new Guid("{AAA660F9-9865-458E-B484-01BC7FE3973E}"), 100); /// /// Name: System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime @@ -1730,7 +1693,7 @@ public static partial class Ole32 /// FormatID: {72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}, 100 /// public static PROPERTYKEY ReminderTime - => new PROPERTYKEY(new Guid("{72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}"), 100); + => new(new Guid("{72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}"), 100); /// /// Name: System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses @@ -1739,7 +1702,7 @@ public static partial class Ole32 /// FormatID: {0BA7D6C3-568D-4159-AB91-781A91FB71E5}, 100 /// public static PROPERTYKEY RequiredAttendeeAddresses - => new PROPERTYKEY(new Guid("{0BA7D6C3-568D-4159-AB91-781A91FB71E5}"), 100); + => new(new Guid("{0BA7D6C3-568D-4159-AB91-781A91FB71E5}"), 100); /// /// Name: System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames @@ -1748,7 +1711,7 @@ public static partial class Ole32 /// FormatID: {B33AF30B-F552-4584-936C-CB93E5CDA29F}, 100 /// public static PROPERTYKEY RequiredAttendeeNames - => new PROPERTYKEY(new Guid("{B33AF30B-F552-4584-936C-CB93E5CDA29F}"), 100); + => new(new Guid("{B33AF30B-F552-4584-936C-CB93E5CDA29F}"), 100); /// /// Name: System.Calendar.Resources -- PKEY_Calendar_Resources @@ -1757,7 +1720,7 @@ public static partial class Ole32 /// FormatID: {00F58A38-C54B-4C40-8696-97235980EAE1}, 100 /// public static PROPERTYKEY Resources - => new PROPERTYKEY(new Guid("{00F58A38-C54B-4C40-8696-97235980EAE1}"), 100); + => new(new Guid("{00F58A38-C54B-4C40-8696-97235980EAE1}"), 100); /// /// Name: System.Calendar.ResponseStatus -- PKEY_Calendar_ResponseStatus @@ -1766,7 +1729,7 @@ public static partial class Ole32 /// FormatID: {188C1F91-3C40-4132-9EC5-D8B03B72A8A2}, 100 /// public static PROPERTYKEY ResponseStatus - => new PROPERTYKEY(new Guid("{188C1F91-3C40-4132-9EC5-D8B03B72A8A2}"), 100); + => new(new Guid("{188C1F91-3C40-4132-9EC5-D8B03B72A8A2}"), 100); /// /// Name: System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs @@ -1775,18 +1738,16 @@ public static partial class Ole32 /// FormatID: {5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}, 100 /// public static PROPERTYKEY ShowTimeAs - => new PROPERTYKEY(new Guid("{5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}"), 100); + => new(new Guid("{5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}"), 100); /// /// Name: System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText - /// - /// Description: This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}, 100 /// public static PROPERTYKEY ShowTimeAsText - => new PROPERTYKEY(new Guid("{53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}"), 100); + => new(new Guid("{53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}"), 100); } /// Communication Properties @@ -1799,7 +1760,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 9 /// public static PROPERTYKEY AccountName - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 9); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 9); /// /// Name: System.Communication.DateItemExpires -- PKEY_Communication_DateItemExpires @@ -1808,7 +1769,7 @@ public static partial class Ole32 /// FormatID: {428040AC-A177-4C8A-9760-F6F761227F9A}, 100 /// public static PROPERTYKEY DateItemExpires - => new PROPERTYKEY(new Guid("{428040AC-A177-4C8A-9760-F6F761227F9A}"), 100); + => new(new Guid("{428040AC-A177-4C8A-9760-F6F761227F9A}"), 100); /// /// Name: System.Communication.FollowupIconIndex -- PKEY_Communication_FollowupIconIndex @@ -1817,18 +1778,16 @@ public static partial class Ole32 /// FormatID: {83A6347E-6FE4-4F40-BA9C-C4865240D1F4}, 100 /// public static PROPERTYKEY FollowupIconIndex - => new PROPERTYKEY(new Guid("{83A6347E-6FE4-4F40-BA9C-C4865240D1F4}"), 100); + => new(new Guid("{83A6347E-6FE4-4F40-BA9C-C4865240D1F4}"), 100); /// /// Name: System.Communication.HeaderItem -- PKEY_Communication_HeaderItem - /// - /// Description: This property will be true if the item is a header item which means the item hasn't been fully downloaded. - /// + /// Description: This property will be true if the item is a header item which means the item hasn't been fully downloaded. /// Type: Boolean -- VT_BOOL /// FormatID: {C9C34F84-2241-4401-B607-BD20ED75AE7F}, 100 /// public static PROPERTYKEY HeaderItem - => new PROPERTYKEY(new Guid("{C9C34F84-2241-4401-B607-BD20ED75AE7F}"), 100); + => new(new Guid("{C9C34F84-2241-4401-B607-BD20ED75AE7F}"), 100); /// /// Name: System.Communication.PolicyTag -- PKEY_Communication_PolicyTag @@ -1837,7 +1796,7 @@ public static partial class Ole32 /// FormatID: {EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}, 100 /// public static PROPERTYKEY PolicyTag - => new PROPERTYKEY(new Guid("{EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}"), 100); + => new(new Guid("{EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}"), 100); /// /// Name: System.Communication.SecurityFlags -- PKEY_Communication_SecurityFlags @@ -1846,7 +1805,7 @@ public static partial class Ole32 /// FormatID: {8619A4B6-9F4D-4429-8C0F-B996CA59E335}, 100 /// public static PROPERTYKEY SecurityFlags - => new PROPERTYKEY(new Guid("{8619A4B6-9F4D-4429-8C0F-B996CA59E335}"), 100); + => new(new Guid("{8619A4B6-9F4D-4429-8C0F-B996CA59E335}"), 100); /// /// Name: System.Communication.Suffix -- PKEY_Communication_Suffix @@ -1855,7 +1814,7 @@ public static partial class Ole32 /// FormatID: {807B653A-9E91-43EF-8F97-11CE04EE20C5}, 100 /// public static PROPERTYKEY Suffix - => new PROPERTYKEY(new Guid("{807B653A-9E91-43EF-8F97-11CE04EE20C5}"), 100); + => new(new Guid("{807B653A-9E91-43EF-8F97-11CE04EE20C5}"), 100); /// /// Name: System.Communication.TaskStatus -- PKEY_Communication_TaskStatus @@ -1864,18 +1823,16 @@ public static partial class Ole32 /// FormatID: {BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}, 100 /// public static PROPERTYKEY TaskStatus - => new PROPERTYKEY(new Guid("{BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}"), 100); + => new(new Guid("{BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}"), 100); /// /// Name: System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText - /// - /// Description: This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {A6744477-C237-475B-A075-54F34498292A}, 100 /// public static PROPERTYKEY TaskStatusText - => new PROPERTYKEY(new Guid("{A6744477-C237-475B-A075-54F34498292A}"), 100); + => new(new Guid("{A6744477-C237-475B-A075-54F34498292A}"), 100); } /// Computer Properties @@ -1888,7 +1845,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 7 (Filesystem Volume Properties) /// public static PROPERTYKEY DecoratedFreeSpace - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 7); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 7); } /// Contact Properties @@ -1901,7 +1858,7 @@ public static partial class Ole32 /// FormatID: {9AD5BADB-CEA7-4470-A03D-B84E51B9949E}, 100 /// public static PROPERTYKEY Anniversary - => new PROPERTYKEY(new Guid("{9AD5BADB-CEA7-4470-A03D-B84E51B9949E}"), 100); + => new(new Guid("{9AD5BADB-CEA7-4470-A03D-B84E51B9949E}"), 100); /// /// Name: System.Contact.AssistantName -- PKEY_Contact_AssistantName @@ -1910,7 +1867,7 @@ public static partial class Ole32 /// FormatID: {CD102C9C-5540-4A88-A6F6-64E4981C8CD1}, 100 /// public static PROPERTYKEY AssistantName - => new PROPERTYKEY(new Guid("{CD102C9C-5540-4A88-A6F6-64E4981C8CD1}"), 100); + => new(new Guid("{CD102C9C-5540-4A88-A6F6-64E4981C8CD1}"), 100); /// /// Name: System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone @@ -1919,7 +1876,7 @@ public static partial class Ole32 /// FormatID: {9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}, 100 /// public static PROPERTYKEY AssistantTelephone - => new PROPERTYKEY(new Guid("{9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}"), 100); + => new(new Guid("{9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}"), 100); /// /// Name: System.Contact.Birthday -- PKEY_Contact_Birthday @@ -1928,7 +1885,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 47 /// public static PROPERTYKEY Birthday - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 47); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 47); /// /// Name: System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress @@ -1937,7 +1894,7 @@ public static partial class Ole32 /// FormatID: {730FB6DD-CF7C-426B-A03F-BD166CC9EE24}, 100 /// public static PROPERTYKEY BusinessAddress - => new PROPERTYKEY(new Guid("{730FB6DD-CF7C-426B-A03F-BD166CC9EE24}"), 100); + => new(new Guid("{730FB6DD-CF7C-426B-A03F-BD166CC9EE24}"), 100); /// /// Name: System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity @@ -1946,7 +1903,7 @@ public static partial class Ole32 /// FormatID: {402B5934-EC5A-48C3-93E6-85E86A2D934E}, 100 /// public static PROPERTYKEY BusinessAddressCity - => new PROPERTYKEY(new Guid("{402B5934-EC5A-48C3-93E6-85E86A2D934E}"), 100); + => new(new Guid("{402B5934-EC5A-48C3-93E6-85E86A2D934E}"), 100); /// /// Name: System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry @@ -1955,7 +1912,7 @@ public static partial class Ole32 /// FormatID: {B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}, 100 /// public static PROPERTYKEY BusinessAddressCountry - => new PROPERTYKEY(new Guid("{B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}"), 100); + => new(new Guid("{B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}"), 100); /// /// Name: System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode @@ -1964,7 +1921,7 @@ public static partial class Ole32 /// FormatID: {E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}, 100 /// public static PROPERTYKEY BusinessAddressPostalCode - => new PROPERTYKEY(new Guid("{E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}"), 100); + => new(new Guid("{E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}"), 100); /// /// Name: System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox @@ -1973,7 +1930,7 @@ public static partial class Ole32 /// FormatID: {BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}, 100 /// public static PROPERTYKEY BusinessAddressPostOfficeBox - => new PROPERTYKEY(new Guid("{BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}"), 100); + => new(new Guid("{BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}"), 100); /// /// Name: System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState @@ -1982,7 +1939,7 @@ public static partial class Ole32 /// FormatID: {446F787F-10C4-41CB-A6C4-4D0343551597}, 100 /// public static PROPERTYKEY BusinessAddressState - => new PROPERTYKEY(new Guid("{446F787F-10C4-41CB-A6C4-4D0343551597}"), 100); + => new(new Guid("{446F787F-10C4-41CB-A6C4-4D0343551597}"), 100); /// /// Name: System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet @@ -1991,7 +1948,7 @@ public static partial class Ole32 /// FormatID: {DDD1460F-C0BF-4553-8CE4-10433C908FB0}, 100 /// public static PROPERTYKEY BusinessAddressStreet - => new PROPERTYKEY(new Guid("{DDD1460F-C0BF-4553-8CE4-10433C908FB0}"), 100); + => new(new Guid("{DDD1460F-C0BF-4553-8CE4-10433C908FB0}"), 100); /// /// Name: System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber @@ -2000,7 +1957,7 @@ public static partial class Ole32 /// FormatID: {91EFF6F3-2E27-42CA-933E-7C999FBE310B}, 100 /// public static PROPERTYKEY BusinessFaxNumber - => new PROPERTYKEY(new Guid("{91EFF6F3-2E27-42CA-933E-7C999FBE310B}"), 100); + => new(new Guid("{91EFF6F3-2E27-42CA-933E-7C999FBE310B}"), 100); /// /// Name: System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage @@ -2009,7 +1966,7 @@ public static partial class Ole32 /// FormatID: {56310920-2491-4919-99CE-EADB06FAFDB2}, 100 /// public static PROPERTYKEY BusinessHomePage - => new PROPERTYKEY(new Guid("{56310920-2491-4919-99CE-EADB06FAFDB2}"), 100); + => new(new Guid("{56310920-2491-4919-99CE-EADB06FAFDB2}"), 100); /// /// Name: System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone @@ -2018,7 +1975,7 @@ public static partial class Ole32 /// FormatID: {6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}, 100 /// public static PROPERTYKEY BusinessTelephone - => new PROPERTYKEY(new Guid("{6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}"), 100); + => new(new Guid("{6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}"), 100); /// /// Name: System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone @@ -2027,7 +1984,7 @@ public static partial class Ole32 /// FormatID: {BF53D1C3-49E0-4F7F-8567-5A821D8AC542}, 100 /// public static PROPERTYKEY CallbackTelephone - => new PROPERTYKEY(new Guid("{BF53D1C3-49E0-4F7F-8567-5A821D8AC542}"), 100); + => new(new Guid("{BF53D1C3-49E0-4F7F-8567-5A821D8AC542}"), 100); /// /// Name: System.Contact.CarTelephone -- PKEY_Contact_CarTelephone @@ -2036,7 +1993,7 @@ public static partial class Ole32 /// FormatID: {8FDC6DEA-B929-412B-BA90-397A257465FE}, 100 /// public static PROPERTYKEY CarTelephone - => new PROPERTYKEY(new Guid("{8FDC6DEA-B929-412B-BA90-397A257465FE}"), 100); + => new(new Guid("{8FDC6DEA-B929-412B-BA90-397A257465FE}"), 100); /// /// Name: System.Contact.Children -- PKEY_Contact_Children @@ -2045,7 +2002,7 @@ public static partial class Ole32 /// FormatID: {D4729704-8EF1-43EF-9024-2BD381187FD5}, 100 /// public static PROPERTYKEY Children - => new PROPERTYKEY(new Guid("{D4729704-8EF1-43EF-9024-2BD381187FD5}"), 100); + => new(new Guid("{D4729704-8EF1-43EF-9024-2BD381187FD5}"), 100); /// /// Name: System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone @@ -2054,7 +2011,7 @@ public static partial class Ole32 /// FormatID: {8589E481-6040-473D-B171-7FA89C2708ED}, 100 /// public static PROPERTYKEY CompanyMainTelephone - => new PROPERTYKEY(new Guid("{8589E481-6040-473D-B171-7FA89C2708ED}"), 100); + => new(new Guid("{8589E481-6040-473D-B171-7FA89C2708ED}"), 100); /// /// Name: System.Contact.Department -- PKEY_Contact_Department @@ -2063,7 +2020,7 @@ public static partial class Ole32 /// FormatID: {FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}, 100 /// public static PROPERTYKEY Department - => new PROPERTYKEY(new Guid("{FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}"), 100); + => new(new Guid("{FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}"), 100); /// /// Name: System.Contact.EmailAddress -- PKEY_Contact_EmailAddress @@ -2072,7 +2029,7 @@ public static partial class Ole32 /// FormatID: {F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}, 100 /// public static PROPERTYKEY EmailAddress - => new PROPERTYKEY(new Guid("{F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}"), 100); + => new(new Guid("{F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}"), 100); /// /// Name: System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2 @@ -2081,7 +2038,7 @@ public static partial class Ole32 /// FormatID: {38965063-EDC8-4268-8491-B7723172CF29}, 100 /// public static PROPERTYKEY EmailAddress2 - => new PROPERTYKEY(new Guid("{38965063-EDC8-4268-8491-B7723172CF29}"), 100); + => new(new Guid("{38965063-EDC8-4268-8491-B7723172CF29}"), 100); /// /// Name: System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3 @@ -2090,7 +2047,7 @@ public static partial class Ole32 /// FormatID: {644D37B4-E1B3-4BAD-B099-7E7C04966ACA}, 100 /// public static PROPERTYKEY EmailAddress3 - => new PROPERTYKEY(new Guid("{644D37B4-E1B3-4BAD-B099-7E7C04966ACA}"), 100); + => new(new Guid("{644D37B4-E1B3-4BAD-B099-7E7C04966ACA}"), 100); /// /// Name: System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses @@ -2099,7 +2056,7 @@ public static partial class Ole32 /// FormatID: {84D8F337-981D-44B3-9615-C7596DBA17E3}, 100 /// public static PROPERTYKEY EmailAddresses - => new PROPERTYKEY(new Guid("{84D8F337-981D-44B3-9615-C7596DBA17E3}"), 100); + => new(new Guid("{84D8F337-981D-44B3-9615-C7596DBA17E3}"), 100); /// /// Name: System.Contact.EmailName -- PKEY_Contact_EmailName @@ -2108,7 +2065,7 @@ public static partial class Ole32 /// FormatID: {CC6F4F24-6083-4BD4-8754-674D0DE87AB8}, 100 /// public static PROPERTYKEY EmailName - => new PROPERTYKEY(new Guid("{CC6F4F24-6083-4BD4-8754-674D0DE87AB8}"), 100); + => new(new Guid("{CC6F4F24-6083-4BD4-8754-674D0DE87AB8}"), 100); /// /// Name: System.Contact.FileAsName -- PKEY_Contact_FileAsName @@ -2117,7 +2074,7 @@ public static partial class Ole32 /// FormatID: {F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}, 100 /// public static PROPERTYKEY FileAsName - => new PROPERTYKEY(new Guid("{F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}"), 100); + => new(new Guid("{F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}"), 100); /// /// Name: System.Contact.FirstName -- PKEY_Contact_FirstName @@ -2126,7 +2083,7 @@ public static partial class Ole32 /// FormatID: {14977844-6B49-4AAD-A714-A4513BF60460}, 100 /// public static PROPERTYKEY FirstName - => new PROPERTYKEY(new Guid("{14977844-6B49-4AAD-A714-A4513BF60460}"), 100); + => new(new Guid("{14977844-6B49-4AAD-A714-A4513BF60460}"), 100); /// /// Name: System.Contact.FullName -- PKEY_Contact_FullName @@ -2135,7 +2092,7 @@ public static partial class Ole32 /// FormatID: {635E9051-50A5-4BA2-B9DB-4ED056C77296}, 100 /// public static PROPERTYKEY FullName - => new PROPERTYKEY(new Guid("{635E9051-50A5-4BA2-B9DB-4ED056C77296}"), 100); + => new(new Guid("{635E9051-50A5-4BA2-B9DB-4ED056C77296}"), 100); /// /// Name: System.Contact.Gender -- PKEY_Contact_Gender @@ -2144,7 +2101,7 @@ public static partial class Ole32 /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 100 /// public static PROPERTYKEY Gender - => new PROPERTYKEY(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 100); + => new(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 100); /// /// Name: System.Contact.GenderValue -- PKEY_Contact_GenderValue @@ -2153,7 +2110,7 @@ public static partial class Ole32 /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 101 /// public static PROPERTYKEY GenderValue - => new PROPERTYKEY(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 101); + => new(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 101); /// /// Name: System.Contact.Hobbies -- PKEY_Contact_Hobbies @@ -2162,7 +2119,7 @@ public static partial class Ole32 /// FormatID: {5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}, 100 /// public static PROPERTYKEY Hobbies - => new PROPERTYKEY(new Guid("{5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}"), 100); + => new(new Guid("{5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}"), 100); /// /// Name: System.Contact.HomeAddress -- PKEY_Contact_HomeAddress @@ -2171,7 +2128,7 @@ public static partial class Ole32 /// FormatID: {98F98354-617A-46B8-8560-5B1B64BF1F89}, 100 /// public static PROPERTYKEY HomeAddress - => new PROPERTYKEY(new Guid("{98F98354-617A-46B8-8560-5B1B64BF1F89}"), 100); + => new(new Guid("{98F98354-617A-46B8-8560-5B1B64BF1F89}"), 100); /// /// Name: System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity @@ -2180,7 +2137,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 65 /// public static PROPERTYKEY HomeAddressCity - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 65); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 65); /// /// Name: System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry @@ -2189,7 +2146,7 @@ public static partial class Ole32 /// FormatID: {08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}, 100 /// public static PROPERTYKEY HomeAddressCountry - => new PROPERTYKEY(new Guid("{08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}"), 100); + => new(new Guid("{08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}"), 100); /// /// Name: System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode @@ -2198,7 +2155,7 @@ public static partial class Ole32 /// FormatID: {8AFCC170-8A46-4B53-9EEE-90BAE7151E62}, 100 /// public static PROPERTYKEY HomeAddressPostalCode - => new PROPERTYKEY(new Guid("{8AFCC170-8A46-4B53-9EEE-90BAE7151E62}"), 100); + => new(new Guid("{8AFCC170-8A46-4B53-9EEE-90BAE7151E62}"), 100); /// /// Name: System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox @@ -2207,7 +2164,7 @@ public static partial class Ole32 /// FormatID: {7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}, 100 /// public static PROPERTYKEY HomeAddressPostOfficeBox - => new PROPERTYKEY(new Guid("{7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}"), 100); + => new(new Guid("{7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}"), 100); /// /// Name: System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState @@ -2216,7 +2173,7 @@ public static partial class Ole32 /// FormatID: {C89A23D0-7D6D-4EB8-87D4-776A82D493E5}, 100 /// public static PROPERTYKEY HomeAddressState - => new PROPERTYKEY(new Guid("{C89A23D0-7D6D-4EB8-87D4-776A82D493E5}"), 100); + => new(new Guid("{C89A23D0-7D6D-4EB8-87D4-776A82D493E5}"), 100); /// /// Name: System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet @@ -2225,7 +2182,7 @@ public static partial class Ole32 /// FormatID: {0ADEF160-DB3F-4308-9A21-06237B16FA2A}, 100 /// public static PROPERTYKEY HomeAddressStreet - => new PROPERTYKEY(new Guid("{0ADEF160-DB3F-4308-9A21-06237B16FA2A}"), 100); + => new(new Guid("{0ADEF160-DB3F-4308-9A21-06237B16FA2A}"), 100); /// /// Name: System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber @@ -2234,7 +2191,7 @@ public static partial class Ole32 /// FormatID: {660E04D6-81AB-4977-A09F-82313113AB26}, 100 /// public static PROPERTYKEY HomeFaxNumber - => new PROPERTYKEY(new Guid("{660E04D6-81AB-4977-A09F-82313113AB26}"), 100); + => new(new Guid("{660E04D6-81AB-4977-A09F-82313113AB26}"), 100); /// /// Name: System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone @@ -2243,7 +2200,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 20 /// public static PROPERTYKEY HomeTelephone - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 20); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 20); /// /// Name: System.Contact.IMAddress -- PKEY_Contact_IMAddress @@ -2252,7 +2209,7 @@ public static partial class Ole32 /// FormatID: {D68DBD8A-3374-4B81-9972-3EC30682DB3D}, 100 /// public static PROPERTYKEY IMAddress - => new PROPERTYKEY(new Guid("{D68DBD8A-3374-4B81-9972-3EC30682DB3D}"), 100); + => new(new Guid("{D68DBD8A-3374-4B81-9972-3EC30682DB3D}"), 100); /// /// Name: System.Contact.Initials -- PKEY_Contact_Initials @@ -2261,7 +2218,7 @@ public static partial class Ole32 /// FormatID: {F3D8F40D-50CB-44A2-9718-40CB9119495D}, 100 /// public static PROPERTYKEY Initials - => new PROPERTYKEY(new Guid("{F3D8F40D-50CB-44A2-9718-40CB9119495D}"), 100); + => new(new Guid("{F3D8F40D-50CB-44A2-9718-40CB9119495D}"), 100); /// /// Name: System.Contact.JobTitle -- PKEY_Contact_JobTitle @@ -2270,7 +2227,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 6 /// public static PROPERTYKEY JobTitle - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 6); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 6); /// /// Name: System.Contact.Label -- PKEY_Contact_Label @@ -2279,7 +2236,7 @@ public static partial class Ole32 /// FormatID: {97B0AD89-DF49-49CC-834E-660974FD755B}, 100 /// public static PROPERTYKEY Label - => new PROPERTYKEY(new Guid("{97B0AD89-DF49-49CC-834E-660974FD755B}"), 100); + => new(new Guid("{97B0AD89-DF49-49CC-834E-660974FD755B}"), 100); /// /// Name: System.Contact.LastName -- PKEY_Contact_LastName @@ -2288,7 +2245,7 @@ public static partial class Ole32 /// FormatID: {8F367200-C270-457C-B1D4-E07C5BCD90C7}, 100 /// public static PROPERTYKEY LastName - => new PROPERTYKEY(new Guid("{8F367200-C270-457C-B1D4-E07C5BCD90C7}"), 100); + => new(new Guid("{8F367200-C270-457C-B1D4-E07C5BCD90C7}"), 100); /// /// Name: System.Contact.MailingAddress -- PKEY_Contact_MailingAddress @@ -2297,7 +2254,7 @@ public static partial class Ole32 /// FormatID: {C0AC206A-827E-4650-95AE-77E2BB74FCC9}, 100 /// public static PROPERTYKEY MailingAddress - => new PROPERTYKEY(new Guid("{C0AC206A-827E-4650-95AE-77E2BB74FCC9}"), 100); + => new(new Guid("{C0AC206A-827E-4650-95AE-77E2BB74FCC9}"), 100); /// /// Name: System.Contact.MiddleName -- PKEY_Contact_MiddleName @@ -2306,7 +2263,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 71 /// public static PROPERTYKEY MiddleName - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 71); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 71); /// /// Name: System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone @@ -2315,7 +2272,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 35 /// public static PROPERTYKEY MobileTelephone - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 35); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 35); /// /// Name: System.Contact.NickName -- PKEY_Contact_NickName @@ -2324,7 +2281,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 74 /// public static PROPERTYKEY NickName - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 74); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 74); /// /// Name: System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation @@ -2333,7 +2290,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 7 /// public static PROPERTYKEY OfficeLocation - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 7); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 7); /// /// Name: System.Contact.OtherAddress -- PKEY_Contact_OtherAddress @@ -2342,7 +2299,7 @@ public static partial class Ole32 /// FormatID: {508161FA-313B-43D5-83A1-C1ACCF68622C}, 100 /// public static PROPERTYKEY OtherAddress - => new PROPERTYKEY(new Guid("{508161FA-313B-43D5-83A1-C1ACCF68622C}"), 100); + => new(new Guid("{508161FA-313B-43D5-83A1-C1ACCF68622C}"), 100); /// /// Name: System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity @@ -2351,7 +2308,7 @@ public static partial class Ole32 /// FormatID: {6E682923-7F7B-4F0C-A337-CFCA296687BF}, 100 /// public static PROPERTYKEY OtherAddressCity - => new PROPERTYKEY(new Guid("{6E682923-7F7B-4F0C-A337-CFCA296687BF}"), 100); + => new(new Guid("{6E682923-7F7B-4F0C-A337-CFCA296687BF}"), 100); /// /// Name: System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry @@ -2360,7 +2317,7 @@ public static partial class Ole32 /// FormatID: {8F167568-0AAE-4322-8ED9-6055B7B0E398}, 100 /// public static PROPERTYKEY OtherAddressCountry - => new PROPERTYKEY(new Guid("{8F167568-0AAE-4322-8ED9-6055B7B0E398}"), 100); + => new(new Guid("{8F167568-0AAE-4322-8ED9-6055B7B0E398}"), 100); /// /// Name: System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode @@ -2369,7 +2326,7 @@ public static partial class Ole32 /// FormatID: {95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}, 100 /// public static PROPERTYKEY OtherAddressPostalCode - => new PROPERTYKEY(new Guid("{95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}"), 100); + => new(new Guid("{95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}"), 100); /// /// Name: System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox @@ -2378,7 +2335,7 @@ public static partial class Ole32 /// FormatID: {8B26EA41-058F-43F6-AECC-4035681CE977}, 100 /// public static PROPERTYKEY OtherAddressPostOfficeBox - => new PROPERTYKEY(new Guid("{8B26EA41-058F-43F6-AECC-4035681CE977}"), 100); + => new(new Guid("{8B26EA41-058F-43F6-AECC-4035681CE977}"), 100); /// /// Name: System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState @@ -2387,7 +2344,7 @@ public static partial class Ole32 /// FormatID: {71B377D6-E570-425F-A170-809FAE73E54E}, 100 /// public static PROPERTYKEY OtherAddressState - => new PROPERTYKEY(new Guid("{71B377D6-E570-425F-A170-809FAE73E54E}"), 100); + => new(new Guid("{71B377D6-E570-425F-A170-809FAE73E54E}"), 100); /// /// Name: System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet @@ -2396,7 +2353,7 @@ public static partial class Ole32 /// FormatID: {FF962609-B7D6-4999-862D-95180D529AEA}, 100 /// public static PROPERTYKEY OtherAddressStreet - => new PROPERTYKEY(new Guid("{FF962609-B7D6-4999-862D-95180D529AEA}"), 100); + => new(new Guid("{FF962609-B7D6-4999-862D-95180D529AEA}"), 100); /// /// Name: System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone @@ -2405,7 +2362,7 @@ public static partial class Ole32 /// FormatID: {D6304E01-F8F5-4F45-8B15-D024A6296789}, 100 /// public static PROPERTYKEY PagerTelephone - => new PROPERTYKEY(new Guid("{D6304E01-F8F5-4F45-8B15-D024A6296789}"), 100); + => new(new Guid("{D6304E01-F8F5-4F45-8B15-D024A6296789}"), 100); /// /// Name: System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle @@ -2414,7 +2371,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 69 /// public static PROPERTYKEY PersonalTitle - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 69); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 69); /// /// Name: System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity @@ -2423,7 +2380,7 @@ public static partial class Ole32 /// FormatID: {C8EA94F0-A9E3-4969-A94B-9C62A95324E0}, 100 /// public static PROPERTYKEY PrimaryAddressCity - => new PROPERTYKEY(new Guid("{C8EA94F0-A9E3-4969-A94B-9C62A95324E0}"), 100); + => new(new Guid("{C8EA94F0-A9E3-4969-A94B-9C62A95324E0}"), 100); /// /// Name: System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry @@ -2432,7 +2389,7 @@ public static partial class Ole32 /// FormatID: {E53D799D-0F3F-466E-B2FF-74634A3CB7A4}, 100 /// public static PROPERTYKEY PrimaryAddressCountry - => new PROPERTYKEY(new Guid("{E53D799D-0F3F-466E-B2FF-74634A3CB7A4}"), 100); + => new(new Guid("{E53D799D-0F3F-466E-B2FF-74634A3CB7A4}"), 100); /// /// Name: System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode @@ -2441,7 +2398,7 @@ public static partial class Ole32 /// FormatID: {18BBD425-ECFD-46EF-B612-7B4A6034EDA0}, 100 /// public static PROPERTYKEY PrimaryAddressPostalCode - => new PROPERTYKEY(new Guid("{18BBD425-ECFD-46EF-B612-7B4A6034EDA0}"), 100); + => new(new Guid("{18BBD425-ECFD-46EF-B612-7B4A6034EDA0}"), 100); /// /// Name: System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox @@ -2450,7 +2407,7 @@ public static partial class Ole32 /// FormatID: {DE5EF3C7-46E1-484E-9999-62C5308394C1}, 100 /// public static PROPERTYKEY PrimaryAddressPostOfficeBox - => new PROPERTYKEY(new Guid("{DE5EF3C7-46E1-484E-9999-62C5308394C1}"), 100); + => new(new Guid("{DE5EF3C7-46E1-484E-9999-62C5308394C1}"), 100); /// /// Name: System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState @@ -2459,7 +2416,7 @@ public static partial class Ole32 /// FormatID: {F1176DFE-7138-4640-8B4C-AE375DC70A6D}, 100 /// public static PROPERTYKEY PrimaryAddressState - => new PROPERTYKEY(new Guid("{F1176DFE-7138-4640-8B4C-AE375DC70A6D}"), 100); + => new(new Guid("{F1176DFE-7138-4640-8B4C-AE375DC70A6D}"), 100); /// /// Name: System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet @@ -2468,7 +2425,7 @@ public static partial class Ole32 /// FormatID: {63C25B20-96BE-488F-8788-C09C407AD812}, 100 /// public static PROPERTYKEY PrimaryAddressStreet - => new PROPERTYKEY(new Guid("{63C25B20-96BE-488F-8788-C09C407AD812}"), 100); + => new(new Guid("{63C25B20-96BE-488F-8788-C09C407AD812}"), 100); /// /// Name: System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress @@ -2477,7 +2434,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 48 /// public static PROPERTYKEY PrimaryEmailAddress - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 48); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 48); /// /// Name: System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone @@ -2486,7 +2443,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 25 /// public static PROPERTYKEY PrimaryTelephone - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 25); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 25); /// /// Name: System.Contact.Profession -- PKEY_Contact_Profession @@ -2495,7 +2452,7 @@ public static partial class Ole32 /// FormatID: {7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}, 100 /// public static PROPERTYKEY Profession - => new PROPERTYKEY(new Guid("{7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}"), 100); + => new(new Guid("{7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}"), 100); /// /// Name: System.Contact.SpouseName -- PKEY_Contact_SpouseName @@ -2504,7 +2461,7 @@ public static partial class Ole32 /// FormatID: {9D2408B6-3167-422B-82B0-F583B7A7CFE3}, 100 /// public static PROPERTYKEY SpouseName - => new PROPERTYKEY(new Guid("{9D2408B6-3167-422B-82B0-F583B7A7CFE3}"), 100); + => new(new Guid("{9D2408B6-3167-422B-82B0-F583B7A7CFE3}"), 100); /// /// Name: System.Contact.Suffix -- PKEY_Contact_Suffix @@ -2513,7 +2470,7 @@ public static partial class Ole32 /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 73 /// public static PROPERTYKEY Suffix - => new PROPERTYKEY(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 73); + => new(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 73); /// /// Name: System.Contact.TelexNumber -- PKEY_Contact_TelexNumber @@ -2522,7 +2479,7 @@ public static partial class Ole32 /// FormatID: {C554493C-C1F7-40C1-A76C-EF8C0614003E}, 100 /// public static PROPERTYKEY TelexNumber - => new PROPERTYKEY(new Guid("{C554493C-C1F7-40C1-A76C-EF8C0614003E}"), 100); + => new(new Guid("{C554493C-C1F7-40C1-A76C-EF8C0614003E}"), 100); /// /// Name: System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone @@ -2531,7 +2488,7 @@ public static partial class Ole32 /// FormatID: {AAF16BAC-2B55-45E6-9F6D-415EB94910DF}, 100 /// public static PROPERTYKEY TTYTDDTelephone - => new PROPERTYKEY(new Guid("{AAF16BAC-2B55-45E6-9F6D-415EB94910DF}"), 100); + => new(new Guid("{AAF16BAC-2B55-45E6-9F6D-415EB94910DF}"), 100); /// /// Name: System.Contact.WebPage -- PKEY_Contact_WebPage @@ -2540,7 +2497,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 18 /// public static PROPERTYKEY WebPage - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 18); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 18); /// JA Properties public static class JA @@ -2552,7 +2509,7 @@ public static partial class Ole32 /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 2 /// public static PROPERTYKEY CompanyNamePhonetic - => new PROPERTYKEY(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 2); + => new(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 2); /// /// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic @@ -2561,7 +2518,7 @@ public static partial class Ole32 /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 3 /// public static PROPERTYKEY FirstNamePhonetic - => new PROPERTYKEY(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 3); + => new(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 3); /// /// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic @@ -2570,7 +2527,7 @@ public static partial class Ole32 /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 4 /// public static PROPERTYKEY LastNamePhonetic - => new PROPERTYKEY(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 4); + => new(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 4); } } @@ -2584,7 +2541,7 @@ public static partial class Ole32 /// FormatID: {0B48F35A-BE6E-4F17-B108-3C4073D1669A}, 15 /// public static PROPERTYKEY PrinterURL - => new PROPERTYKEY(new Guid("{0B48F35A-BE6E-4F17-B108-3C4073D1669A}"), 15); + => new(new Guid("{0B48F35A-BE6E-4F17-B108-3C4073D1669A}"), 15); } /// DeviceInterface Properties @@ -2597,7 +2554,7 @@ public static partial class Ole32 /// FormatID: {847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}, 14 /// public static PROPERTYKEY PrinterDriverDirectory - => new PROPERTYKEY(new Guid("{847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}"), 14); + => new(new Guid("{847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}"), 14); /// /// Name: System.DeviceInterface.PrinterDriverName -- PKEY_DeviceInterface_PrinterDriverName @@ -2606,7 +2563,7 @@ public static partial class Ole32 /// FormatID: {AFC47170-14F5-498C-8F30-B0D19BE449C6}, 11 /// public static PROPERTYKEY PrinterDriverName - => new PROPERTYKEY(new Guid("{AFC47170-14F5-498C-8F30-B0D19BE449C6}"), 11); + => new(new Guid("{AFC47170-14F5-498C-8F30-B0D19BE449C6}"), 11); /// /// Name: System.DeviceInterface.PrinterName -- PKEY_DeviceInterface_PrinterName @@ -2615,7 +2572,7 @@ public static partial class Ole32 /// FormatID: {0A7B84EF-0C27-463F-84EF-06C5070001BE}, 10 /// public static PROPERTYKEY PrinterName - => new PROPERTYKEY(new Guid("{0A7B84EF-0C27-463F-84EF-06C5070001BE}"), 10); + => new(new Guid("{0A7B84EF-0C27-463F-84EF-06C5070001BE}"), 10); /// /// Name: System.DeviceInterface.PrinterPortName -- PKEY_DeviceInterface_PrinterPortName @@ -2624,7 +2581,7 @@ public static partial class Ole32 /// FormatID: {EEC7B761-6F94-41B1-949F-C729720DD13C}, 12 /// public static PROPERTYKEY PrinterPortName - => new PROPERTYKEY(new Guid("{EEC7B761-6F94-41B1-949F-C729720DD13C}"), 12); + => new(new Guid("{EEC7B761-6F94-41B1-949F-C729720DD13C}"), 12); } /// Devices Properties @@ -2637,7 +2594,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 10 /// public static PROPERTYKEY BatteryLife - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 10); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 10); /// /// Name: System.Devices.BatteryPlusCharging -- PKEY_Devices_BatteryPlusCharging @@ -2648,7 +2605,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 22 /// public static PROPERTYKEY BatteryPlusCharging - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 22); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 22); /// /// Name: System.Devices.BatteryPlusChargingText -- PKEY_Devices_BatteryPlusChargingText @@ -2657,7 +2614,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 23 /// public static PROPERTYKEY BatteryPlusChargingText - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 23); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 23); /// /// Name: System.Devices.Category -- PKEY_Devices_Category_Desc_Singular @@ -2666,7 +2623,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 91 /// public static PROPERTYKEY Category - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 91); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 91); /// /// Name: System.Devices.CategoryGroup -- PKEY_Devices_CategoryGroup_Desc @@ -2675,7 +2632,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 94 /// public static PROPERTYKEY CategoryGroup - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 94); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 94); /// /// Name: System.Devices.CategoryPlural -- PKEY_Devices_Category_Desc_Plural @@ -2684,7 +2641,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 92 /// public static PROPERTYKEY CategoryPlural - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 92); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 92); /// /// Name: System.Devices.ChargingState -- PKEY_Devices_ChargingState @@ -2693,18 +2650,16 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 11 /// public static PROPERTYKEY ChargingState - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 11); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 11); /// /// Name: System.Devices.Connected -- PKEY_Devices_IsConnected - /// - /// Description: Device connection state. If VARIANT_TRUE, indicates the device is currently connected to the computer. - /// + /// Description: Device connection state. If VARIANT_TRUE, indicates the device is currently connected to the computer. /// Type: Boolean -- VT_BOOL /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 55 /// public static PROPERTYKEY Connected - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 55); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 55); /// /// Name: System.Devices.ContainerId -- PKEY_Devices_ContainerId @@ -2713,7 +2668,7 @@ public static partial class Ole32 /// FormatID: {8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}, 2 /// public static PROPERTYKEY ContainerId - => new PROPERTYKEY(new Guid("{8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}"), 2); + => new(new Guid("{8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}"), 2); /// /// Name: System.Devices.DefaultTooltip -- PKEY_Devices_DefaultTooltip @@ -2722,7 +2677,7 @@ public static partial class Ole32 /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 153 /// public static PROPERTYKEY DefaultTooltip - => new PROPERTYKEY(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 153); + => new(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 153); /// /// Name: System.Devices.DeviceDescription1 -- PKEY_Devices_DeviceDescription1 @@ -2731,7 +2686,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 81 /// public static PROPERTYKEY DeviceDescription1 - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 81); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 81); /// /// Name: System.Devices.DeviceDescription2 -- PKEY_Devices_DeviceDescription2 @@ -2740,18 +2695,16 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 82 /// public static PROPERTYKEY DeviceDescription2 - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 82); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 82); /// /// Name: System.Devices.DiscoveryMethod -- PKEY_Devices_DiscoveryMethod - /// - /// Description: Device discovery method. This indicates on what transport or physical connection the device is discovered. - /// + /// Description: Device discovery method. This indicates on what transport or physical connection the device is discovered. /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 52 /// public static PROPERTYKEY DiscoveryMethod - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 52); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 52); /// /// Name: System.Devices.FriendlyName -- PKEY_Devices_FriendlyName @@ -2760,7 +2713,7 @@ public static partial class Ole32 /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 12288 /// public static PROPERTYKEY FriendlyName - => new PROPERTYKEY(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 12288); + => new(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 12288); /// /// Name: System.Devices.FunctionPaths -- PKEY_Devices_FunctionPaths @@ -2769,7 +2722,7 @@ public static partial class Ole32 /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 3 /// public static PROPERTYKEY FunctionPaths - => new PROPERTYKEY(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 3); + => new(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 3); /// /// Name: System.Devices.InterfacePaths -- PKEY_Devices_InterfacePaths @@ -2778,7 +2731,7 @@ public static partial class Ole32 /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 2 /// public static PROPERTYKEY InterfacePaths - => new PROPERTYKEY(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 2); + => new(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 2); /// /// Name: System.Devices.IsDefault -- PKEY_Devices_IsDefaultDevice @@ -2787,7 +2740,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 86 /// public static PROPERTYKEY IsDefault - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 86); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 86); /// /// Name: System.Devices.IsNetworkConnected -- PKEY_Devices_IsNetworkDevice @@ -2796,7 +2749,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 85 /// public static PROPERTYKEY IsNetworkConnected - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 85); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 85); /// /// Name: System.Devices.IsShared -- PKEY_Devices_IsSharedDevice @@ -2805,7 +2758,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 84 /// public static PROPERTYKEY IsShared - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 84); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 84); /// /// Name: System.Devices.IsSoftwareInstalling -- PKEY_Devices_IsSoftwareInstalling @@ -2814,7 +2767,7 @@ public static partial class Ole32 /// FormatID: {83DA6326-97A6-4088-9453-A1923F573B29}, 9 /// public static PROPERTYKEY IsSoftwareInstalling - => new PROPERTYKEY(new Guid("{83DA6326-97A6-4088-9453-A1923F573B29}"), 9); + => new(new Guid("{83DA6326-97A6-4088-9453-A1923F573B29}"), 9); /// /// Name: System.Devices.LaunchDeviceStageFromExplorer -- PKEY_Devices_LaunchDeviceStageFromExplorer @@ -2823,7 +2776,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 77 /// public static PROPERTYKEY LaunchDeviceStageFromExplorer - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 77); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 77); /// /// Name: System.Devices.LocalMachine -- PKEY_Devices_IsLocalMachine @@ -2832,7 +2785,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 70 /// public static PROPERTYKEY LocalMachine - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 70); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 70); /// /// Name: System.Devices.Manufacturer -- PKEY_Devices_Manufacturer @@ -2841,7 +2794,7 @@ public static partial class Ole32 /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8192 /// public static PROPERTYKEY Manufacturer - => new PROPERTYKEY(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8192); + => new(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8192); /// /// Name: System.Devices.MissedCalls -- PKEY_Devices_MissedCalls @@ -2850,7 +2803,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 5 /// public static PROPERTYKEY MissedCalls - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 5); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 5); /// /// Name: System.Devices.ModelName -- PKEY_Devices_ModelName @@ -2859,7 +2812,7 @@ public static partial class Ole32 /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8194 /// public static PROPERTYKEY ModelName - => new PROPERTYKEY(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8194); + => new(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8194); /// /// Name: System.Devices.ModelNumber -- PKEY_Devices_ModelNumber @@ -2868,7 +2821,7 @@ public static partial class Ole32 /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8195 /// public static PROPERTYKEY ModelNumber - => new PROPERTYKEY(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8195); + => new(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8195); /// /// Name: System.Devices.NetworkedTooltip -- PKEY_Devices_NetworkedTooltip @@ -2877,7 +2830,7 @@ public static partial class Ole32 /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 152 /// public static PROPERTYKEY NetworkedTooltip - => new PROPERTYKEY(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 152); + => new(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 152); /// /// Name: System.Devices.NetworkName -- PKEY_Devices_NetworkName @@ -2886,7 +2839,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 7 /// public static PROPERTYKEY NetworkName - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 7); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 7); /// /// Name: System.Devices.NetworkType -- PKEY_Devices_NetworkType @@ -2895,7 +2848,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 8 /// public static PROPERTYKEY NetworkType - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 8); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 8); /// /// Name: System.Devices.NewPictures -- PKEY_Devices_NewPictures @@ -2904,7 +2857,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 4 /// public static PROPERTYKEY NewPictures - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 4); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 4); /// /// Name: System.Devices.Notification -- PKEY_Devices_Notification @@ -2913,7 +2866,7 @@ public static partial class Ole32 /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 3 /// public static PROPERTYKEY Notification - => new PROPERTYKEY(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 3); + => new(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 3); /// /// Name: System.Devices.NotificationStore -- PKEY_Devices_NotificationStore @@ -2922,7 +2875,7 @@ public static partial class Ole32 /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 2 /// public static PROPERTYKEY NotificationStore - => new PROPERTYKEY(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 2); + => new(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 2); /// /// Name: System.Devices.NotWorkingProperly -- PKEY_Devices_IsNotWorkingProperly @@ -2931,7 +2884,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 83 /// public static PROPERTYKEY NotWorkingProperly - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 83); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 83); /// /// Name: System.Devices.Paired -- PKEY_Devices_IsPaired @@ -2940,7 +2893,7 @@ public static partial class Ole32 /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 56 /// public static PROPERTYKEY Paired - => new PROPERTYKEY(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 56); + => new(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 56); /// /// Name: System.Devices.PrimaryCategory -- PKEY_Devices_PrimaryCategory @@ -2949,7 +2902,7 @@ public static partial class Ole32 /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 10 /// public static PROPERTYKEY PrimaryCategory - => new PROPERTYKEY(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 10); + => new(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 10); /// /// Name: System.Devices.Roaming -- PKEY_Devices_Roaming @@ -2958,7 +2911,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 9 /// public static PROPERTYKEY Roaming - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 9); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 9); /// /// Name: System.Devices.SafeRemovalRequired -- PKEY_Devices_SafeRemovalRequired @@ -2967,7 +2920,7 @@ public static partial class Ole32 /// FormatID: {AFD97640-86A3-4210-B67C-289C41AABE55}, 2 /// public static PROPERTYKEY SafeRemovalRequired - => new PROPERTYKEY(new Guid("{AFD97640-86A3-4210-B67C-289C41AABE55}"), 2); + => new(new Guid("{AFD97640-86A3-4210-B67C-289C41AABE55}"), 2); /// /// Name: System.Devices.SharedTooltip -- PKEY_Devices_SharedTooltip @@ -2976,7 +2929,7 @@ public static partial class Ole32 /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 151 /// public static PROPERTYKEY SharedTooltip - => new PROPERTYKEY(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 151); + => new(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 151); /// /// Name: System.Devices.SignalStrength -- PKEY_Devices_SignalStrength @@ -2985,7 +2938,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 2 /// public static PROPERTYKEY SignalStrength - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 2); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 2); /// /// Name: System.Devices.Status1 -- PKEY_Devices_Status1 @@ -2994,7 +2947,7 @@ public static partial class Ole32 /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 257 /// public static PROPERTYKEY Status1 - => new PROPERTYKEY(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 257); + => new(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 257); /// /// Name: System.Devices.Status2 -- PKEY_Devices_Status2 @@ -3003,7 +2956,7 @@ public static partial class Ole32 /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 258 /// public static PROPERTYKEY Status2 - => new PROPERTYKEY(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 258); + => new(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 258); /// /// Name: System.Devices.StorageCapacity -- PKEY_Devices_StorageCapacity @@ -3012,7 +2965,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 12 /// public static PROPERTYKEY StorageCapacity - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 12); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 12); /// /// Name: System.Devices.StorageFreeSpace -- PKEY_Devices_StorageFreeSpace @@ -3021,7 +2974,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 13 /// public static PROPERTYKEY StorageFreeSpace - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 13); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 13); /// /// Name: System.Devices.StorageFreeSpacePercent -- PKEY_Devices_StorageFreeSpacePercent @@ -3030,7 +2983,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 14 /// public static PROPERTYKEY StorageFreeSpacePercent - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 14); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 14); /// /// Name: System.Devices.TextMessages -- PKEY_Devices_TextMessages @@ -3039,7 +2992,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 3 /// public static PROPERTYKEY TextMessages - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 3); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 3); /// /// Name: System.Devices.Voicemail -- PKEY_Devices_Voicemail @@ -3048,7 +3001,7 @@ public static partial class Ole32 /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 6 /// public static PROPERTYKEY Voicemail - => new PROPERTYKEY(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 6); + => new(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 6); /// Notifications Properties public static class Notifications @@ -3060,7 +3013,7 @@ public static partial class Ole32 /// FormatID: {C4C07F2B-8524-4E66-AE3A-A6235F103BEB}, 2 /// public static PROPERTYKEY LowBattery - => new PROPERTYKEY(new Guid("{C4C07F2B-8524-4E66-AE3A-A6235F103BEB}"), 2); + => new(new Guid("{C4C07F2B-8524-4E66-AE3A-A6235F103BEB}"), 2); /// /// Name: System.Devices.Notifications.MissedCall -- PKEY_Devices_Notification_MissedCall @@ -3069,7 +3022,7 @@ public static partial class Ole32 /// FormatID: {6614EF48-4EFE-4424-9EDA-C79F404EDF3E}, 2 /// public static PROPERTYKEY MissedCall - => new PROPERTYKEY(new Guid("{6614EF48-4EFE-4424-9EDA-C79F404EDF3E}"), 2); + => new(new Guid("{6614EF48-4EFE-4424-9EDA-C79F404EDF3E}"), 2); /// /// Name: System.Devices.Notifications.NewMessage -- PKEY_Devices_Notification_NewMessage @@ -3078,7 +3031,7 @@ public static partial class Ole32 /// FormatID: {2BE9260A-2012-4742-A555-F41B638B7DCB}, 2 /// public static PROPERTYKEY NewMessage - => new PROPERTYKEY(new Guid("{2BE9260A-2012-4742-A555-F41B638B7DCB}"), 2); + => new(new Guid("{2BE9260A-2012-4742-A555-F41B638B7DCB}"), 2); /// /// Name: System.Devices.Notifications.NewVoicemail -- PKEY_Devices_Notification_NewVoicemail @@ -3087,7 +3040,7 @@ public static partial class Ole32 /// FormatID: {59569556-0A08-4212-95B9-FAE2AD6413DB}, 2 /// public static PROPERTYKEY NewVoicemail - => new PROPERTYKEY(new Guid("{59569556-0A08-4212-95B9-FAE2AD6413DB}"), 2); + => new(new Guid("{59569556-0A08-4212-95B9-FAE2AD6413DB}"), 2); /// /// Name: System.Devices.Notifications.StorageFull -- PKEY_Devices_Notification_StorageFull @@ -3096,7 +3049,7 @@ public static partial class Ole32 /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 2 /// public static PROPERTYKEY StorageFull - => new PROPERTYKEY(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 2); + => new(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 2); /// /// Name: System.Devices.Notifications.StorageFullLinkText -- PKEY_Devices_Notification_StorageFullLinkText @@ -3105,7 +3058,7 @@ public static partial class Ole32 /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 3 /// public static PROPERTYKEY StorageFullLinkText - => new PROPERTYKEY(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 3); + => new(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 3); } } @@ -3119,7 +3072,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 4 (PIDDSI_BYTECOUNT) /// public static PROPERTYKEY ByteCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 4); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 4); /// /// Name: System.Document.CharacterCount -- PKEY_Document_CharacterCount @@ -3128,7 +3081,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 16 (PIDSI_CHARCOUNT) /// public static PROPERTYKEY CharacterCount - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 16); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 16); /// /// Name: System.Document.ClientID -- PKEY_Document_ClientID @@ -3137,7 +3090,7 @@ public static partial class Ole32 /// FormatID: {276D7BB0-5B34-4FB0-AA4B-158ED12A1809}, 100 /// public static PROPERTYKEY ClientID - => new PROPERTYKEY(new Guid("{276D7BB0-5B34-4FB0-AA4B-158ED12A1809}"), 100); + => new(new Guid("{276D7BB0-5B34-4FB0-AA4B-158ED12A1809}"), 100); /// /// Name: System.Document.Contributor -- PKEY_Document_Contributor @@ -3146,7 +3099,7 @@ public static partial class Ole32 /// FormatID: {F334115E-DA1B-4509-9B3D-119504DC7ABB}, 100 /// public static PROPERTYKEY Contributor - => new PROPERTYKEY(new Guid("{F334115E-DA1B-4509-9B3D-119504DC7ABB}"), 100); + => new(new Guid("{F334115E-DA1B-4509-9B3D-119504DC7ABB}"), 100); /// /// Name: System.Document.DateCreated -- PKEY_Document_DateCreated @@ -3155,7 +3108,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 12 (PIDSI_CREATE_DTM) /// public static PROPERTYKEY DateCreated - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 12); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 12); /// /// Name: System.Document.DatePrinted -- PKEY_Document_DatePrinted @@ -3164,7 +3117,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 11 (PIDSI_LASTPRINTED) /// public static PROPERTYKEY DatePrinted - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 11); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 11); /// /// Name: System.Document.DateSaved -- PKEY_Document_DateSaved @@ -3173,7 +3126,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 13 (PIDSI_LASTSAVE_DTM) /// public static PROPERTYKEY DateSaved - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 13); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 13); /// /// Name: System.Document.Division -- PKEY_Document_Division @@ -3182,7 +3135,7 @@ public static partial class Ole32 /// FormatID: {1E005EE6-BF27-428B-B01C-79676ACD2870}, 100 /// public static PROPERTYKEY Division - => new PROPERTYKEY(new Guid("{1E005EE6-BF27-428B-B01C-79676ACD2870}"), 100); + => new(new Guid("{1E005EE6-BF27-428B-B01C-79676ACD2870}"), 100); /// /// Name: System.Document.DocumentID -- PKEY_Document_DocumentID @@ -3191,7 +3144,7 @@ public static partial class Ole32 /// FormatID: {E08805C8-E395-40DF-80D2-54F0D6C43154}, 100 /// public static PROPERTYKEY DocumentID - => new PROPERTYKEY(new Guid("{E08805C8-E395-40DF-80D2-54F0D6C43154}"), 100); + => new(new Guid("{E08805C8-E395-40DF-80D2-54F0D6C43154}"), 100); /// /// Name: System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount @@ -3200,7 +3153,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 9 (PIDDSI_HIDDENCOUNT) /// public static PROPERTYKEY HiddenSlideCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 9); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 9); /// /// Name: System.Document.LastAuthor -- PKEY_Document_LastAuthor @@ -3209,7 +3162,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 8 (PIDSI_LASTAUTHOR) /// public static PROPERTYKEY LastAuthor - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 8); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 8); /// /// Name: System.Document.LineCount -- PKEY_Document_LineCount @@ -3218,7 +3171,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 5 (PIDDSI_LINECOUNT) /// public static PROPERTYKEY LineCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 5); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 5); /// /// Name: System.Document.Manager -- PKEY_Document_Manager @@ -3227,7 +3180,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 14 (PIDDSI_MANAGER) /// public static PROPERTYKEY Manager - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 14); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 14); /// /// Name: System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount @@ -3236,7 +3189,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 10 (PIDDSI_MMCLIPCOUNT) /// public static PROPERTYKEY MultimediaClipCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 10); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 10); /// /// Name: System.Document.NoteCount -- PKEY_Document_NoteCount @@ -3245,7 +3198,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 8 (PIDDSI_NOTECOUNT) /// public static PROPERTYKEY NoteCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 8); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 8); /// /// Name: System.Document.PageCount -- PKEY_Document_PageCount @@ -3254,7 +3207,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 14 (PIDSI_PAGECOUNT) /// public static PROPERTYKEY PageCount - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 14); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 14); /// /// Name: System.Document.ParagraphCount -- PKEY_Document_ParagraphCount @@ -3263,7 +3216,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 6 (PIDDSI_PARCOUNT) /// public static PROPERTYKEY ParagraphCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 6); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 6); /// /// Name: System.Document.PresentationFormat -- PKEY_Document_PresentationFormat @@ -3272,7 +3225,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 3 (PIDDSI_PRESFORMAT) /// public static PROPERTYKEY PresentationFormat - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 3); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 3); /// /// Name: System.Document.RevisionNumber -- PKEY_Document_RevisionNumber @@ -3281,7 +3234,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 9 (PIDSI_REVNUMBER) /// public static PROPERTYKEY RevisionNumber - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 9); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 9); /// /// Name: System.Document.Security -- PKEY_Document_Security @@ -3290,7 +3243,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 19 /// public static PROPERTYKEY Security - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 19); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 19); /// /// Name: System.Document.SlideCount -- PKEY_Document_SlideCount @@ -3299,7 +3252,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 7 (PIDDSI_SLIDECOUNT) /// public static PROPERTYKEY SlideCount - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 7); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 7); /// /// Name: System.Document.Template -- PKEY_Document_Template @@ -3308,7 +3261,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 7 (PIDSI_TEMPLATE) /// public static PROPERTYKEY Template - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 7); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 7); /// /// Name: System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime @@ -3317,7 +3270,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 10 (PIDSI_EDITTIME) /// public static PROPERTYKEY TotalEditingTime - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 10); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 10); /// /// Name: System.Document.Version -- PKEY_Document_Version @@ -3326,7 +3279,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 29 /// public static PROPERTYKEY Version - => new PROPERTYKEY(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 29); + => new(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 29); /// /// Name: System.Document.WordCount -- PKEY_Document_WordCount @@ -3335,7 +3288,7 @@ public static partial class Ole32 /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 15 (PIDSI_WORDCOUNT) /// public static PROPERTYKEY WordCount - => new PROPERTYKEY(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 15); + => new(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 15); } /// DRM Properties @@ -3348,7 +3301,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 6 (PIDDRSI_PLAYEXPIRES) /// public static PROPERTYKEY DatePlayExpires - => new PROPERTYKEY(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 6); + => new(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 6); /// /// Name: System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts @@ -3357,7 +3310,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 5 (PIDDRSI_PLAYSTARTS) /// public static PROPERTYKEY DatePlayStarts - => new PROPERTYKEY(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 5); + => new(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 5); /// /// Name: System.DRM.Description -- PKEY_DRM_Description @@ -3366,7 +3319,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 3 (PIDDRSI_DESCRIPTION) /// public static PROPERTYKEY Description - => new PROPERTYKEY(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 3); + => new(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 3); /// /// Name: System.DRM.IsProtected -- PKEY_DRM_IsProtected @@ -3375,7 +3328,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 2 (PIDDRSI_PROTECTED) /// public static PROPERTYKEY IsProtected - => new PROPERTYKEY(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 2); + => new(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 2); /// /// Name: System.DRM.PlayCount -- PKEY_DRM_PlayCount @@ -3384,7 +3337,7 @@ public static partial class Ole32 /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 4 (PIDDRSI_PLAYCOUNT) /// public static PROPERTYKEY PlayCount - => new PROPERTYKEY(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 4); + => new(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 4); } /// GPS Properties @@ -3400,7 +3353,7 @@ public static partial class Ole32 /// FormatID: {827EDB4F-5B73-44A7-891D-FDFFABEA35CA}, 100 /// public static PROPERTYKEY Altitude - => new PROPERTYKEY(new Guid("{827EDB4F-5B73-44A7-891D-FDFFABEA35CA}"), 100); + => new(new Guid("{827EDB4F-5B73-44A7-891D-FDFFABEA35CA}"), 100); /// /// Name: System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator @@ -3409,7 +3362,7 @@ public static partial class Ole32 /// FormatID: {78342DCB-E358-4145-AE9A-6BFE4E0F9F51}, 100 /// public static PROPERTYKEY AltitudeDenominator - => new PROPERTYKEY(new Guid("{78342DCB-E358-4145-AE9A-6BFE4E0F9F51}"), 100); + => new(new Guid("{78342DCB-E358-4145-AE9A-6BFE4E0F9F51}"), 100); /// /// Name: System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator @@ -3418,7 +3371,7 @@ public static partial class Ole32 /// FormatID: {2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}, 100 /// public static PROPERTYKEY AltitudeNumerator - => new PROPERTYKEY(new Guid("{2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}"), 100); + => new(new Guid("{2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}"), 100); /// /// Name: System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef @@ -3429,7 +3382,7 @@ public static partial class Ole32 /// FormatID: {46AC629D-75EA-4515-867F-6DC4321C5844}, 100 /// public static PROPERTYKEY AltitudeRef - => new PROPERTYKEY(new Guid("{46AC629D-75EA-4515-867F-6DC4321C5844}"), 100); + => new(new Guid("{46AC629D-75EA-4515-867F-6DC4321C5844}"), 100); /// /// Name: System.GPS.AreaInformation -- PKEY_GPS_AreaInformation @@ -3438,7 +3391,7 @@ public static partial class Ole32 /// FormatID: {972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}, 100 /// public static PROPERTYKEY AreaInformation - => new PROPERTYKEY(new Guid("{972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}"), 100); + => new(new Guid("{972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}"), 100); /// /// Name: System.GPS.Date -- PKEY_GPS_Date @@ -3447,7 +3400,7 @@ public static partial class Ole32 /// FormatID: {3602C812-0F3B-45F0-85AD-603468D69423}, 100 /// public static PROPERTYKEY Date - => new PROPERTYKEY(new Guid("{3602C812-0F3B-45F0-85AD-603468D69423}"), 100); + => new(new Guid("{3602C812-0F3B-45F0-85AD-603468D69423}"), 100); /// /// Name: System.GPS.DestBearing -- PKEY_GPS_DestBearing @@ -3458,7 +3411,7 @@ public static partial class Ole32 /// FormatID: {C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}, 100 /// public static PROPERTYKEY DestBearing - => new PROPERTYKEY(new Guid("{C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}"), 100); + => new(new Guid("{C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}"), 100); /// /// Name: System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator @@ -3467,7 +3420,7 @@ public static partial class Ole32 /// FormatID: {7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}, 100 /// public static PROPERTYKEY DestBearingDenominator - => new PROPERTYKEY(new Guid("{7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}"), 100); + => new(new Guid("{7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}"), 100); /// /// Name: System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator @@ -3476,7 +3429,7 @@ public static partial class Ole32 /// FormatID: {BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}, 100 /// public static PROPERTYKEY DestBearingNumerator - => new PROPERTYKEY(new Guid("{BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}"), 100); + => new(new Guid("{BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}"), 100); /// /// Name: System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef @@ -3488,7 +3441,7 @@ public static partial class Ole32 /// FormatID: {9AB84393-2A0F-4B75-BB22-7279786977CB}, 100 /// public static PROPERTYKEY DestBearingRef - => new PROPERTYKEY(new Guid("{9AB84393-2A0F-4B75-BB22-7279786977CB}"), 100); + => new(new Guid("{9AB84393-2A0F-4B75-BB22-7279786977CB}"), 100); /// /// Name: System.GPS.DestDistance -- PKEY_GPS_DestDistance @@ -3499,7 +3452,7 @@ public static partial class Ole32 /// FormatID: {A93EAE04-6804-4F24-AC81-09B266452118}, 100 /// public static PROPERTYKEY DestDistance - => new PROPERTYKEY(new Guid("{A93EAE04-6804-4F24-AC81-09B266452118}"), 100); + => new(new Guid("{A93EAE04-6804-4F24-AC81-09B266452118}"), 100); /// /// Name: System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator @@ -3508,7 +3461,7 @@ public static partial class Ole32 /// FormatID: {9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}, 100 /// public static PROPERTYKEY DestDistanceDenominator - => new PROPERTYKEY(new Guid("{9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}"), 100); + => new(new Guid("{9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}"), 100); /// /// Name: System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator @@ -3517,31 +3470,28 @@ public static partial class Ole32 /// FormatID: {2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}, 100 /// public static PROPERTYKEY DestDistanceNumerator - => new PROPERTYKEY(new Guid("{2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}"), 100); + => new(new Guid("{2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}"), 100); /// /// Name: System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef - /// - /// Description: Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots) - /// + /// Description: Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots) /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {ED4DF2D3-8695-450B-856F-F5C1C53ACB66}, 100 /// public static PROPERTYKEY DestDistanceRef - => new PROPERTYKEY(new Guid("{ED4DF2D3-8695-450B-856F-F5C1C53ACB66}"), 100); + => new(new Guid("{ED4DF2D3-8695-450B-856F-F5C1C53ACB66}"), 100); /// /// Name: System.GPS.DestLatitude -- PKEY_GPS_DestLatitude /// - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the - /// degrees, index 1 is the minutes, index 2 is the seconds. Each is calculated from the values in - /// PKEY_GPS_DestLatitudeNumerator and PKEY_GPS_DestLatitudeDenominator. + /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, + /// index 1 is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and PKEY_GPS_DestLatitudeDenominator. /// /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) /// FormatID: {9D1D7CC5-5C39-451C-86B3-928E2D18CC47}, 100 /// public static PROPERTYKEY DestLatitude - => new PROPERTYKEY(new Guid("{9D1D7CC5-5C39-451C-86B3-928E2D18CC47}"), 100); + => new(new Guid("{9D1D7CC5-5C39-451C-86B3-928E2D18CC47}"), 100); /// /// Name: System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator @@ -3550,7 +3500,7 @@ public static partial class Ole32 /// FormatID: {3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}, 100 /// public static PROPERTYKEY DestLatitudeDenominator - => new PROPERTYKEY(new Guid("{3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}"), 100); + => new(new Guid("{3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}"), 100); /// /// Name: System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator @@ -3559,7 +3509,7 @@ public static partial class Ole32 /// FormatID: {ECF4B6F6-D5A6-433C-BB92-4076650FC890}, 100 /// public static PROPERTYKEY DestLatitudeNumerator - => new PROPERTYKEY(new Guid("{ECF4B6F6-D5A6-433C-BB92-4076650FC890}"), 100); + => new(new Guid("{ECF4B6F6-D5A6-433C-BB92-4076650FC890}"), 100); /// /// Name: System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef @@ -3568,20 +3518,19 @@ public static partial class Ole32 /// FormatID: {CEA820B9-CE61-4885-A128-005D9087C192}, 100 /// public static PROPERTYKEY DestLatitudeRef - => new PROPERTYKEY(new Guid("{CEA820B9-CE61-4885-A128-005D9087C192}"), 100); + => new(new Guid("{CEA820B9-CE61-4885-A128-005D9087C192}"), 100); /// /// Name: System.GPS.DestLongitude -- PKEY_GPS_DestLongitude /// - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the - /// degrees, index 1 is the minutes, index 2 is the seconds. Each is calculated from the values in - /// PKEY_GPS_DestLongitudeNumerator and PKEY_GPS_DestLongitudeDenominator. + /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, + /// index 1 is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and PKEY_GPS_DestLongitudeDenominator. /// /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) /// FormatID: {47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}, 100 /// public static PROPERTYKEY DestLongitude - => new PROPERTYKEY(new Guid("{47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}"), 100); + => new(new Guid("{47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}"), 100); /// /// Name: System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator @@ -3590,7 +3539,7 @@ public static partial class Ole32 /// FormatID: {425D69E5-48AD-4900-8D80-6EB6B8D0AC86}, 100 /// public static PROPERTYKEY DestLongitudeDenominator - => new PROPERTYKEY(new Guid("{425D69E5-48AD-4900-8D80-6EB6B8D0AC86}"), 100); + => new(new Guid("{425D69E5-48AD-4900-8D80-6EB6B8D0AC86}"), 100); /// /// Name: System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator @@ -3599,7 +3548,7 @@ public static partial class Ole32 /// FormatID: {A3250282-FB6D-48D5-9A89-DBCACE75CCCF}, 100 /// public static PROPERTYKEY DestLongitudeNumerator - => new PROPERTYKEY(new Guid("{A3250282-FB6D-48D5-9A89-DBCACE75CCCF}"), 100); + => new(new Guid("{A3250282-FB6D-48D5-9A89-DBCACE75CCCF}"), 100); /// /// Name: System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef @@ -3608,7 +3557,7 @@ public static partial class Ole32 /// FormatID: {182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}, 100 /// public static PROPERTYKEY DestLongitudeRef - => new PROPERTYKEY(new Guid("{182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}"), 100); + => new(new Guid("{182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}"), 100); /// /// Name: System.GPS.Differential -- PKEY_GPS_Differential @@ -3617,18 +3566,16 @@ public static partial class Ole32 /// FormatID: {AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}, 100 /// public static PROPERTYKEY Differential - => new PROPERTYKEY(new Guid("{AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}"), 100); + => new(new Guid("{AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}"), 100); /// /// Name: System.GPS.DOP -- PKEY_GPS_DOP - /// - /// Description: Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator - /// + /// Description: Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator /// Type: Double -- VT_R8 /// FormatID: {0CF8FB02-1837-42F1-A697-A7017AA289B9}, 100 /// public static PROPERTYKEY DOP - => new PROPERTYKEY(new Guid("{0CF8FB02-1837-42F1-A697-A7017AA289B9}"), 100); + => new(new Guid("{0CF8FB02-1837-42F1-A697-A7017AA289B9}"), 100); /// /// Name: System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator @@ -3637,7 +3584,7 @@ public static partial class Ole32 /// FormatID: {A0BE94C5-50BA-487B-BD35-0654BE8881ED}, 100 /// public static PROPERTYKEY DOPDenominator - => new PROPERTYKEY(new Guid("{A0BE94C5-50BA-487B-BD35-0654BE8881ED}"), 100); + => new(new Guid("{A0BE94C5-50BA-487B-BD35-0654BE8881ED}"), 100); /// /// Name: System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator @@ -3646,19 +3593,18 @@ public static partial class Ole32 /// FormatID: {47166B16-364F-4AA0-9F31-E2AB3DF449C3}, 100 /// public static PROPERTYKEY DOPNumerator - => new PROPERTYKEY(new Guid("{47166B16-364F-4AA0-9F31-E2AB3DF449C3}"), 100); + => new(new Guid("{47166B16-364F-4AA0-9F31-E2AB3DF449C3}"), 100); /// /// Name: System.GPS.ImgDirection -- PKEY_GPS_ImgDirection /// - /// Description: Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator - /// and PKEY_GPS_ImgDirectionDenominator. + /// Description: Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator and PKEY_GPS_ImgDirectionDenominator. /// /// Type: Double -- VT_R8 /// FormatID: {16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}, 100 /// public static PROPERTYKEY ImgDirection - => new PROPERTYKEY(new Guid("{16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}"), 100); + => new(new Guid("{16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}"), 100); /// /// Name: System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator @@ -3667,7 +3613,7 @@ public static partial class Ole32 /// FormatID: {10B24595-41A2-4E20-93C2-5761C1395F32}, 100 /// public static PROPERTYKEY ImgDirectionDenominator - => new PROPERTYKEY(new Guid("{10B24595-41A2-4E20-93C2-5761C1395F32}"), 100); + => new(new Guid("{10B24595-41A2-4E20-93C2-5761C1395F32}"), 100); /// /// Name: System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator @@ -3676,7 +3622,7 @@ public static partial class Ole32 /// FormatID: {DC5877C7-225F-45F7-BAC7-E81334B6130A}, 100 /// public static PROPERTYKEY ImgDirectionNumerator - => new PROPERTYKEY(new Guid("{DC5877C7-225F-45F7-BAC7-E81334B6130A}"), 100); + => new(new Guid("{DC5877C7-225F-45F7-BAC7-E81334B6130A}"), 100); /// /// Name: System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef @@ -3688,19 +3634,19 @@ public static partial class Ole32 /// FormatID: {A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}, 100 /// public static PROPERTYKEY ImgDirectionRef - => new PROPERTYKEY(new Guid("{A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}"), 100); + => new(new Guid("{A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}"), 100); /// /// Name: System.GPS.Latitude -- PKEY_GPS_Latitude /// - /// Description: Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the - /// minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator. + /// Description: Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, + /// index 2 is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator. /// /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) /// FormatID: {8727CFFF-4868-4EC6-AD5B-81B98521D1AB}, 100 /// public static PROPERTYKEY Latitude - => new PROPERTYKEY(new Guid("{8727CFFF-4868-4EC6-AD5B-81B98521D1AB}"), 100); + => new(new Guid("{8727CFFF-4868-4EC6-AD5B-81B98521D1AB}"), 100); /// /// Name: System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator @@ -3709,7 +3655,7 @@ public static partial class Ole32 /// FormatID: {16E634EE-2BFF-497B-BD8A-4341AD39EEB9}, 100 /// public static PROPERTYKEY LatitudeDenominator - => new PROPERTYKEY(new Guid("{16E634EE-2BFF-497B-BD8A-4341AD39EEB9}"), 100); + => new(new Guid("{16E634EE-2BFF-497B-BD8A-4341AD39EEB9}"), 100); /// /// Name: System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator @@ -3718,7 +3664,7 @@ public static partial class Ole32 /// FormatID: {7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}, 100 /// public static PROPERTYKEY LatitudeNumerator - => new PROPERTYKEY(new Guid("{7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}"), 100); + => new(new Guid("{7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}"), 100); /// /// Name: System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef @@ -3727,19 +3673,19 @@ public static partial class Ole32 /// FormatID: {029C0252-5B86-46C7-ACA0-2769FFC8E3D4}, 100 /// public static PROPERTYKEY LatitudeRef - => new PROPERTYKEY(new Guid("{029C0252-5B86-46C7-ACA0-2769FFC8E3D4}"), 100); + => new(new Guid("{029C0252-5B86-46C7-ACA0-2769FFC8E3D4}"), 100); /// /// Name: System.GPS.Longitude -- PKEY_GPS_Longitude /// - /// Description: Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the - /// minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator. + /// Description: Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, + /// index 2 is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator. /// /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) /// FormatID: {C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}, 100 /// public static PROPERTYKEY Longitude - => new PROPERTYKEY(new Guid("{C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}"), 100); + => new(new Guid("{C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}"), 100); /// /// Name: System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator @@ -3748,7 +3694,7 @@ public static partial class Ole32 /// FormatID: {BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}, 100 /// public static PROPERTYKEY LongitudeDenominator - => new PROPERTYKEY(new Guid("{BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}"), 100); + => new(new Guid("{BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}"), 100); /// /// Name: System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator @@ -3757,7 +3703,7 @@ public static partial class Ole32 /// FormatID: {02B0F689-A914-4E45-821D-1DDA452ED2C4}, 100 /// public static PROPERTYKEY LongitudeNumerator - => new PROPERTYKEY(new Guid("{02B0F689-A914-4E45-821D-1DDA452ED2C4}"), 100); + => new(new Guid("{02B0F689-A914-4E45-821D-1DDA452ED2C4}"), 100); /// /// Name: System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef @@ -3766,7 +3712,7 @@ public static partial class Ole32 /// FormatID: {33DCF22B-28D5-464C-8035-1EE9EFD25278}, 100 /// public static PROPERTYKEY LongitudeRef - => new PROPERTYKEY(new Guid("{33DCF22B-28D5-464C-8035-1EE9EFD25278}"), 100); + => new(new Guid("{33DCF22B-28D5-464C-8035-1EE9EFD25278}"), 100); /// /// Name: System.GPS.MapDatum -- PKEY_GPS_MapDatum @@ -3775,7 +3721,7 @@ public static partial class Ole32 /// FormatID: {2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}, 100 /// public static PROPERTYKEY MapDatum - => new PROPERTYKEY(new Guid("{2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}"), 100); + => new(new Guid("{2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}"), 100); /// /// Name: System.GPS.MeasureMode -- PKEY_GPS_MeasureMode @@ -3784,7 +3730,7 @@ public static partial class Ole32 /// FormatID: {A015ED5D-AAEA-4D58-8A86-3C586920EA0B}, 100 /// public static PROPERTYKEY MeasureMode - => new PROPERTYKEY(new Guid("{A015ED5D-AAEA-4D58-8A86-3C586920EA0B}"), 100); + => new(new Guid("{A015ED5D-AAEA-4D58-8A86-3C586920EA0B}"), 100); /// /// Name: System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod @@ -3793,7 +3739,7 @@ public static partial class Ole32 /// FormatID: {59D49E61-840F-4AA9-A939-E2099B7F6399}, 100 /// public static PROPERTYKEY ProcessingMethod - => new PROPERTYKEY(new Guid("{59D49E61-840F-4AA9-A939-E2099B7F6399}"), 100); + => new(new Guid("{59D49E61-840F-4AA9-A939-E2099B7F6399}"), 100); /// /// Name: System.GPS.Satellites -- PKEY_GPS_Satellites @@ -3802,18 +3748,16 @@ public static partial class Ole32 /// FormatID: {467EE575-1F25-4557-AD4E-B8B58B0D9C15}, 100 /// public static PROPERTYKEY Satellites - => new PROPERTYKEY(new Guid("{467EE575-1F25-4557-AD4E-B8B58B0D9C15}"), 100); + => new(new Guid("{467EE575-1F25-4557-AD4E-B8B58B0D9C15}"), 100); /// /// Name: System.GPS.Speed -- PKEY_GPS_Speed - /// - /// Description: Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and PKEY_GPS_SpeedDenominator. - /// + /// Description: Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and PKEY_GPS_SpeedDenominator. /// Type: Double -- VT_R8 /// FormatID: {DA5D0862-6E76-4E1B-BABD-70021BD25494}, 100 /// public static PROPERTYKEY Speed - => new PROPERTYKEY(new Guid("{DA5D0862-6E76-4E1B-BABD-70021BD25494}"), 100); + => new(new Guid("{DA5D0862-6E76-4E1B-BABD-70021BD25494}"), 100); /// /// Name: System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator @@ -3822,7 +3766,7 @@ public static partial class Ole32 /// FormatID: {7D122D5A-AE5E-4335-8841-D71E7CE72F53}, 100 /// public static PROPERTYKEY SpeedDenominator - => new PROPERTYKEY(new Guid("{7D122D5A-AE5E-4335-8841-D71E7CE72F53}"), 100); + => new(new Guid("{7D122D5A-AE5E-4335-8841-D71E7CE72F53}"), 100); /// /// Name: System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator @@ -3831,19 +3775,19 @@ public static partial class Ole32 /// FormatID: {ACC9CE3D-C213-4942-8B48-6D0820F21C6D}, 100 /// public static PROPERTYKEY SpeedNumerator - => new PROPERTYKEY(new Guid("{ACC9CE3D-C213-4942-8B48-6D0820F21C6D}"), 100); + => new(new Guid("{ACC9CE3D-C213-4942-8B48-6D0820F21C6D}"), 100); /// /// Name: System.GPS.SpeedRef -- PKEY_GPS_SpeedRef /// - /// Description: Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour, - /// miles per hour, knots). + /// Description: Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour, miles + /// per hour, knots). /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}, 100 /// public static PROPERTYKEY SpeedRef - => new PROPERTYKEY(new Guid("{ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}"), 100); + => new(new Guid("{ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}"), 100); /// /// Name: System.GPS.Status -- PKEY_GPS_Status @@ -3855,7 +3799,7 @@ public static partial class Ole32 /// FormatID: {125491F4-818F-46B2-91B5-D537753617B2}, 100 /// public static PROPERTYKEY Status - => new PROPERTYKEY(new Guid("{125491F4-818F-46B2-91B5-D537753617B2}"), 100); + => new(new Guid("{125491F4-818F-46B2-91B5-D537753617B2}"), 100); /// /// Name: System.GPS.Track -- PKEY_GPS_Track @@ -3866,7 +3810,7 @@ public static partial class Ole32 /// FormatID: {76C09943-7C33-49E3-9E7E-CDBA872CFADA}, 100 /// public static PROPERTYKEY Track - => new PROPERTYKEY(new Guid("{76C09943-7C33-49E3-9E7E-CDBA872CFADA}"), 100); + => new(new Guid("{76C09943-7C33-49E3-9E7E-CDBA872CFADA}"), 100); /// /// Name: System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator @@ -3875,7 +3819,7 @@ public static partial class Ole32 /// FormatID: {C8D1920C-01F6-40C0-AC86-2F3A4AD00770}, 100 /// public static PROPERTYKEY TrackDenominator - => new PROPERTYKEY(new Guid("{C8D1920C-01F6-40C0-AC86-2F3A4AD00770}"), 100); + => new(new Guid("{C8D1920C-01F6-40C0-AC86-2F3A4AD00770}"), 100); /// /// Name: System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator @@ -3884,7 +3828,7 @@ public static partial class Ole32 /// FormatID: {702926F4-44A6-43E1-AE71-45627116893B}, 100 /// public static PROPERTYKEY TrackNumerator - => new PROPERTYKEY(new Guid("{702926F4-44A6-43E1-AE71-45627116893B}"), 100); + => new(new Guid("{702926F4-44A6-43E1-AE71-45627116893B}"), 100); /// /// Name: System.GPS.TrackRef -- PKEY_GPS_TrackRef @@ -3895,7 +3839,7 @@ public static partial class Ole32 /// FormatID: {35DBE6FE-44C3-4400-AAAE-D2C799C407E8}, 100 /// public static PROPERTYKEY TrackRef - => new PROPERTYKEY(new Guid("{35DBE6FE-44C3-4400-AAAE-D2C799C407E8}"), 100); + => new(new Guid("{35DBE6FE-44C3-4400-AAAE-D2C799C407E8}"), 100); /// /// Name: System.GPS.VersionID -- PKEY_GPS_VersionID @@ -3904,7 +3848,7 @@ public static partial class Ole32 /// FormatID: {22704DA4-C6B2-4A99-8E56-F16DF8C92599}, 100 /// public static PROPERTYKEY VersionID - => new PROPERTYKEY(new Guid("{22704DA4-C6B2-4A99-8E56-F16DF8C92599}"), 100); + => new(new Guid("{22704DA4-C6B2-4A99-8E56-F16DF8C92599}"), 100); } /// Identity Properties @@ -3917,7 +3861,7 @@ public static partial class Ole32 /// FormatID: {8C3B93A4-BAED-1A83-9A32-102EE313F6EB}, 100 /// public static PROPERTYKEY Blob - => new PROPERTYKEY(new Guid("{8C3B93A4-BAED-1A83-9A32-102EE313F6EB}"), 100); + => new(new Guid("{8C3B93A4-BAED-1A83-9A32-102EE313F6EB}"), 100); /// /// Name: System.Identity.DisplayName -- PKEY_Identity_DisplayName @@ -3926,7 +3870,7 @@ public static partial class Ole32 /// FormatID: {7D683FC9-D155-45A8-BB1F-89D19BCB792F}, 100 /// public static PROPERTYKEY DisplayName - => new PROPERTYKEY(new Guid("{7D683FC9-D155-45A8-BB1F-89D19BCB792F}"), 100); + => new(new Guid("{7D683FC9-D155-45A8-BB1F-89D19BCB792F}"), 100); /// /// Name: System.Identity.IsMeIdentity -- PKEY_Identity_IsMeIdentity @@ -3935,7 +3879,7 @@ public static partial class Ole32 /// FormatID: {A4108708-09DF-4377-9DFC-6D99986D5A67}, 100 /// public static PROPERTYKEY IsMeIdentity - => new PROPERTYKEY(new Guid("{A4108708-09DF-4377-9DFC-6D99986D5A67}"), 100); + => new(new Guid("{A4108708-09DF-4377-9DFC-6D99986D5A67}"), 100); /// /// Name: System.Identity.PrimaryEmailAddress -- PKEY_Identity_PrimaryEmailAddress @@ -3944,7 +3888,7 @@ public static partial class Ole32 /// FormatID: {FCC16823-BAED-4F24-9B32-A0982117F7FA}, 100 /// public static PROPERTYKEY PrimaryEmailAddress - => new PROPERTYKEY(new Guid("{FCC16823-BAED-4F24-9B32-A0982117F7FA}"), 100); + => new(new Guid("{FCC16823-BAED-4F24-9B32-A0982117F7FA}"), 100); /// /// Name: System.Identity.ProviderID -- PKEY_Identity_ProviderID @@ -3953,7 +3897,7 @@ public static partial class Ole32 /// FormatID: {74A7DE49-FA11-4D3D-A006-DB7E08675916}, 100 /// public static PROPERTYKEY ProviderID - => new PROPERTYKEY(new Guid("{74A7DE49-FA11-4D3D-A006-DB7E08675916}"), 100); + => new(new Guid("{74A7DE49-FA11-4D3D-A006-DB7E08675916}"), 100); /// /// Name: System.Identity.UniqueID -- PKEY_Identity_UniqueID @@ -3962,7 +3906,7 @@ public static partial class Ole32 /// FormatID: {E55FC3B0-2B60-4220-918E-B21E8BF16016}, 100 /// public static PROPERTYKEY UniqueID - => new PROPERTYKEY(new Guid("{E55FC3B0-2B60-4220-918E-B21E8BF16016}"), 100); + => new(new Guid("{E55FC3B0-2B60-4220-918E-B21E8BF16016}"), 100); /// /// Name: System.Identity.UserName -- PKEY_Identity_UserName @@ -3971,7 +3915,7 @@ public static partial class Ole32 /// FormatID: {C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}, 100 /// public static PROPERTYKEY UserName - => new PROPERTYKEY(new Guid("{C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}"), 100); + => new(new Guid("{C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}"), 100); } /// IdentityProvider Properties @@ -3984,7 +3928,7 @@ public static partial class Ole32 /// FormatID: {B96EFF7B-35CA-4A35-8607-29E3A54C46EA}, 100 /// public static PROPERTYKEY Name - => new PROPERTYKEY(new Guid("{B96EFF7B-35CA-4A35-8607-29E3A54C46EA}"), 100); + => new(new Guid("{B96EFF7B-35CA-4A35-8607-29E3A54C46EA}"), 100); /// /// Name: System.IdentityProvider.Picture -- PKEY_IdentityProvider_Picture @@ -3993,7 +3937,7 @@ public static partial class Ole32 /// FormatID: {2425166F-5642-4864-992F-98FD98F294C3}, 100 /// public static PROPERTYKEY Picture - => new PROPERTYKEY(new Guid("{2425166F-5642-4864-992F-98FD98F294C3}"), 100); + => new(new Guid("{2425166F-5642-4864-992F-98FD98F294C3}"), 100); } /// Image Properties @@ -4006,7 +3950,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 7 (PIDISI_BITDEPTH) /// public static PROPERTYKEY BitDepth - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 7); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 7); /// /// Name: System.Image.ColorSpace -- PKEY_Image_ColorSpace @@ -4015,18 +3959,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 40961 /// public static PROPERTYKEY ColorSpace - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 40961); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 40961); /// /// Name: System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel - /// - /// Description: Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator. - /// + /// Description: Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator. /// Type: Double -- VT_R8 /// FormatID: {364B6FA9-37AB-482A-BE2B-AE02F60D4318}, 100 /// public static PROPERTYKEY CompressedBitsPerPixel - => new PROPERTYKEY(new Guid("{364B6FA9-37AB-482A-BE2B-AE02F60D4318}"), 100); + => new(new Guid("{364B6FA9-37AB-482A-BE2B-AE02F60D4318}"), 100); /// /// Name: System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator @@ -4035,7 +3977,7 @@ public static partial class Ole32 /// FormatID: {1F8844E1-24AD-4508-9DFD-5326A415CE02}, 100 /// public static PROPERTYKEY CompressedBitsPerPixelDenominator - => new PROPERTYKEY(new Guid("{1F8844E1-24AD-4508-9DFD-5326A415CE02}"), 100); + => new(new Guid("{1F8844E1-24AD-4508-9DFD-5326A415CE02}"), 100); /// /// Name: System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator @@ -4044,7 +3986,7 @@ public static partial class Ole32 /// FormatID: {D21A7148-D32C-4624-8900-277210F79C0F}, 100 /// public static PROPERTYKEY CompressedBitsPerPixelNumerator - => new PROPERTYKEY(new Guid("{D21A7148-D32C-4624-8900-277210F79C0F}"), 100); + => new(new Guid("{D21A7148-D32C-4624-8900-277210F79C0F}"), 100); /// /// Name: System.Image.Compression -- PKEY_Image_Compression @@ -4053,18 +3995,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 259 /// public static PROPERTYKEY Compression - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 259); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 259); /// /// Name: System.Image.CompressionText -- PKEY_Image_CompressionText - /// - /// Description: This is the user-friendly form of System.Image.Compression. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Image.Compression. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {3F08E66F-2F44-4BB9-A682-AC35D2562322}, 100 /// public static PROPERTYKEY CompressionText - => new PROPERTYKEY(new Guid("{3F08E66F-2F44-4BB9-A682-AC35D2562322}"), 100); + => new(new Guid("{3F08E66F-2F44-4BB9-A682-AC35D2562322}"), 100); /// /// Name: System.Image.Dimensions -- PKEY_Image_Dimensions @@ -4073,7 +4013,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 13 (PIDISI_DIMENSIONS) /// public static PROPERTYKEY Dimensions - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 13); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 13); /// /// Name: System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution @@ -4082,7 +4022,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 5 (PIDISI_RESOLUTIONX) /// public static PROPERTYKEY HorizontalResolution - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 5); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 5); /// /// Name: System.Image.HorizontalSize -- PKEY_Image_HorizontalSize @@ -4091,7 +4031,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 3 (PIDISI_CX) /// public static PROPERTYKEY HorizontalSize - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 3); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 3); /// /// Name: System.Image.ImageID -- PKEY_Image_ImageID @@ -4100,7 +4040,7 @@ public static partial class Ole32 /// FormatID: {10DABE05-32AA-4C29-BF1A-63E2D220587F}, 100 /// public static PROPERTYKEY ImageID - => new PROPERTYKEY(new Guid("{10DABE05-32AA-4C29-BF1A-63E2D220587F}"), 100); + => new(new Guid("{10DABE05-32AA-4C29-BF1A-63E2D220587F}"), 100); /// /// Name: System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit @@ -4109,7 +4049,7 @@ public static partial class Ole32 /// FormatID: {19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}, 100 /// public static PROPERTYKEY ResolutionUnit - => new PROPERTYKEY(new Guid("{19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}"), 100); + => new(new Guid("{19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}"), 100); /// /// Name: System.Image.VerticalResolution -- PKEY_Image_VerticalResolution @@ -4118,7 +4058,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 6 (PIDISI_RESOLUTIONY) /// public static PROPERTYKEY VerticalResolution - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 6); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 6); /// /// Name: System.Image.VerticalSize -- PKEY_Image_VerticalSize @@ -4127,7 +4067,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 4 (PIDISI_CY) /// public static PROPERTYKEY VerticalSize - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 4); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 4); } /// Journal Properties @@ -4140,7 +4080,7 @@ public static partial class Ole32 /// FormatID: {DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}, 100 /// public static PROPERTYKEY Contacts - => new PROPERTYKEY(new Guid("{DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}"), 100); + => new(new Guid("{DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}"), 100); /// /// Name: System.Journal.EntryType -- PKEY_Journal_EntryType @@ -4149,7 +4089,7 @@ public static partial class Ole32 /// FormatID: {95BEB1FC-326D-4644-B396-CD3ED90E6DDF}, 100 /// public static PROPERTYKEY EntryType - => new PROPERTYKEY(new Guid("{95BEB1FC-326D-4644-B396-CD3ED90E6DDF}"), 100); + => new(new Guid("{95BEB1FC-326D-4644-B396-CD3ED90E6DDF}"), 100); } /// LayoutPattern Properties @@ -4165,7 +4105,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 500 /// public static PROPERTYKEY ContentViewModeForBrowse - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 500); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 500); /// /// Name: System.LayoutPattern.ContentViewModeForSearch -- PKEY_LayoutPattern_ContentViewModeForSearch @@ -4177,7 +4117,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 501 /// public static PROPERTYKEY ContentViewModeForSearch - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 501); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 501); } /// Link Properties @@ -4190,7 +4130,7 @@ public static partial class Ole32 /// FormatID: {436F2667-14E2-4FEB-B30A-146C53B5B674}, 100 /// public static PROPERTYKEY Arguments - => new PROPERTYKEY(new Guid("{436F2667-14E2-4FEB-B30A-146C53B5B674}"), 100); + => new(new Guid("{436F2667-14E2-4FEB-B30A-146C53B5B674}"), 100); /// /// Name: System.Link.Comment -- PKEY_Link_Comment @@ -4199,7 +4139,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 5 /// public static PROPERTYKEY Comment - => new PROPERTYKEY(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 5); + => new(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 5); /// /// Name: System.Link.DateVisited -- PKEY_Link_DateVisited @@ -4208,7 +4148,7 @@ public static partial class Ole32 /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 23 (PKEYs relating to URLs. Used by IE History.) /// public static PROPERTYKEY DateVisited - => new PROPERTYKEY(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 23); + => new(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 23); /// /// Name: System.Link.Description -- PKEY_Link_Description @@ -4217,7 +4157,7 @@ public static partial class Ole32 /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 21 (PKEYs relating to URLs. Used by IE History.) /// public static PROPERTYKEY Description - => new PROPERTYKEY(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 21); + => new(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 21); /// /// Name: System.Link.Status -- PKEY_Link_Status @@ -4226,7 +4166,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 3 (PID_LINK_TARGET_TYPE) /// public static PROPERTYKEY Status - => new PROPERTYKEY(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 3); + => new(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 3); /// /// Name: System.Link.TargetExtension -- PKEY_Link_TargetExtension @@ -4235,20 +4175,20 @@ public static partial class Ole32 /// FormatID: {7A7D76F4-B630-4BD7-95FF-37CC51A975C9}, 2 /// public static PROPERTYKEY TargetExtension - => new PROPERTYKEY(new Guid("{7A7D76F4-B630-4BD7-95FF-37CC51A975C9}"), 2); + => new(new Guid("{7A7D76F4-B630-4BD7-95FF-37CC51A975C9}"), 2); /// /// Name: System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath /// /// Description: This is the shell namespace path to the target of the link item. This path may be passed to - /// SHParseDisplayName to parse the path to the correct shell folder. If the target item is a file, the value is - /// identical to System.ItemPathDisplay. If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY. + /// SHParseDisplayName to parse the path to the correct shell folder. If the target item is a file, the value is identical to + /// System.ItemPathDisplay. If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 2 (PID_LINK_TARGET) /// public static PROPERTYKEY TargetParsingPath - => new PROPERTYKEY(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 2); + => new(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 2); /// /// Name: System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags @@ -4259,7 +4199,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 8 /// public static PROPERTYKEY TargetSFGAOFlags - => new PROPERTYKEY(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 8); + => new(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 8); /// /// Name: System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings @@ -4271,7 +4211,7 @@ public static partial class Ole32 /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 3 /// public static PROPERTYKEY TargetSFGAOFlagsStrings - => new PROPERTYKEY(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 3); + => new(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 3); /// /// Name: System.Link.TargetUrl -- PKEY_Link_TargetUrl @@ -4280,7 +4220,7 @@ public static partial class Ole32 /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 2 (PKEYs relating to URLs. Used by IE History.) /// public static PROPERTYKEY TargetUrl - => new PROPERTYKEY(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 2); + => new(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 2); } /// Media Properties @@ -4293,7 +4233,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 32 (PIDMSI_AUTHOR_URL) /// public static PROPERTYKEY AuthorUrl - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 32); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 32); /// /// Name: System.Media.AverageLevel -- PKEY_Media_AverageLevel @@ -4302,62 +4242,52 @@ public static partial class Ole32 /// FormatID: {09EDD5B6-B301-43C5-9990-D00302EFFD46}, 100 /// public static PROPERTYKEY AverageLevel - => new PROPERTYKEY(new Guid("{09EDD5B6-B301-43C5-9990-D00302EFFD46}"), 100); + => new(new Guid("{09EDD5B6-B301-43C5-9990-D00302EFFD46}"), 100); /// /// Name: System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 13 (PIDMSI_CLASS_PRIMARY_ID) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 13 (PIDMSI_CLASS_PRIMARY_ID) /// public static PROPERTYKEY ClassPrimaryID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 13); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 13); /// /// Name: System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 14 (PIDMSI_CLASS_SECONDARY_ID) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 14 (PIDMSI_CLASS_SECONDARY_ID) /// public static PROPERTYKEY ClassSecondaryID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 14); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 14); /// /// Name: System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 24 (PIDMSI_COLLECTION_GROUP_ID) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 24 (PIDMSI_COLLECTION_GROUP_ID) /// public static PROPERTYKEY CollectionGroupID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 24); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 24); /// /// Name: System.Media.CollectionID -- PKEY_Media_CollectionID /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 25 (PIDMSI_COLLECTION_ID) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 25 (PIDMSI_COLLECTION_ID) /// public static PROPERTYKEY CollectionID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 25); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 25); /// /// Name: System.Media.ContentDistributor -- PKEY_Media_ContentDistributor /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 18 (PIDMSI_CONTENTDISTRIBUTOR) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 18 (PIDMSI_CONTENTDISTRIBUTOR) /// public static PROPERTYKEY ContentDistributor - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 18); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 18); /// /// Name: System.Media.ContentID -- PKEY_Media_ContentID @@ -4366,7 +4296,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 26 (PIDMSI_CONTENT_ID) /// public static PROPERTYKEY ContentID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 26); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 26); /// /// Name: System.Media.CreatorApplication -- PKEY_Media_CreatorApplication @@ -4375,18 +4305,16 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 27 (PIDMSI_TOOL_NAME) /// public static PROPERTYKEY CreatorApplication - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 27); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 27); /// /// Name: System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 28 (PIDMSI_TOOL_VERSION) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 28 (PIDMSI_TOOL_VERSION) /// public static PROPERTYKEY CreatorApplicationVersion - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 28); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 28); /// /// Name: System.Media.DateEncoded -- PKEY_Media_DateEncoded @@ -4395,7 +4323,7 @@ public static partial class Ole32 /// FormatID: {2E4B640D-5019-46D8-8881-55414CC5CAA0}, 100 /// public static PROPERTYKEY DateEncoded - => new PROPERTYKEY(new Guid("{2E4B640D-5019-46D8-8881-55414CC5CAA0}"), 100); + => new(new Guid("{2E4B640D-5019-46D8-8881-55414CC5CAA0}"), 100); /// /// Name: System.Media.DateReleased -- PKEY_Media_DateReleased @@ -4404,7 +4332,7 @@ public static partial class Ole32 /// FormatID: {DE41CC29-6971-4290-B472-F59F2E2F31E2}, 100 /// public static PROPERTYKEY DateReleased - => new PROPERTYKEY(new Guid("{DE41CC29-6971-4290-B472-F59F2E2F31E2}"), 100); + => new(new Guid("{DE41CC29-6971-4290-B472-F59F2E2F31E2}"), 100); /// /// Name: System.Media.Duration -- PKEY_Media_Duration @@ -4413,7 +4341,7 @@ public static partial class Ole32 /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 3 (PIDASI_TIMELENGTH) /// public static PROPERTYKEY Duration - => new PROPERTYKEY(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 3); + => new(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 3); /// /// Name: System.Media.DVDID -- PKEY_Media_DVDID @@ -4422,7 +4350,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 15 (PIDMSI_DVDID) /// public static PROPERTYKEY DVDID - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 15); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 15); /// /// Name: System.Media.EncodedBy -- PKEY_Media_EncodedBy @@ -4431,18 +4359,16 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 36 (PIDMSI_ENCODED_BY) /// public static PROPERTYKEY EncodedBy - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 36); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 36); /// /// Name: System.Media.EncodingSettings -- PKEY_Media_EncodingSettings /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 37 (PIDMSI_ENCODING_SETTINGS) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 37 (PIDMSI_ENCODING_SETTINGS) /// public static PROPERTYKEY EncodingSettings - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 37); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 37); /// /// Name: System.Media.FrameCount -- PKEY_Media_FrameCount @@ -4451,7 +4377,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 12 (PIDISI_FRAMECOUNT) /// public static PROPERTYKEY FrameCount - => new PROPERTYKEY(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 12); + => new(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 12); /// /// Name: System.Media.MCDI -- PKEY_Media_MCDI @@ -4460,7 +4386,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 16 (PIDMSI_MCDI) /// public static PROPERTYKEY MCDI - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 16); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 16); /// /// Name: System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider @@ -4469,7 +4395,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 17 (PIDMSI_PROVIDER) /// public static PROPERTYKEY MetadataContentProvider - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 17); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 17); /// /// Name: System.Media.Producer -- PKEY_Media_Producer @@ -4478,18 +4404,16 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 22 (PIDMSI_PRODUCER) /// public static PROPERTYKEY Producer - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 22); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 22); /// /// Name: System.Media.PromotionUrl -- PKEY_Media_PromotionUrl /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 33 (PIDMSI_PROMOTION_URL) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 33 (PIDMSI_PROMOTION_URL) /// public static PROPERTYKEY PromotionUrl - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 33); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 33); /// /// Name: System.Media.ProtectionType -- PKEY_Media_ProtectionType @@ -4498,7 +4422,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 38 /// public static PROPERTYKEY ProtectionType - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 38); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 38); /// /// Name: System.Media.ProviderRating -- PKEY_Media_ProviderRating @@ -4507,7 +4431,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 39 /// public static PROPERTYKEY ProviderRating - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 39); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 39); /// /// Name: System.Media.ProviderStyle -- PKEY_Media_ProviderStyle @@ -4516,7 +4440,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 40 /// public static PROPERTYKEY ProviderStyle - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 40); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 40); /// /// Name: System.Media.Publisher -- PKEY_Media_Publisher @@ -4525,7 +4449,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 30 (PIDMSI_PUBLISHER) /// public static PROPERTYKEY Publisher - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 30); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 30); /// /// Name: System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId @@ -4534,7 +4458,7 @@ public static partial class Ole32 /// FormatID: {9AEBAE7A-9644-487D-A92C-657585ED751A}, 100 /// public static PROPERTYKEY SubscriptionContentId - => new PROPERTYKEY(new Guid("{9AEBAE7A-9644-487D-A92C-657585ED751A}"), 100); + => new(new Guid("{9AEBAE7A-9644-487D-A92C-657585ED751A}"), 100); /// /// Name: System.Media.SubTitle -- PKEY_Media_SubTitle @@ -4543,18 +4467,16 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 38 (PIDSI_MUSIC_SUB_TITLE) /// public static PROPERTYKEY SubTitle - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 38); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 38); /// /// Name: System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER) /// public static PROPERTYKEY UniqueFileIdentifier - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 35); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 35); /// /// Name: System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo @@ -4563,18 +4485,16 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 41 /// public static PROPERTYKEY UserNoAutoInfo - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 41); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 41); /// /// Name: System.Media.UserWebUrl -- PKEY_Media_UserWebUrl /// Description: /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 34 (PIDMSI_USER_WEB_URL) - /// + /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 34 (PIDMSI_USER_WEB_URL) /// public static PROPERTYKEY UserWebUrl - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 34); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 34); /// /// Name: System.Media.Writer -- PKEY_Media_Writer @@ -4583,7 +4503,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 23 (PIDMSI_WRITER) /// public static PROPERTYKEY Writer - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 23); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 23); /// /// Name: System.Media.Year -- PKEY_Media_Year @@ -4592,7 +4512,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 5 (PIDSI_MUSIC_YEAR) /// public static PROPERTYKEY Year - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 5); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 5); } /// Message Properties @@ -4605,7 +4525,7 @@ public static partial class Ole32 /// FormatID: {3143BF7C-80A8-4854-8880-E2E40189BDD0}, 100 /// public static PROPERTYKEY AttachmentContents - => new PROPERTYKEY(new Guid("{3143BF7C-80A8-4854-8880-E2E40189BDD0}"), 100); + => new(new Guid("{3143BF7C-80A8-4854-8880-E2E40189BDD0}"), 100); /// /// Name: System.Message.AttachmentNames -- PKEY_Message_AttachmentNames @@ -4614,7 +4534,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 21 /// public static PROPERTYKEY AttachmentNames - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 21); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 21); /// /// Name: System.Message.BccAddress -- PKEY_Message_BccAddress @@ -4623,7 +4543,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 2 /// public static PROPERTYKEY BccAddress - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 2); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 2); /// /// Name: System.Message.BccName -- PKEY_Message_BccName @@ -4632,7 +4552,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 3 /// public static PROPERTYKEY BccName - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 3); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 3); /// /// Name: System.Message.CcAddress -- PKEY_Message_CcAddress @@ -4641,7 +4561,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 4 /// public static PROPERTYKEY CcAddress - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 4); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 4); /// /// Name: System.Message.CcName -- PKEY_Message_CcName @@ -4650,7 +4570,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 5 /// public static PROPERTYKEY CcName - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 5); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 5); /// /// Name: System.Message.ConversationID -- PKEY_Message_ConversationID @@ -4659,7 +4579,7 @@ public static partial class Ole32 /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 100 /// public static PROPERTYKEY ConversationID - => new PROPERTYKEY(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 100); + => new(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 100); /// /// Name: System.Message.ConversationIndex -- PKEY_Message_ConversationIndex @@ -4668,7 +4588,7 @@ public static partial class Ole32 /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 101 /// public static PROPERTYKEY ConversationIndex - => new PROPERTYKEY(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 101); + => new(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 101); /// /// Name: System.Message.DateReceived -- PKEY_Message_DateReceived @@ -4677,7 +4597,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 20 /// public static PROPERTYKEY DateReceived - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 20); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 20); /// /// Name: System.Message.DateSent -- PKEY_Message_DateSent @@ -4686,19 +4606,19 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 19 /// public static PROPERTYKEY DateSent - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 19); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 19); /// /// Name: System.Message.Flags -- PKEY_Message_Flags /// - /// Description: These are flags associated with email messages to know if a read receipt is pending, etc. The values - /// stored here by Outlook are defined for PR_MESSAGE_FLAGS on MSDN. + /// Description: These are flags associated with email messages to know if a read receipt is pending, etc. The values stored + /// here by Outlook are defined for PR_MESSAGE_FLAGS on MSDN. /// /// Type: Int32 -- VT_I4 /// FormatID: {A82D9EE7-CA67-4312-965E-226BCEA85023}, 100 /// public static PROPERTYKEY Flags - => new PROPERTYKEY(new Guid("{A82D9EE7-CA67-4312-965E-226BCEA85023}"), 100); + => new(new Guid("{A82D9EE7-CA67-4312-965E-226BCEA85023}"), 100); /// /// Name: System.Message.FromAddress -- PKEY_Message_FromAddress @@ -4707,7 +4627,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 13 /// public static PROPERTYKEY FromAddress - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 13); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 13); /// /// Name: System.Message.FromName -- PKEY_Message_FromName @@ -4716,7 +4636,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 14 /// public static PROPERTYKEY FromName - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 14); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 14); /// /// Name: System.Message.HasAttachments -- PKEY_Message_HasAttachments @@ -4725,7 +4645,7 @@ public static partial class Ole32 /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 8 /// public static PROPERTYKEY HasAttachments - => new PROPERTYKEY(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 8); + => new(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 8); /// /// Name: System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply @@ -4734,7 +4654,7 @@ public static partial class Ole32 /// FormatID: {9A9BC088-4F6D-469E-9919-E705412040F9}, 100 /// public static PROPERTYKEY IsFwdOrReply - => new PROPERTYKEY(new Guid("{9A9BC088-4F6D-469E-9919-E705412040F9}"), 100); + => new(new Guid("{9A9BC088-4F6D-469E-9919-E705412040F9}"), 100); /// /// Name: System.Message.MessageClass -- PKEY_Message_MessageClass @@ -4743,7 +4663,7 @@ public static partial class Ole32 /// FormatID: {CD9ED458-08CE-418F-A70E-F912C7BB9C5C}, 103 /// public static PROPERTYKEY MessageClass - => new PROPERTYKEY(new Guid("{CD9ED458-08CE-418F-A70E-F912C7BB9C5C}"), 103); + => new(new Guid("{CD9ED458-08CE-418F-A70E-F912C7BB9C5C}"), 103); /// /// Name: System.Message.ProofInProgress -- PKEY_Message_ProofInProgress @@ -4752,7 +4672,7 @@ public static partial class Ole32 /// FormatID: {9098F33C-9A7D-48A8-8DE5-2E1227A64E91}, 100 /// public static PROPERTYKEY ProofInProgress - => new PROPERTYKEY(new Guid("{9098F33C-9A7D-48A8-8DE5-2E1227A64E91}"), 100); + => new(new Guid("{9098F33C-9A7D-48A8-8DE5-2E1227A64E91}"), 100); /// /// Name: System.Message.SenderAddress -- PKEY_Message_SenderAddress @@ -4761,7 +4681,7 @@ public static partial class Ole32 /// FormatID: {0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}, 100 /// public static PROPERTYKEY SenderAddress - => new PROPERTYKEY(new Guid("{0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}"), 100); + => new(new Guid("{0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}"), 100); /// /// Name: System.Message.SenderName -- PKEY_Message_SenderName @@ -4770,7 +4690,7 @@ public static partial class Ole32 /// FormatID: {0DA41CFA-D224-4A18-AE2F-596158DB4B3A}, 100 /// public static PROPERTYKEY SenderName - => new PROPERTYKEY(new Guid("{0DA41CFA-D224-4A18-AE2F-596158DB4B3A}"), 100); + => new(new Guid("{0DA41CFA-D224-4A18-AE2F-596158DB4B3A}"), 100); /// /// Name: System.Message.Store -- PKEY_Message_Store @@ -4779,7 +4699,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 15 /// public static PROPERTYKEY Store - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 15); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 15); /// /// Name: System.Message.ToAddress -- PKEY_Message_ToAddress @@ -4788,18 +4708,16 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 16 /// public static PROPERTYKEY ToAddress - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 16); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 16); /// /// Name: System.Message.ToDoFlags -- PKEY_Message_ToDoFlags - /// - /// Description: Flags associated with a message flagged to know if it's still active, if it was custom flagged, etc. - /// + /// Description: Flags associated with a message flagged to know if it's still active, if it was custom flagged, etc. /// Type: Int32 -- VT_I4 /// FormatID: {1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}, 100 /// public static PROPERTYKEY ToDoFlags - => new PROPERTYKEY(new Guid("{1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}"), 100); + => new(new Guid("{1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}"), 100); /// /// Name: System.Message.ToDoTitle -- PKEY_Message_ToDoTitle @@ -4808,7 +4726,7 @@ public static partial class Ole32 /// FormatID: {BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}, 100 /// public static PROPERTYKEY ToDoTitle - => new PROPERTYKEY(new Guid("{BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}"), 100); + => new(new Guid("{BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}"), 100); /// /// Name: System.Message.ToName -- PKEY_Message_ToName @@ -4817,7 +4735,7 @@ public static partial class Ole32 /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 17 /// public static PROPERTYKEY ToName - => new PROPERTYKEY(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 17); + => new(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 17); } /// Music Properties @@ -4830,19 +4748,19 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 13 (PIDSI_MUSIC_ALBUM_ARTIST) /// public static PROPERTYKEY AlbumArtist - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 13); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 13); /// /// Name: System.Music.AlbumID -- PKEY_Music_AlbumID /// - /// Description: Concatenation of System.Music.AlbumArtist and System.Music.AlbumTitle, suitable for indexing and - /// display. Used to differentiate albums with the same title from different artists. + /// Description: Concatenation of System.Music.AlbumArtist and System.Music.AlbumTitle, suitable for indexing and display. + /// Used to differentiate albums with the same title from different artists. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 100 /// public static PROPERTYKEY AlbumID - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 100); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 100); /// /// Name: System.Music.AlbumTitle -- PKEY_Music_AlbumTitle @@ -4851,7 +4769,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 4 (PIDSI_MUSIC_ALBUM) /// public static PROPERTYKEY AlbumTitle - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 4); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 4); /// /// Name: System.Music.Artist -- PKEY_Music_Artist @@ -4860,7 +4778,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 2 (PIDSI_MUSIC_ARTIST) /// public static PROPERTYKEY Artist - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 2); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 2); /// /// Name: System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute @@ -4869,7 +4787,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE) /// public static PROPERTYKEY BeatsPerMinute - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 35); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 35); /// /// Name: System.Music.Composer -- PKEY_Music_Composer @@ -4878,7 +4796,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 19 (PIDMSI_COMPOSER) /// public static PROPERTYKEY Composer - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 19); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 19); /// /// Name: System.Music.Conductor -- PKEY_Music_Conductor @@ -4887,7 +4805,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 36 (PIDSI_MUSIC_CONDUCTOR) /// public static PROPERTYKEY Conductor - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 36); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 36); /// /// Name: System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription @@ -4896,19 +4814,19 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION) /// public static PROPERTYKEY ContentGroupDescription - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 33); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 33); /// /// Name: System.Music.DisplayArtist -- PKEY_Music_DisplayArtist /// - /// Description: This property returns the best representation of Album Artist for a given music file based upon - /// AlbumArtist, ContributingArtist and compilation info. + /// Description: This property returns the best representation of Album Artist for a given music file based upon AlbumArtist, + /// ContributingArtist and compilation info. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {FD122953-FA93-4EF7-92C3-04C946B2F7C8}, 100 /// public static PROPERTYKEY DisplayArtist - => new PROPERTYKEY(new Guid("{FD122953-FA93-4EF7-92C3-04C946B2F7C8}"), 100); + => new(new Guid("{FD122953-FA93-4EF7-92C3-04C946B2F7C8}"), 100); /// /// Name: System.Music.Genre -- PKEY_Music_Genre @@ -4917,7 +4835,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 11 (PIDSI_MUSIC_GENRE) /// public static PROPERTYKEY Genre - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 11); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 11); /// /// Name: System.Music.InitialKey -- PKEY_Music_InitialKey @@ -4926,7 +4844,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 34 (PIDSI_MUSIC_INITIAL_KEY) /// public static PROPERTYKEY InitialKey - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 34); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 34); /// /// Name: System.Music.IsCompilation -- PKEY_Music_IsCompilation @@ -4935,7 +4853,7 @@ public static partial class Ole32 /// FormatID: {C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}, 100 /// public static PROPERTYKEY IsCompilation - => new PROPERTYKEY(new Guid("{C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}"), 100); + => new(new Guid("{C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}"), 100); /// /// Name: System.Music.Lyrics -- PKEY_Music_Lyrics @@ -4944,7 +4862,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 12 (PIDSI_MUSIC_LYRICS) /// public static PROPERTYKEY Lyrics - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 12); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 12); /// /// Name: System.Music.Mood -- PKEY_Music_Mood @@ -4953,7 +4871,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 39 (PIDSI_MUSIC_MOOD) /// public static PROPERTYKEY Mood - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 39); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 39); /// /// Name: System.Music.PartOfSet -- PKEY_Music_PartOfSet @@ -4962,7 +4880,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 37 (PIDSI_MUSIC_PART_OF_SET) /// public static PROPERTYKEY PartOfSet - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 37); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 37); /// /// Name: System.Music.Period -- PKEY_Music_Period @@ -4971,7 +4889,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 31 (PIDMSI_PERIOD) /// public static PROPERTYKEY Period - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 31); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 31); /// /// Name: System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics @@ -4980,7 +4898,7 @@ public static partial class Ole32 /// FormatID: {6B223B6A-162E-4AA9-B39F-05D678FC6D77}, 100 /// public static PROPERTYKEY SynchronizedLyrics - => new PROPERTYKEY(new Guid("{6B223B6A-162E-4AA9-B39F-05D678FC6D77}"), 100); + => new(new Guid("{6B223B6A-162E-4AA9-B39F-05D678FC6D77}"), 100); /// /// Name: System.Music.TrackNumber -- PKEY_Music_TrackNumber @@ -4989,7 +4907,7 @@ public static partial class Ole32 /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 7 (PIDSI_MUSIC_TRACK) /// public static PROPERTYKEY TrackNumber - => new PROPERTYKEY(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 7); + => new(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 7); } /// Note Properties @@ -5002,18 +4920,16 @@ public static partial class Ole32 /// FormatID: {4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}, 100 /// public static PROPERTYKEY Color - => new PROPERTYKEY(new Guid("{4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}"), 100); + => new(new Guid("{4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}"), 100); /// /// Name: System.Note.ColorText -- PKEY_Note_ColorText - /// - /// Description: This is the user-friendly form of System.Note.Color. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Note.Color. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {46B4E8DE-CDB2-440D-885C-1658EB65B914}, 100 /// public static PROPERTYKEY ColorText - => new PROPERTYKEY(new Guid("{46B4E8DE-CDB2-440D-885C-1658EB65B914}"), 100); + => new(new Guid("{46B4E8DE-CDB2-440D-885C-1658EB65B914}"), 100); } /// Photo Properties @@ -5021,14 +4937,12 @@ public static partial class Ole32 { /// /// Name: System.Photo.Aperture -- PKEY_Photo_Aperture - /// - /// Description: PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator - /// + /// Description: PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37378 /// public static PROPERTYKEY Aperture - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37378); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37378); /// /// Name: System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator @@ -5037,7 +4951,7 @@ public static partial class Ole32 /// FormatID: {E1A9A38B-6685-46BD-875E-570DC7AD7320}, 100 /// public static PROPERTYKEY ApertureDenominator - => new PROPERTYKEY(new Guid("{E1A9A38B-6685-46BD-875E-570DC7AD7320}"), 100); + => new(new Guid("{E1A9A38B-6685-46BD-875E-570DC7AD7320}"), 100); /// /// Name: System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator @@ -5046,20 +4960,20 @@ public static partial class Ole32 /// FormatID: {0337ECEC-39FB-4581-A0BD-4C4CC51E9914}, 100 /// public static PROPERTYKEY ApertureNumerator - => new PROPERTYKEY(new Guid("{0337ECEC-39FB-4581-A0BD-4C4CC51E9914}"), 100); + => new(new Guid("{0337ECEC-39FB-4581-A0BD-4C4CC51E9914}"), 100); /// /// Name: System.Photo.Brightness -- PKEY_Photo_Brightness /// /// Description: This is the brightness of the photo. Calculated from PKEY_Photo_BrightnessNumerator and - /// PKEY_Photo_BrightnessDenominator. The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of - /// the recorded value is FFFFFFFF.H, "Unknown" should be indicated. + /// PKEY_Photo_BrightnessDenominator. The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of the + /// recorded value is FFFFFFFF.H, "Unknown" should be indicated. /// /// Type: Double -- VT_R8 /// FormatID: {1A701BF6-478C-4361-83AB-3701BB053C58}, 100 (PropertyTagExifBrightness) /// public static PROPERTYKEY Brightness - => new PROPERTYKEY(new Guid("{1A701BF6-478C-4361-83AB-3701BB053C58}"), 100); + => new(new Guid("{1A701BF6-478C-4361-83AB-3701BB053C58}"), 100); /// /// Name: System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator @@ -5068,7 +4982,7 @@ public static partial class Ole32 /// FormatID: {6EBE6946-2321-440A-90F0-C043EFD32476}, 100 /// public static PROPERTYKEY BrightnessDenominator - => new PROPERTYKEY(new Guid("{6EBE6946-2321-440A-90F0-C043EFD32476}"), 100); + => new(new Guid("{6EBE6946-2321-440A-90F0-C043EFD32476}"), 100); /// /// Name: System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator @@ -5077,7 +4991,7 @@ public static partial class Ole32 /// FormatID: {9E7D118F-B314-45A0-8CFB-D654B917C9E9}, 100 /// public static PROPERTYKEY BrightnessNumerator - => new PROPERTYKEY(new Guid("{9E7D118F-B314-45A0-8CFB-D654B917C9E9}"), 100); + => new(new Guid("{9E7D118F-B314-45A0-8CFB-D654B917C9E9}"), 100); /// /// Name: System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer @@ -5086,7 +5000,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 271 (PropertyTagEquipMake) /// public static PROPERTYKEY CameraManufacturer - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 271); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 271); /// /// Name: System.Photo.CameraModel -- PKEY_Photo_CameraModel @@ -5095,7 +5009,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 272 (PropertyTagEquipModel) /// public static PROPERTYKEY CameraModel - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 272); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 272); /// /// Name: System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber @@ -5104,29 +5018,25 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 273 /// public static PROPERTYKEY CameraSerialNumber - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 273); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 273); /// /// Name: System.Photo.Contrast -- PKEY_Photo_Contrast - /// - /// Description: This indicates the direction of contrast processing applied by the camera when the image was shot. - /// + /// Description: This indicates the direction of contrast processing applied by the camera when the image was shot. /// Type: UInt32 -- VT_UI4 /// FormatID: {2A785BA9-8D23-4DED-82E6-60A350C86A10}, 100 /// public static PROPERTYKEY Contrast - => new PROPERTYKEY(new Guid("{2A785BA9-8D23-4DED-82E6-60A350C86A10}"), 100); + => new(new Guid("{2A785BA9-8D23-4DED-82E6-60A350C86A10}"), 100); /// /// Name: System.Photo.ContrastText -- PKEY_Photo_ContrastText - /// - /// Description: This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {59DDE9F2-5253-40EA-9A8B-479E96C6249A}, 100 /// public static PROPERTYKEY ContrastText - => new PROPERTYKEY(new Guid("{59DDE9F2-5253-40EA-9A8B-479E96C6249A}"), 100); + => new(new Guid("{59DDE9F2-5253-40EA-9A8B-479E96C6249A}"), 100); /// /// Name: System.Photo.DateTaken -- PKEY_Photo_DateTaken @@ -5135,18 +5045,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 36867 /// public static PROPERTYKEY DateTaken - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 36867); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 36867); /// /// Name: System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom - /// - /// Description: PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator - /// + /// Description: PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator /// Type: Double -- VT_R8 /// FormatID: {F85BF840-A925-4BC2-B0C4-8E36B598679E}, 100 /// public static PROPERTYKEY DigitalZoom - => new PROPERTYKEY(new Guid("{F85BF840-A925-4BC2-B0C4-8E36B598679E}"), 100); + => new(new Guid("{F85BF840-A925-4BC2-B0C4-8E36B598679E}"), 100); /// /// Name: System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator @@ -5155,7 +5063,7 @@ public static partial class Ole32 /// FormatID: {745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}, 100 /// public static PROPERTYKEY DigitalZoomDenominator - => new PROPERTYKEY(new Guid("{745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}"), 100); + => new(new Guid("{745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}"), 100); /// /// Name: System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator @@ -5164,7 +5072,7 @@ public static partial class Ole32 /// FormatID: {16CBB924-6500-473B-A5BE-F1599BCBE413}, 100 /// public static PROPERTYKEY DigitalZoomNumerator - => new PROPERTYKEY(new Guid("{16CBB924-6500-473B-A5BE-F1599BCBE413}"), 100); + => new(new Guid("{16CBB924-6500-473B-A5BE-F1599BCBE413}"), 100); /// /// Name: System.Photo.Event -- PKEY_Photo_Event @@ -5173,7 +5081,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18248 /// public static PROPERTYKEY Event - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18248); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18248); /// /// Name: System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion @@ -5182,18 +5090,16 @@ public static partial class Ole32 /// FormatID: {D35F743A-EB2E-47F2-A286-844132CB1427}, 100 /// public static PROPERTYKEY EXIFVersion - => new PROPERTYKEY(new Guid("{D35F743A-EB2E-47F2-A286-844132CB1427}"), 100); + => new(new Guid("{D35F743A-EB2E-47F2-A286-844132CB1427}"), 100); /// /// Name: System.Photo.ExposureBias -- PKEY_Photo_ExposureBias - /// - /// Description: PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator - /// + /// Description: PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37380 /// public static PROPERTYKEY ExposureBias - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37380); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37380); /// /// Name: System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator @@ -5202,7 +5108,7 @@ public static partial class Ole32 /// FormatID: {AB205E50-04B7-461C-A18C-2F233836E627}, 100 /// public static PROPERTYKEY ExposureBiasDenominator - => new PROPERTYKEY(new Guid("{AB205E50-04B7-461C-A18C-2F233836E627}"), 100); + => new(new Guid("{AB205E50-04B7-461C-A18C-2F233836E627}"), 100); /// /// Name: System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator @@ -5211,18 +5117,16 @@ public static partial class Ole32 /// FormatID: {738BF284-1D87-420B-92CF-5834BF6EF9ED}, 100 /// public static PROPERTYKEY ExposureBiasNumerator - => new PROPERTYKEY(new Guid("{738BF284-1D87-420B-92CF-5834BF6EF9ED}"), 100); + => new(new Guid("{738BF284-1D87-420B-92CF-5834BF6EF9ED}"), 100); /// /// Name: System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex - /// - /// Description: PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator - /// + /// Description: PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator /// Type: Double -- VT_R8 /// FormatID: {967B5AF8-995A-46ED-9E11-35B3C5B9782D}, 100 /// public static PROPERTYKEY ExposureIndex - => new PROPERTYKEY(new Guid("{967B5AF8-995A-46ED-9E11-35B3C5B9782D}"), 100); + => new(new Guid("{967B5AF8-995A-46ED-9E11-35B3C5B9782D}"), 100); /// /// Name: System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator @@ -5231,7 +5135,7 @@ public static partial class Ole32 /// FormatID: {93112F89-C28B-492F-8A9D-4BE2062CEE8A}, 100 /// public static PROPERTYKEY ExposureIndexDenominator - => new PROPERTYKEY(new Guid("{93112F89-C28B-492F-8A9D-4BE2062CEE8A}"), 100); + => new(new Guid("{93112F89-C28B-492F-8A9D-4BE2062CEE8A}"), 100); /// /// Name: System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator @@ -5240,7 +5144,7 @@ public static partial class Ole32 /// FormatID: {CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}, 100 /// public static PROPERTYKEY ExposureIndexNumerator - => new PROPERTYKEY(new Guid("{CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}"), 100); + => new(new Guid("{CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}"), 100); /// /// Name: System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram @@ -5249,29 +5153,25 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34850 (PropertyTagExifExposureProg) /// public static PROPERTYKEY ExposureProgram - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34850); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34850); /// /// Name: System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText - /// - /// Description: This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {FEC690B7-5F30-4646-AE47-4CAAFBA884A3}, 100 /// public static PROPERTYKEY ExposureProgramText - => new PROPERTYKEY(new Guid("{FEC690B7-5F30-4646-AE47-4CAAFBA884A3}"), 100); + => new(new Guid("{FEC690B7-5F30-4646-AE47-4CAAFBA884A3}"), 100); /// /// Name: System.Photo.ExposureTime -- PKEY_Photo_ExposureTime - /// - /// Description: PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator - /// + /// Description: PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33434 /// public static PROPERTYKEY ExposureTime - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33434); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33434); /// /// Name: System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator @@ -5280,7 +5180,7 @@ public static partial class Ole32 /// FormatID: {55E98597-AD16-42E0-B624-21599A199838}, 100 /// public static PROPERTYKEY ExposureTimeDenominator - => new PROPERTYKEY(new Guid("{55E98597-AD16-42E0-B624-21599A199838}"), 100); + => new(new Guid("{55E98597-AD16-42E0-B624-21599A199838}"), 100); /// /// Name: System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator @@ -5289,7 +5189,7 @@ public static partial class Ole32 /// FormatID: {257E44E2-9031-4323-AC38-85C552871B2E}, 100 /// public static PROPERTYKEY ExposureTimeNumerator - => new PROPERTYKEY(new Guid("{257E44E2-9031-4323-AC38-85C552871B2E}"), 100); + => new(new Guid("{257E44E2-9031-4323-AC38-85C552871B2E}"), 100); /// /// Name: System.Photo.Flash -- PKEY_Photo_Flash @@ -5298,18 +5198,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37385 /// public static PROPERTYKEY Flash - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37385); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37385); /// /// Name: System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy - /// - /// Description: PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator - /// + /// Description: PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 41483 /// public static PROPERTYKEY FlashEnergy - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 41483); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 41483); /// /// Name: System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator @@ -5318,7 +5216,7 @@ public static partial class Ole32 /// FormatID: {D7B61C70-6323-49CD-A5FC-C84277162C97}, 100 /// public static PROPERTYKEY FlashEnergyDenominator - => new PROPERTYKEY(new Guid("{D7B61C70-6323-49CD-A5FC-C84277162C97}"), 100); + => new(new Guid("{D7B61C70-6323-49CD-A5FC-C84277162C97}"), 100); /// /// Name: System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator @@ -5327,7 +5225,7 @@ public static partial class Ole32 /// FormatID: {FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}, 100 /// public static PROPERTYKEY FlashEnergyNumerator - => new PROPERTYKEY(new Guid("{FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}"), 100); + => new(new Guid("{FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}"), 100); /// /// Name: System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer @@ -5336,7 +5234,7 @@ public static partial class Ole32 /// FormatID: {AABAF6C9-E0C5-4719-8585-57B103E584FE}, 100 /// public static PROPERTYKEY FlashManufacturer - => new PROPERTYKEY(new Guid("{AABAF6C9-E0C5-4719-8585-57B103E584FE}"), 100); + => new(new Guid("{AABAF6C9-E0C5-4719-8585-57B103E584FE}"), 100); /// /// Name: System.Photo.FlashModel -- PKEY_Photo_FlashModel @@ -5345,18 +5243,16 @@ public static partial class Ole32 /// FormatID: {FE83BB35-4D1A-42E2-916B-06F3E1AF719E}, 100 /// public static PROPERTYKEY FlashModel - => new PROPERTYKEY(new Guid("{FE83BB35-4D1A-42E2-916B-06F3E1AF719E}"), 100); + => new(new Guid("{FE83BB35-4D1A-42E2-916B-06F3E1AF719E}"), 100); /// /// Name: System.Photo.FlashText -- PKEY_Photo_FlashText - /// - /// Description: This is the user-friendly form of System.Photo.Flash. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.Flash. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {6B8B68F6-200B-47EA-8D25-D8050F57339F}, 100 /// public static PROPERTYKEY FlashText - => new PROPERTYKEY(new Guid("{6B8B68F6-200B-47EA-8D25-D8050F57339F}"), 100); + => new(new Guid("{6B8B68F6-200B-47EA-8D25-D8050F57339F}"), 100); /// /// Name: System.Photo.FNumber -- PKEY_Photo_FNumber @@ -5365,7 +5261,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33437 /// public static PROPERTYKEY FNumber - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33437); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33437); /// /// Name: System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator @@ -5374,7 +5270,7 @@ public static partial class Ole32 /// FormatID: {E92A2496-223B-4463-A4E3-30EABBA79D80}, 100 /// public static PROPERTYKEY FNumberDenominator - => new PROPERTYKEY(new Guid("{E92A2496-223B-4463-A4E3-30EABBA79D80}"), 100); + => new(new Guid("{E92A2496-223B-4463-A4E3-30EABBA79D80}"), 100); /// /// Name: System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator @@ -5383,18 +5279,16 @@ public static partial class Ole32 /// FormatID: {1B97738A-FDFC-462F-9D93-1957E08BE90C}, 100 /// public static PROPERTYKEY FNumberNumerator - => new PROPERTYKEY(new Guid("{1B97738A-FDFC-462F-9D93-1957E08BE90C}"), 100); + => new(new Guid("{1B97738A-FDFC-462F-9D93-1957E08BE90C}"), 100); /// /// Name: System.Photo.FocalLength -- PKEY_Photo_FocalLength - /// - /// Description: PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator - /// + /// Description: PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37386 /// public static PROPERTYKEY FocalLength - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37386); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37386); /// /// Name: System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator @@ -5403,7 +5297,7 @@ public static partial class Ole32 /// FormatID: {305BC615-DCA1-44A5-9FD4-10C0BA79412E}, 100 /// public static PROPERTYKEY FocalLengthDenominator - => new PROPERTYKEY(new Guid("{305BC615-DCA1-44A5-9FD4-10C0BA79412E}"), 100); + => new(new Guid("{305BC615-DCA1-44A5-9FD4-10C0BA79412E}"), 100); /// /// Name: System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm @@ -5412,7 +5306,7 @@ public static partial class Ole32 /// FormatID: {A0E74609-B84D-4F49-B860-462BD9971F98}, 100 /// public static PROPERTYKEY FocalLengthInFilm - => new PROPERTYKEY(new Guid("{A0E74609-B84D-4F49-B860-462BD9971F98}"), 100); + => new(new Guid("{A0E74609-B84D-4F49-B860-462BD9971F98}"), 100); /// /// Name: System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator @@ -5421,18 +5315,16 @@ public static partial class Ole32 /// FormatID: {776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}, 100 /// public static PROPERTYKEY FocalLengthNumerator - => new PROPERTYKEY(new Guid("{776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}"), 100); + => new(new Guid("{776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}"), 100); /// /// Name: System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution - /// - /// Description: PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and PKEY_Photo_FocalPlaneXResolutionDenominator. - /// + /// Description: PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and PKEY_Photo_FocalPlaneXResolutionDenominator. /// Type: Double -- VT_R8 /// FormatID: {CFC08D97-C6F7-4484-89DD-EBEF4356FE76}, 100 /// public static PROPERTYKEY FocalPlaneXResolution - => new PROPERTYKEY(new Guid("{CFC08D97-C6F7-4484-89DD-EBEF4356FE76}"), 100); + => new(new Guid("{CFC08D97-C6F7-4484-89DD-EBEF4356FE76}"), 100); /// /// Name: System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator @@ -5441,7 +5333,7 @@ public static partial class Ole32 /// FormatID: {0933F3F5-4786-4F46-A8E8-D64DD37FA521}, 100 /// public static PROPERTYKEY FocalPlaneXResolutionDenominator - => new PROPERTYKEY(new Guid("{0933F3F5-4786-4F46-A8E8-D64DD37FA521}"), 100); + => new(new Guid("{0933F3F5-4786-4F46-A8E8-D64DD37FA521}"), 100); /// /// Name: System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator @@ -5450,18 +5342,16 @@ public static partial class Ole32 /// FormatID: {DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}, 100 /// public static PROPERTYKEY FocalPlaneXResolutionNumerator - => new PROPERTYKEY(new Guid("{DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}"), 100); + => new(new Guid("{DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}"), 100); /// /// Name: System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution - /// - /// Description: PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and PKEY_Photo_FocalPlaneYResolutionDenominator. - /// + /// Description: PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and PKEY_Photo_FocalPlaneYResolutionDenominator. /// Type: Double -- VT_R8 /// FormatID: {4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}, 100 /// public static PROPERTYKEY FocalPlaneYResolution - => new PROPERTYKEY(new Guid("{4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}"), 100); + => new(new Guid("{4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}"), 100); /// /// Name: System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator @@ -5470,7 +5360,7 @@ public static partial class Ole32 /// FormatID: {1D6179A6-A876-4031-B013-3347B2B64DC8}, 100 /// public static PROPERTYKEY FocalPlaneYResolutionDenominator - => new PROPERTYKEY(new Guid("{1D6179A6-A876-4031-B013-3347B2B64DC8}"), 100); + => new(new Guid("{1D6179A6-A876-4031-B013-3347B2B64DC8}"), 100); /// /// Name: System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator @@ -5479,19 +5369,19 @@ public static partial class Ole32 /// FormatID: {A2E541C5-4440-4BA8-867E-75CFC06828CD}, 100 /// public static PROPERTYKEY FocalPlaneYResolutionNumerator - => new PROPERTYKEY(new Guid("{A2E541C5-4440-4BA8-867E-75CFC06828CD}"), 100); + => new(new Guid("{A2E541C5-4440-4BA8-867E-75CFC06828CD}"), 100); /// /// Name: System.Photo.GainControl -- PKEY_Photo_GainControl /// - /// Description: This indicates the degree of overall image gain adjustment. Calculated from - /// PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator. + /// Description: This indicates the degree of overall image gain adjustment. Calculated from PKEY_Photo_GainControlNumerator + /// and PKEY_Photo_GainControlDenominator. /// /// Type: Double -- VT_R8 /// FormatID: {FA304789-00C7-4D80-904A-1E4DCC7265AA}, 100 (PropertyTagExifGainControl) /// public static PROPERTYKEY GainControl - => new PROPERTYKEY(new Guid("{FA304789-00C7-4D80-904A-1E4DCC7265AA}"), 100); + => new(new Guid("{FA304789-00C7-4D80-904A-1E4DCC7265AA}"), 100); /// /// Name: System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator @@ -5500,7 +5390,7 @@ public static partial class Ole32 /// FormatID: {42864DFD-9DA4-4F77-BDED-4AAD7B256735}, 100 /// public static PROPERTYKEY GainControlDenominator - => new PROPERTYKEY(new Guid("{42864DFD-9DA4-4F77-BDED-4AAD7B256735}"), 100); + => new(new Guid("{42864DFD-9DA4-4F77-BDED-4AAD7B256735}"), 100); /// /// Name: System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator @@ -5509,18 +5399,16 @@ public static partial class Ole32 /// FormatID: {8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}, 100 /// public static PROPERTYKEY GainControlNumerator - => new PROPERTYKEY(new Guid("{8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}"), 100); + => new(new Guid("{8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}"), 100); /// /// Name: System.Photo.GainControlText -- PKEY_Photo_GainControlText - /// - /// Description: This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C06238B2-0BF9-4279-A723-25856715CB9D}, 100 /// public static PROPERTYKEY GainControlText - => new PROPERTYKEY(new Guid("{C06238B2-0BF9-4279-A723-25856715CB9D}"), 100); + => new(new Guid("{C06238B2-0BF9-4279-A723-25856715CB9D}"), 100); /// /// Name: System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed @@ -5529,7 +5417,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34855 /// public static PROPERTYKEY ISOSpeed - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34855); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34855); /// /// Name: System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer @@ -5538,7 +5426,7 @@ public static partial class Ole32 /// FormatID: {E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}, 100 /// public static PROPERTYKEY LensManufacturer - => new PROPERTYKEY(new Guid("{E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}"), 100); + => new(new Guid("{E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}"), 100); /// /// Name: System.Photo.LensModel -- PKEY_Photo_LensModel @@ -5547,7 +5435,7 @@ public static partial class Ole32 /// FormatID: {E1277516-2B5F-4869-89B1-2E585BD38B7A}, 100 /// public static PROPERTYKEY LensModel - => new PROPERTYKEY(new Guid("{E1277516-2B5F-4869-89B1-2E585BD38B7A}"), 100); + => new(new Guid("{E1277516-2B5F-4869-89B1-2E585BD38B7A}"), 100); /// /// Name: System.Photo.LightSource -- PKEY_Photo_LightSource @@ -5556,7 +5444,7 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37384 /// public static PROPERTYKEY LightSource - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37384); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37384); /// /// Name: System.Photo.MakerNote -- PKEY_Photo_MakerNote @@ -5565,7 +5453,7 @@ public static partial class Ole32 /// FormatID: {FA303353-B659-4052-85E9-BCAC79549B84}, 100 /// public static PROPERTYKEY MakerNote - => new PROPERTYKEY(new Guid("{FA303353-B659-4052-85E9-BCAC79549B84}"), 100); + => new(new Guid("{FA303353-B659-4052-85E9-BCAC79549B84}"), 100); /// /// Name: System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset @@ -5574,7 +5462,7 @@ public static partial class Ole32 /// FormatID: {813F4124-34E6-4D17-AB3E-6B1F3C2247A1}, 100 /// public static PROPERTYKEY MakerNoteOffset - => new PROPERTYKEY(new Guid("{813F4124-34E6-4D17-AB3E-6B1F3C2247A1}"), 100); + => new(new Guid("{813F4124-34E6-4D17-AB3E-6B1F3C2247A1}"), 100); /// /// Name: System.Photo.MaxAperture -- PKEY_Photo_MaxAperture @@ -5583,7 +5471,7 @@ public static partial class Ole32 /// FormatID: {08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}, 100 /// public static PROPERTYKEY MaxAperture - => new PROPERTYKEY(new Guid("{08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}"), 100); + => new(new Guid("{08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}"), 100); /// /// Name: System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator @@ -5592,7 +5480,7 @@ public static partial class Ole32 /// FormatID: {C77724D4-601F-46C5-9B89-C53F93BCEB77}, 100 /// public static PROPERTYKEY MaxApertureDenominator - => new PROPERTYKEY(new Guid("{C77724D4-601F-46C5-9B89-C53F93BCEB77}"), 100); + => new(new Guid("{C77724D4-601F-46C5-9B89-C53F93BCEB77}"), 100); /// /// Name: System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator @@ -5601,7 +5489,7 @@ public static partial class Ole32 /// FormatID: {C107E191-A459-44C5-9AE6-B952AD4B906D}, 100 /// public static PROPERTYKEY MaxApertureNumerator - => new PROPERTYKEY(new Guid("{C107E191-A459-44C5-9AE6-B952AD4B906D}"), 100); + => new(new Guid("{C107E191-A459-44C5-9AE6-B952AD4B906D}"), 100); /// /// Name: System.Photo.MeteringMode -- PKEY_Photo_MeteringMode @@ -5610,18 +5498,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37383 /// public static PROPERTYKEY MeteringMode - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37383); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37383); /// /// Name: System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText - /// - /// Description: This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {F628FD8C-7BA8-465A-A65B-C5AA79263A9E}, 100 /// public static PROPERTYKEY MeteringModeText - => new PROPERTYKEY(new Guid("{F628FD8C-7BA8-465A-A65B-C5AA79263A9E}"), 100); + => new(new Guid("{F628FD8C-7BA8-465A-A65B-C5AA79263A9E}"), 100); /// /// Name: System.Photo.Orientation -- PKEY_Photo_Orientation @@ -5630,18 +5516,16 @@ public static partial class Ole32 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 274 (PropertyTagOrientation) /// public static PROPERTYKEY Orientation - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 274); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 274); /// /// Name: System.Photo.OrientationText -- PKEY_Photo_OrientationText - /// - /// Description: This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {A9EA193C-C511-498A-A06B-58E2776DCC28}, 100 /// public static PROPERTYKEY OrientationText - => new PROPERTYKEY(new Guid("{A9EA193C-C511-498A-A06B-58E2776DCC28}"), 100); + => new(new Guid("{A9EA193C-C511-498A-A06B-58E2776DCC28}"), 100); /// /// Name: System.Photo.PeopleNames -- PKEY_Photo_PeopleNames @@ -5652,18 +5536,16 @@ public static partial class Ole32 /// FormatID: {E8309B6E-084C-49B4-B1FC-90A80331B638}, 100 /// public static PROPERTYKEY PeopleNames - => new PROPERTYKEY(new Guid("{E8309B6E-084C-49B4-B1FC-90A80331B638}"), 100); + => new(new Guid("{E8309B6E-084C-49B4-B1FC-90A80331B638}"), 100); /// /// Name: System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation - /// - /// Description: This is the pixel composition. In JPEG compressed data, a JPEG marker is used instead of this property. - /// + /// Description: This is the pixel composition. In JPEG compressed data, a JPEG marker is used instead of this property. /// Type: UInt16 -- VT_UI2 /// FormatID: {341796F1-1DF9-4B1C-A564-91BDEFA43877}, 100 /// public static PROPERTYKEY PhotometricInterpretation - => new PROPERTYKEY(new Guid("{341796F1-1DF9-4B1C-A564-91BDEFA43877}"), 100); + => new(new Guid("{341796F1-1DF9-4B1C-A564-91BDEFA43877}"), 100); /// /// Name: System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText @@ -5674,29 +5556,25 @@ public static partial class Ole32 /// FormatID: {821437D6-9EAB-4765-A589-3B1CBBD22A61}, 100 /// public static PROPERTYKEY PhotometricInterpretationText - => new PROPERTYKEY(new Guid("{821437D6-9EAB-4765-A589-3B1CBBD22A61}"), 100); + => new(new Guid("{821437D6-9EAB-4765-A589-3B1CBBD22A61}"), 100); /// /// Name: System.Photo.ProgramMode -- PKEY_Photo_ProgramMode - /// - /// Description: This is the class of the program used by the camera to set exposure when the picture is taken. - /// + /// Description: This is the class of the program used by the camera to set exposure when the picture is taken. /// Type: UInt32 -- VT_UI4 /// FormatID: {6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}, 100 /// public static PROPERTYKEY ProgramMode - => new PROPERTYKEY(new Guid("{6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}"), 100); + => new(new Guid("{6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}"), 100); /// /// Name: System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText - /// - /// Description: This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {7FE3AA27-2648-42F3-89B0-454E5CB150C3}, 100 /// public static PROPERTYKEY ProgramModeText - => new PROPERTYKEY(new Guid("{7FE3AA27-2648-42F3-89B0-454E5CB150C3}"), 100); + => new(new Guid("{7FE3AA27-2648-42F3-89B0-454E5CB150C3}"), 100); /// /// Name: System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile @@ -5705,62 +5583,52 @@ public static partial class Ole32 /// FormatID: {318A6B45-087F-4DC2-B8CC-05359551FC9E}, 100 /// public static PROPERTYKEY RelatedSoundFile - => new PROPERTYKEY(new Guid("{318A6B45-087F-4DC2-B8CC-05359551FC9E}"), 100); + => new(new Guid("{318A6B45-087F-4DC2-B8CC-05359551FC9E}"), 100); /// /// Name: System.Photo.Saturation -- PKEY_Photo_Saturation - /// - /// Description: This indicates the direction of saturation processing applied by the camera when the image was shot. - /// + /// Description: This indicates the direction of saturation processing applied by the camera when the image was shot. /// Type: UInt32 -- VT_UI4 /// FormatID: {49237325-A95A-4F67-B211-816B2D45D2E0}, 100 /// public static PROPERTYKEY Saturation - => new PROPERTYKEY(new Guid("{49237325-A95A-4F67-B211-816B2D45D2E0}"), 100); + => new(new Guid("{49237325-A95A-4F67-B211-816B2D45D2E0}"), 100); /// /// Name: System.Photo.SaturationText -- PKEY_Photo_SaturationText - /// - /// Description: This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {61478C08-B600-4A84-BBE4-E99C45F0A072}, 100 /// public static PROPERTYKEY SaturationText - => new PROPERTYKEY(new Guid("{61478C08-B600-4A84-BBE4-E99C45F0A072}"), 100); + => new(new Guid("{61478C08-B600-4A84-BBE4-E99C45F0A072}"), 100); /// /// Name: System.Photo.Sharpness -- PKEY_Photo_Sharpness - /// - /// Description: This indicates the direction of sharpness processing applied by the camera when the image was shot. - /// + /// Description: This indicates the direction of sharpness processing applied by the camera when the image was shot. /// Type: UInt32 -- VT_UI4 /// FormatID: {FC6976DB-8349-4970-AE97-B3C5316A08F0}, 100 /// public static PROPERTYKEY Sharpness - => new PROPERTYKEY(new Guid("{FC6976DB-8349-4970-AE97-B3C5316A08F0}"), 100); + => new(new Guid("{FC6976DB-8349-4970-AE97-B3C5316A08F0}"), 100); /// /// Name: System.Photo.SharpnessText -- PKEY_Photo_SharpnessText - /// - /// Description: This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {51EC3F47-DD50-421D-8769-334F50424B1E}, 100 /// public static PROPERTYKEY SharpnessText - => new PROPERTYKEY(new Guid("{51EC3F47-DD50-421D-8769-334F50424B1E}"), 100); + => new(new Guid("{51EC3F47-DD50-421D-8769-334F50424B1E}"), 100); /// /// Name: System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed - /// - /// Description: PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator - /// + /// Description: PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37377 /// public static PROPERTYKEY ShutterSpeed - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37377); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37377); /// /// Name: System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator @@ -5769,7 +5637,7 @@ public static partial class Ole32 /// FormatID: {E13D8975-81C7-4948-AE3F-37CAE11E8FF7}, 100 /// public static PROPERTYKEY ShutterSpeedDenominator - => new PROPERTYKEY(new Guid("{E13D8975-81C7-4948-AE3F-37CAE11E8FF7}"), 100); + => new(new Guid("{E13D8975-81C7-4948-AE3F-37CAE11E8FF7}"), 100); /// /// Name: System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator @@ -5778,18 +5646,16 @@ public static partial class Ole32 /// FormatID: {16EA4042-D6F4-4BCA-8349-7C78D30FB333}, 100 /// public static PROPERTYKEY ShutterSpeedNumerator - => new PROPERTYKEY(new Guid("{16EA4042-D6F4-4BCA-8349-7C78D30FB333}"), 100); + => new(new Guid("{16EA4042-D6F4-4BCA-8349-7C78D30FB333}"), 100); /// /// Name: System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance - /// - /// Description: PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator - /// + /// Description: PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator /// Type: Double -- VT_R8 /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37382 /// public static PROPERTYKEY SubjectDistance - => new PROPERTYKEY(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37382); + => new(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37382); /// /// Name: System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator @@ -5798,7 +5664,7 @@ public static partial class Ole32 /// FormatID: {0C840A88-B043-466D-9766-D4B26DA3FA77}, 100 /// public static PROPERTYKEY SubjectDistanceDenominator - => new PROPERTYKEY(new Guid("{0C840A88-B043-466D-9766-D4B26DA3FA77}"), 100); + => new(new Guid("{0C840A88-B043-466D-9766-D4B26DA3FA77}"), 100); /// /// Name: System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator @@ -5807,7 +5673,7 @@ public static partial class Ole32 /// FormatID: {8AF4961C-F526-43E5-AA81-DB768219178D}, 100 /// public static PROPERTYKEY SubjectDistanceNumerator - => new PROPERTYKEY(new Guid("{8AF4961C-F526-43E5-AA81-DB768219178D}"), 100); + => new(new Guid("{8AF4961C-F526-43E5-AA81-DB768219178D}"), 100); /// /// Name: System.Photo.TagViewAggregate -- PKEY_Photo_TagViewAggregate @@ -5818,7 +5684,7 @@ public static partial class Ole32 /// FormatID: {B812F15D-C2D8-4BBF-BACD-79744346113F}, 100 /// public static PROPERTYKEY TagViewAggregate - => new PROPERTYKEY(new Guid("{B812F15D-C2D8-4BBF-BACD-79744346113F}"), 100); + => new(new Guid("{B812F15D-C2D8-4BBF-BACD-79744346113F}"), 100); /// /// Name: System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync @@ -5827,7 +5693,7 @@ public static partial class Ole32 /// FormatID: {9A8EBB75-6458-4E82-BACB-35C0095B03BB}, 100 /// public static PROPERTYKEY TranscodedForSync - => new PROPERTYKEY(new Guid("{9A8EBB75-6458-4E82-BACB-35C0095B03BB}"), 100); + => new(new Guid("{9A8EBB75-6458-4E82-BACB-35C0095B03BB}"), 100); /// /// Name: System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance @@ -5836,18 +5702,16 @@ public static partial class Ole32 /// FormatID: {EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}, 100 /// public static PROPERTYKEY WhiteBalance - => new PROPERTYKEY(new Guid("{EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}"), 100); + => new(new Guid("{EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}"), 100); /// /// Name: System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText - /// - /// Description: This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed programmatically. - /// + /// Description: This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed programmatically. /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {6336B95E-C7A7-426D-86FD-7AE3D39C84B4}, 100 /// public static PROPERTYKEY WhiteBalanceText - => new PROPERTYKEY(new Guid("{6336B95E-C7A7-426D-86FD-7AE3D39C84B4}"), 100); + => new(new Guid("{6336B95E-C7A7-426D-86FD-7AE3D39C84B4}"), 100); } /// PropGroup Properties @@ -5860,7 +5724,7 @@ public static partial class Ole32 /// FormatID: {900A403B-097B-4B95-8AE2-071FDAEEB118}, 100 /// public static PROPERTYKEY Advanced - => new PROPERTYKEY(new Guid("{900A403B-097B-4B95-8AE2-071FDAEEB118}"), 100); + => new(new Guid("{900A403B-097B-4B95-8AE2-071FDAEEB118}"), 100); /// /// Name: System.PropGroup.Audio -- PKEY_PropGroup_Audio @@ -5869,7 +5733,7 @@ public static partial class Ole32 /// FormatID: {2804D469-788F-48AA-8570-71B9C187E138}, 100 /// public static PROPERTYKEY Audio - => new PROPERTYKEY(new Guid("{2804D469-788F-48AA-8570-71B9C187E138}"), 100); + => new(new Guid("{2804D469-788F-48AA-8570-71B9C187E138}"), 100); /// /// Name: System.PropGroup.Calendar -- PKEY_PropGroup_Calendar @@ -5878,7 +5742,7 @@ public static partial class Ole32 /// FormatID: {9973D2B5-BFD8-438A-BA94-5349B293181A}, 100 /// public static PROPERTYKEY Calendar - => new PROPERTYKEY(new Guid("{9973D2B5-BFD8-438A-BA94-5349B293181A}"), 100); + => new(new Guid("{9973D2B5-BFD8-438A-BA94-5349B293181A}"), 100); /// /// Name: System.PropGroup.Camera -- PKEY_PropGroup_Camera @@ -5887,7 +5751,7 @@ public static partial class Ole32 /// FormatID: {DE00DE32-547E-4981-AD4B-542F2E9007D8}, 100 /// public static PROPERTYKEY Camera - => new PROPERTYKEY(new Guid("{DE00DE32-547E-4981-AD4B-542F2E9007D8}"), 100); + => new(new Guid("{DE00DE32-547E-4981-AD4B-542F2E9007D8}"), 100); /// /// Name: System.PropGroup.Contact -- PKEY_PropGroup_Contact @@ -5896,7 +5760,7 @@ public static partial class Ole32 /// FormatID: {DF975FD3-250A-4004-858F-34E29A3E37AA}, 100 /// public static PROPERTYKEY Contact - => new PROPERTYKEY(new Guid("{DF975FD3-250A-4004-858F-34E29A3E37AA}"), 100); + => new(new Guid("{DF975FD3-250A-4004-858F-34E29A3E37AA}"), 100); /// /// Name: System.PropGroup.Content -- PKEY_PropGroup_Content @@ -5905,7 +5769,7 @@ public static partial class Ole32 /// FormatID: {D0DAB0BA-368A-4050-A882-6C010FD19A4F}, 100 /// public static PROPERTYKEY Content - => new PROPERTYKEY(new Guid("{D0DAB0BA-368A-4050-A882-6C010FD19A4F}"), 100); + => new(new Guid("{D0DAB0BA-368A-4050-A882-6C010FD19A4F}"), 100); /// /// Name: System.PropGroup.Description -- PKEY_PropGroup_Description @@ -5914,7 +5778,7 @@ public static partial class Ole32 /// FormatID: {8969B275-9475-4E00-A887-FF93B8B41E44}, 100 /// public static PROPERTYKEY Description - => new PROPERTYKEY(new Guid("{8969B275-9475-4E00-A887-FF93B8B41E44}"), 100); + => new(new Guid("{8969B275-9475-4E00-A887-FF93B8B41E44}"), 100); /// /// Name: System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem @@ -5923,7 +5787,7 @@ public static partial class Ole32 /// FormatID: {E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}, 100 /// public static PROPERTYKEY FileSystem - => new PROPERTYKEY(new Guid("{E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}"), 100); + => new(new Guid("{E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}"), 100); /// /// Name: System.PropGroup.General -- PKEY_PropGroup_General @@ -5932,7 +5796,7 @@ public static partial class Ole32 /// FormatID: {CC301630-B192-4C22-B372-9F4C6D338E07}, 100 /// public static PROPERTYKEY General - => new PROPERTYKEY(new Guid("{CC301630-B192-4C22-B372-9F4C6D338E07}"), 100); + => new(new Guid("{CC301630-B192-4C22-B372-9F4C6D338E07}"), 100); /// /// Name: System.PropGroup.GPS -- PKEY_PropGroup_GPS @@ -5941,7 +5805,7 @@ public static partial class Ole32 /// FormatID: {F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}, 100 /// public static PROPERTYKEY GPS - => new PROPERTYKEY(new Guid("{F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}"), 100); + => new(new Guid("{F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}"), 100); /// /// Name: System.PropGroup.Image -- PKEY_PropGroup_Image @@ -5950,7 +5814,7 @@ public static partial class Ole32 /// FormatID: {E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}, 100 /// public static PROPERTYKEY Image - => new PROPERTYKEY(new Guid("{E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}"), 100); + => new(new Guid("{E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}"), 100); /// /// Name: System.PropGroup.Media -- PKEY_PropGroup_Media @@ -5959,7 +5823,7 @@ public static partial class Ole32 /// FormatID: {61872CF7-6B5E-4B4B-AC2D-59DA84459248}, 100 /// public static PROPERTYKEY Media - => new PROPERTYKEY(new Guid("{61872CF7-6B5E-4B4B-AC2D-59DA84459248}"), 100); + => new(new Guid("{61872CF7-6B5E-4B4B-AC2D-59DA84459248}"), 100); /// /// Name: System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced @@ -5968,7 +5832,7 @@ public static partial class Ole32 /// FormatID: {8859A284-DE7E-4642-99BA-D431D044B1EC}, 100 /// public static PROPERTYKEY MediaAdvanced - => new PROPERTYKEY(new Guid("{8859A284-DE7E-4642-99BA-D431D044B1EC}"), 100); + => new(new Guid("{8859A284-DE7E-4642-99BA-D431D044B1EC}"), 100); /// /// Name: System.PropGroup.Message -- PKEY_PropGroup_Message @@ -5977,7 +5841,7 @@ public static partial class Ole32 /// FormatID: {7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}, 100 /// public static PROPERTYKEY Message - => new PROPERTYKEY(new Guid("{7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}"), 100); + => new(new Guid("{7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}"), 100); /// /// Name: System.PropGroup.Music -- PKEY_PropGroup_Music @@ -5986,7 +5850,7 @@ public static partial class Ole32 /// FormatID: {68DD6094-7216-40F1-A029-43FE7127043F}, 100 /// public static PROPERTYKEY Music - => new PROPERTYKEY(new Guid("{68DD6094-7216-40F1-A029-43FE7127043F}"), 100); + => new(new Guid("{68DD6094-7216-40F1-A029-43FE7127043F}"), 100); /// /// Name: System.PropGroup.Origin -- PKEY_PropGroup_Origin @@ -5995,7 +5859,7 @@ public static partial class Ole32 /// FormatID: {2598D2FB-5569-4367-95DF-5CD3A177E1A5}, 100 /// public static PROPERTYKEY Origin - => new PROPERTYKEY(new Guid("{2598D2FB-5569-4367-95DF-5CD3A177E1A5}"), 100); + => new(new Guid("{2598D2FB-5569-4367-95DF-5CD3A177E1A5}"), 100); /// /// Name: System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced @@ -6004,7 +5868,7 @@ public static partial class Ole32 /// FormatID: {0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}, 100 /// public static PROPERTYKEY PhotoAdvanced - => new PROPERTYKEY(new Guid("{0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}"), 100); + => new(new Guid("{0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}"), 100); /// /// Name: System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV @@ -6013,7 +5877,7 @@ public static partial class Ole32 /// FormatID: {E7B33238-6584-4170-A5C0-AC25EFD9DA56}, 100 /// public static PROPERTYKEY RecordedTV - => new PROPERTYKEY(new Guid("{E7B33238-6584-4170-A5C0-AC25EFD9DA56}"), 100); + => new(new Guid("{E7B33238-6584-4170-A5C0-AC25EFD9DA56}"), 100); /// /// Name: System.PropGroup.Video -- PKEY_PropGroup_Video @@ -6022,7 +5886,7 @@ public static partial class Ole32 /// FormatID: {BEBE0920-7671-4C54-A3EB-49FDDFC191EE}, 100 /// public static PROPERTYKEY Video - => new PROPERTYKEY(new Guid("{BEBE0920-7671-4C54-A3EB-49FDDFC191EE}"), 100); + => new(new Guid("{BEBE0920-7671-4C54-A3EB-49FDDFC191EE}"), 100); } /// PropList Properties @@ -6038,31 +5902,31 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 11 /// public static PROPERTYKEY ConflictPrompt - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 11); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 11); /// /// Name: System.PropList.ContentViewModeForBrowse -- PKEY_PropList_ContentViewModeForBrowse /// - /// Description: The list of properties to show in the content view mode of an item in the context of browsing. Register - /// the regvalue under the name of "ContentViewModeForBrowse". + /// Description: The list of properties to show in the content view mode of an item in the context of browsing. Register the + /// regvalue under the name of "ContentViewModeForBrowse". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 13 /// public static PROPERTYKEY ContentViewModeForBrowse - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 13); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 13); /// /// Name: System.PropList.ContentViewModeForSearch -- PKEY_PropList_ContentViewModeForSearch /// - /// Description: The list of properties to show in the content view mode of an item in the context of searching. Register - /// the regvalue under the name of "ContentViewModeForSearch". + /// Description: The list of properties to show in the content view mode of an item in the context of searching. Register the + /// regvalue under the name of "ContentViewModeForSearch". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 14 /// public static PROPERTYKEY ContentViewModeForSearch - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 14); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 14); /// /// Name: System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo @@ -6073,68 +5937,65 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 9 /// public static PROPERTYKEY ExtendedTileInfo - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 9); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 9); /// /// Name: System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt /// - /// Description: The list of properties to show in the file operation confirmation dialog. Properties with empty values - /// will not be displayed. If this list is not specified, then the InfoTip property list is used instead. Register under - /// the regvalue of "FileOperationPrompt". + /// Description: The list of properties to show in the file operation confirmation dialog. Properties with empty values will + /// not be displayed. If this list is not specified, then the InfoTip property list is used instead. Register under the + /// regvalue of "FileOperationPrompt". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 10 /// public static PROPERTYKEY FileOperationPrompt - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 10); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 10); /// /// Name: System.PropList.FullDetails -- PKEY_PropList_FullDetails /// - /// Description: The list of all the properties to show in the details page. Property groups can be included in this list - /// in order to more easily organize the UI. Register under the regvalue of "FullDetails". + /// Description: The list of all the properties to show in the details page. Property groups can be included in this list in + /// order to more easily organize the UI. Register under the regvalue of "FullDetails". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 2 /// public static PROPERTYKEY FullDetails - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 2); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 2); /// /// Name: System.PropList.InfoTip -- PKEY_PropList_InfoTip /// - /// Description: The list of properties to show in the infotip. Properties with empty values will not be displayed. - /// Register under the regvalue of "InfoTip". + /// Description: The list of properties to show in the infotip. Properties with empty values will not be displayed. Register + /// under the regvalue of "InfoTip". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 4 (PID_PROPLIST_INFOTIP) /// public static PROPERTYKEY InfoTip - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 4); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 4); /// /// Name: System.PropList.NonPersonal -- PKEY_PropList_NonPersonal /// - /// Description: The list of properties that are considered 'non-personal'. When told to remove all non-personal - /// properties from a given file, the system will leave these particular properties untouched. Register under the - /// regvalue of "NonPersonal". + /// Description: The list of properties that are considered 'non-personal'. When told to remove all non-personal properties + /// from a given file, the system will leave these particular properties untouched. Register under the regvalue of "NonPersonal". /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {49D1091F-082E-493F-B23F-D2308AA9668C}, 100 /// public static PROPERTYKEY NonPersonal - => new PROPERTYKEY(new Guid("{49D1091F-082E-493F-B23F-D2308AA9668C}"), 100); + => new(new Guid("{49D1091F-082E-493F-B23F-D2308AA9668C}"), 100); /// /// Name: System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails - /// - /// Description: The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails". - /// + /// Description: The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails". /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 8 /// public static PROPERTYKEY PreviewDetails - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 8); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 8); /// /// Name: System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle @@ -6146,7 +6007,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 6 /// public static PROPERTYKEY PreviewTitle - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 6); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 6); /// /// Name: System.PropList.QuickTip -- PKEY_PropList_QuickTip @@ -6158,7 +6019,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 5 (PID_PROPLIST_QUICKTIP) /// public static PROPERTYKEY QuickTip - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 5); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 5); /// /// Name: System.PropList.TileInfo -- PKEY_PropList_TileInfo @@ -6167,7 +6028,7 @@ public static partial class Ole32 /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 3 (PID_PROPLIST_TILEINFO) /// public static PROPERTYKEY TileInfo - => new PROPERTYKEY(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 3); + => new(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 3); /// /// Name: System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel @@ -6176,7 +6037,7 @@ public static partial class Ole32 /// FormatID: (FMTID_WebView) {F2275480-F782-4291-BD94-F13693513AEC}, 0 (PID_DISPLAY_PROPERTIES) /// public static PROPERTYKEY XPDetailsPanel - => new PROPERTYKEY(new Guid("{F2275480-F782-4291-BD94-F13693513AEC}"), 0); + => new(new Guid("{F2275480-F782-4291-BD94-F13693513AEC}"), 0); } /// RecordedTV Properties @@ -6189,7 +6050,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 7 /// public static PROPERTYKEY ChannelNumber - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 7); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 7); /// /// Name: System.RecordedTV.Credits -- PKEY_RecordedTV_Credits @@ -6198,7 +6059,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 4 /// public static PROPERTYKEY Credits - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 4); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 4); /// /// Name: System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires @@ -6207,7 +6068,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 15 /// public static PROPERTYKEY DateContentExpires - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 15); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 15); /// /// Name: System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName @@ -6216,7 +6077,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 2 /// public static PROPERTYKEY EpisodeName - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 2); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 2); /// /// Name: System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent @@ -6225,7 +6086,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 16 /// public static PROPERTYKEY IsATSCContent - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 16); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 16); /// /// Name: System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable @@ -6234,7 +6095,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 12 /// public static PROPERTYKEY IsClosedCaptioningAvailable - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 12); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 12); /// /// Name: System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent @@ -6243,7 +6104,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 17 /// public static PROPERTYKEY IsDTVContent - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 17); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 17); /// /// Name: System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent @@ -6252,7 +6113,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 18 /// public static PROPERTYKEY IsHDContent - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 18); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 18); /// /// Name: System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast @@ -6261,7 +6122,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 13 /// public static PROPERTYKEY IsRepeatBroadcast - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 13); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 13); /// /// Name: System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP @@ -6270,7 +6131,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 14 /// public static PROPERTYKEY IsSAP - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 14); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 14); /// /// Name: System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation @@ -6279,7 +6140,7 @@ public static partial class Ole32 /// FormatID: {2C53C813-FB63-4E22-A1AB-0B331CA1E273}, 100 /// public static PROPERTYKEY NetworkAffiliation - => new PROPERTYKEY(new Guid("{2C53C813-FB63-4E22-A1AB-0B331CA1E273}"), 100); + => new(new Guid("{2C53C813-FB63-4E22-A1AB-0B331CA1E273}"), 100); /// /// Name: System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate @@ -6288,7 +6149,7 @@ public static partial class Ole32 /// FormatID: {4684FE97-8765-4842-9C13-F006447B178C}, 100 /// public static PROPERTYKEY OriginalBroadcastDate - => new PROPERTYKEY(new Guid("{4684FE97-8765-4842-9C13-F006447B178C}"), 100); + => new(new Guid("{4684FE97-8765-4842-9C13-F006447B178C}"), 100); /// /// Name: System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription @@ -6297,7 +6158,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 3 /// public static PROPERTYKEY ProgramDescription - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 3); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 3); /// /// Name: System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime @@ -6306,7 +6167,7 @@ public static partial class Ole32 /// FormatID: {A5477F61-7A82-4ECA-9DDE-98B69B2479B3}, 100 /// public static PROPERTYKEY RecordingTime - => new PROPERTYKEY(new Guid("{A5477F61-7A82-4ECA-9DDE-98B69B2479B3}"), 100); + => new(new Guid("{A5477F61-7A82-4ECA-9DDE-98B69B2479B3}"), 100); /// /// Name: System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign @@ -6315,7 +6176,7 @@ public static partial class Ole32 /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 5 /// public static PROPERTYKEY StationCallSign - => new PROPERTYKEY(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 5); + => new(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 5); /// /// Name: System.RecordedTV.StationName -- PKEY_RecordedTV_StationName @@ -6324,7 +6185,7 @@ public static partial class Ole32 /// FormatID: {1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}, 100 /// public static PROPERTYKEY StationName - => new PROPERTYKEY(new Guid("{1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}"), 100); + => new(new Guid("{1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}"), 100); } /// Recycle Bin Properties @@ -6337,7 +6198,7 @@ public static partial class Ole32 /// FormatID: {9b174b33-40ff-11d2-a27e-00c04fc30871}, 2 /// public static PROPERTYKEY DeletedFrom - => new PROPERTYKEY(new Guid("{9b174b33-40ff-11d2-a27e-00c04fc30871}"), 2); + => new(new Guid("{9b174b33-40ff-11d2-a27e-00c04fc30871}"), 2); /// /// Name: System.Recycle.DateDeleted @@ -6346,7 +6207,7 @@ public static partial class Ole32 /// FormatID: {9b174b33-40ff-11d2-a27e-00c04fc30871}, 3 /// public static PROPERTYKEY DateDeleted - => new PROPERTYKEY(new Guid("{9b174b33-40ff-11d2-a27e-00c04fc30871}"), 3); + => new(new Guid("{9b174b33-40ff-11d2-a27e-00c04fc30871}"), 3); } /// Search Properties @@ -6359,7 +6220,7 @@ public static partial class Ole32 /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 2 /// public static PROPERTYKEY AutoSummary - => new PROPERTYKEY(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 2); + => new(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 2); /// /// Name: System.Search.ContainerHash -- PKEY_Search_ContainerHash @@ -6368,31 +6229,31 @@ public static partial class Ole32 /// FormatID: {BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}, 100 /// public static PROPERTYKEY ContainerHash - => new PROPERTYKEY(new Guid("{BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}"), 100); + => new(new Guid("{BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}"), 100); /// /// Name: System.Search.Contents -- PKEY_Search_Contents /// - /// Description: The contents of the item. This property is for query restrictions only; it cannot be retrieved in a - /// query result. The Indexing Service friendly name is 'contents'. + /// Description: The contents of the item. This property is for query restrictions only; it cannot be retrieved in a query + /// result. The Indexing Service friendly name is 'contents'. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 19 (PID_STG_CONTENTS) /// public static PROPERTYKEY Contents - => new PROPERTYKEY(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 19); + => new(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 19); /// /// Name: System.Search.EntryID -- PKEY_Search_EntryID /// - /// Description: The entry ID for an item within a given catalog in the Windows Search Index. This value may be recycled, - /// and therefore is not considered unique over time. + /// Description: The entry ID for an item within a given catalog in the Windows Search Index. This value may be recycled, and + /// therefore is not considered unique over time. /// /// Type: Int32 -- VT_I4 /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 5 (PROPID_QUERY_WORKID) /// public static PROPERTYKEY EntryID - => new PROPERTYKEY(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 5); + => new(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 5); /// /// Name: System.Search.ExtendedProperties -- PKEY_Search_ExtendedProperties @@ -6401,45 +6262,45 @@ public static partial class Ole32 /// FormatID: {7B03B546-FA4F-4A52-A2FE-03D5311E5865}, 100 /// public static PROPERTYKEY ExtendedProperties - => new PROPERTYKEY(new Guid("{7B03B546-FA4F-4A52-A2FE-03D5311E5865}"), 100); + => new(new Guid("{7B03B546-FA4F-4A52-A2FE-03D5311E5865}"), 100); /// /// Name: System.Search.GatherTime -- PKEY_Search_GatherTime /// - /// Description: The Datetime that the Windows Search Gatherer process last pushed properties of this document to the - /// Windows Search Gatherer Plugins. + /// Description: The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows + /// Search Gatherer Plugins. /// /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 8 /// public static PROPERTYKEY GatherTime - => new PROPERTYKEY(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 8); + => new(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 8); /// /// Name: System.Search.HitCount -- PKEY_Search_HitCount /// - /// Description: When using CONTAINS over the Windows Search Index, this is the number of matches of the term. If there - /// are multiple CONTAINS, an AND computes the min number of hits and an OR the max number of hits. + /// Description: When using CONTAINS over the Windows Search Index, this is the number of matches of the term. If there are + /// multiple CONTAINS, an AND computes the min number of hits and an OR the max number of hits. /// /// Type: Int32 -- VT_I4 /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 4 (PROPID_QUERY_HITCOUNT) /// public static PROPERTYKEY HitCount - => new PROPERTYKEY(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 4); + => new(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 4); /// /// Name: System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory /// /// Description: If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time - /// applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For - /// example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last - /// modified time of that email. + /// applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For example, + /// this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified + /// time of that email. /// /// Type: Boolean -- VT_BOOL /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 23 /// public static PROPERTYKEY IsClosedDirectory - => new PROPERTYKEY(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 23); + => new(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 23); /// /// Name: System.Search.IsFullyContained -- PKEY_Search_IsFullyContained @@ -6452,7 +6313,7 @@ public static partial class Ole32 /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 24 /// public static PROPERTYKEY IsFullyContained - => new PROPERTYKEY(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 24); + => new(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 24); /// /// Name: System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary @@ -6461,7 +6322,7 @@ public static partial class Ole32 /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 3 /// public static PROPERTYKEY QueryFocusedSummary - => new PROPERTYKEY(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 3); + => new(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 3); /// /// Name: System.Search.QueryFocusedSummaryWithFallback -- PKEY_Search_QueryFocusedSummaryWithFallback @@ -6470,7 +6331,7 @@ public static partial class Ole32 /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 4 /// public static PROPERTYKEY QueryFocusedSummaryWithFallback - => new PROPERTYKEY(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 4); + => new(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 4); /// /// Name: System.Search.Rank -- PKEY_Search_Rank @@ -6479,7 +6340,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 3 (PROPID_QUERY_RANK) /// public static PROPERTYKEY Rank - => new PROPERTYKEY(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 3); + => new(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 3); /// /// Name: System.Search.Store -- PKEY_Search_Store @@ -6488,33 +6349,33 @@ public static partial class Ole32 /// FormatID: {A06992B3-8CAF-4ED7-A547-B259E32AC9FC}, 100 /// public static PROPERTYKEY Store - => new PROPERTYKEY(new Guid("{A06992B3-8CAF-4ED7-A547-B259E32AC9FC}"), 100); + => new(new Guid("{A06992B3-8CAF-4ED7-A547-B259E32AC9FC}"), 100); /// /// Name: System.Search.UrlToIndex -- PKEY_Search_UrlToIndex /// - /// Description: This property should be emitted by a container IFilter for each child URL within the container. The - /// children will eventually be crawled by the indexer if they are within scope. + /// Description: This property should be emitted by a container IFilter for each child URL within the container. The children + /// will eventually be crawled by the indexer if they are within scope. /// /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 2 /// public static PROPERTYKEY UrlToIndex - => new PROPERTYKEY(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 2); + => new(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 2); /// /// Name: System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime /// /// Description: This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last - /// modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask - /// for this information to determine if the content needs to be indexed again. The property is a vector with two - /// elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time. + /// modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for + /// this information to determine if the content needs to be indexed again. The property is a vector with two elements, a + /// VT_LPWSTR with the URL and a VT_FILETIME for the last modified time. /// /// Type: Multivalue Any -- VT_VECTOR | VT_NULL (For variants: VT_ARRAY | VT_NULL) /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 12 /// public static PROPERTYKEY UrlToIndexWithModificationTime - => new PROPERTYKEY(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 12); + => new(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 12); } /// Shell Properties @@ -6527,7 +6388,7 @@ public static partial class Ole32 /// FormatID: {DE35258C-C695-4CBC-B982-38B0AD24CED0}, 2 /// public static PROPERTYKEY OmitFromView - => new PROPERTYKEY(new Guid("{DE35258C-C695-4CBC-B982-38B0AD24CED0}"), 2); + => new(new Guid("{DE35258C-C695-4CBC-B982-38B0AD24CED0}"), 2); /// /// Name: System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings @@ -6536,7 +6397,7 @@ public static partial class Ole32 /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 2 /// public static PROPERTYKEY SFGAOFlagsStrings - => new PROPERTYKEY(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 2); + => new(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 2); } /// Software Properties @@ -6549,7 +6410,7 @@ public static partial class Ole32 /// FormatID: {841E4F90-FF59-4D16-8947-E81BBFFAB36D}, 16 /// public static PROPERTYKEY DateLastUsed - => new PROPERTYKEY(new Guid("{841E4F90-FF59-4D16-8947-E81BBFFAB36D}"), 16); + => new(new Guid("{841E4F90-FF59-4D16-8947-E81BBFFAB36D}"), 16); /// /// Name: System.Software.ProductName -- PKEY_Software_ProductName @@ -6558,7 +6419,7 @@ public static partial class Ole32 /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 7 /// public static PROPERTYKEY ProductName - => new PROPERTYKEY(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 7); + => new(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 7); } /// Sync Properties @@ -6571,7 +6432,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 13 /// public static PROPERTYKEY Comments - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 13); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 13); /// /// Name: System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription @@ -6580,7 +6441,7 @@ public static partial class Ole32 /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 4 /// public static PROPERTYKEY ConflictDescription - => new PROPERTYKEY(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 4); + => new(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 4); /// /// Name: System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation @@ -6589,7 +6450,7 @@ public static partial class Ole32 /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 6 /// public static PROPERTYKEY ConflictFirstLocation - => new PROPERTYKEY(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 6); + => new(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 6); /// /// Name: System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation @@ -6598,7 +6459,7 @@ public static partial class Ole32 /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 7 /// public static PROPERTYKEY ConflictSecondLocation - => new PROPERTYKEY(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 7); + => new(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 7); /// /// Name: System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID @@ -6607,7 +6468,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 2 /// public static PROPERTYKEY HandlerCollectionID - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 2); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 2); /// /// Name: System.Sync.HandlerID -- PKEY_Sync_HandlerID @@ -6616,7 +6477,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 3 /// public static PROPERTYKEY HandlerID - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 3); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 3); /// /// Name: System.Sync.HandlerName -- PKEY_Sync_HandlerName @@ -6625,7 +6486,7 @@ public static partial class Ole32 /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 2 /// public static PROPERTYKEY HandlerName - => new PROPERTYKEY(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 2); + => new(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 2); /// /// Name: System.Sync.HandlerType -- PKEY_Sync_HandlerType @@ -6634,7 +6495,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 8 /// public static PROPERTYKEY HandlerType - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 8); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 8); /// /// Name: System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel @@ -6643,7 +6504,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 9 /// public static PROPERTYKEY HandlerTypeLabel - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 9); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 9); /// /// Name: System.Sync.ItemID -- PKEY_Sync_ItemID @@ -6652,7 +6513,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 6 /// public static PROPERTYKEY ItemID - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 6); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 6); /// /// Name: System.Sync.ItemName -- PKEY_Sync_ItemName @@ -6661,7 +6522,7 @@ public static partial class Ole32 /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 3 /// public static PROPERTYKEY ItemName - => new PROPERTYKEY(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 3); + => new(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 3); /// /// Name: System.Sync.ProgressPercentage -- PKEY_Sync_ProgressPercentage @@ -6670,7 +6531,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 23 /// public static PROPERTYKEY ProgressPercentage - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 23); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 23); /// /// Name: System.Sync.State -- PKEY_Sync_State @@ -6679,7 +6540,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 24 /// public static PROPERTYKEY State - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 24); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 24); /// /// Name: System.Sync.Status -- PKEY_Sync_Status @@ -6688,7 +6549,7 @@ public static partial class Ole32 /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 10 /// public static PROPERTYKEY Status - => new PROPERTYKEY(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 10); + => new(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 10); } /// Task Properties @@ -6701,7 +6562,7 @@ public static partial class Ole32 /// FormatID: {D37D52C6-261C-4303-82B3-08B926AC6F12}, 100 /// public static PROPERTYKEY BillingInformation - => new PROPERTYKEY(new Guid("{D37D52C6-261C-4303-82B3-08B926AC6F12}"), 100); + => new(new Guid("{D37D52C6-261C-4303-82B3-08B926AC6F12}"), 100); /// /// Name: System.Task.CompletionStatus -- PKEY_Task_CompletionStatus @@ -6710,7 +6571,7 @@ public static partial class Ole32 /// FormatID: {084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}, 100 /// public static PROPERTYKEY CompletionStatus - => new PROPERTYKEY(new Guid("{084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}"), 100); + => new(new Guid("{084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}"), 100); /// /// Name: System.Task.Owner -- PKEY_Task_Owner @@ -6719,7 +6580,7 @@ public static partial class Ole32 /// FormatID: {08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}, 100 /// public static PROPERTYKEY Owner - => new PROPERTYKEY(new Guid("{08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}"), 100); + => new(new Guid("{08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}"), 100); } /// Video Properties @@ -6732,7 +6593,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 10 (PIDVSI_COMPRESSION) /// public static PROPERTYKEY Compression - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 10); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 10); /// /// Name: System.Video.Director -- PKEY_Video_Director @@ -6741,7 +6602,7 @@ public static partial class Ole32 /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 20 (PIDMSI_DIRECTOR) /// public static PROPERTYKEY Director - => new PROPERTYKEY(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 20); + => new(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 20); /// /// Name: System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate @@ -6750,7 +6611,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 8 (PIDVSI_DATA_RATE) /// public static PROPERTYKEY EncodingBitrate - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 8); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 8); /// /// Name: System.Video.FourCC -- PKEY_Video_FourCC @@ -6759,7 +6620,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 44 /// public static PROPERTYKEY FourCC - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 44); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 44); /// /// Name: System.Video.FrameHeight -- PKEY_Video_FrameHeight @@ -6768,7 +6629,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 4 /// public static PROPERTYKEY FrameHeight - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 4); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 4); /// /// Name: System.Video.FrameRate -- PKEY_Video_FrameRate @@ -6777,7 +6638,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 6 (PIDVSI_FRAME_RATE) /// public static PROPERTYKEY FrameRate - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 6); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 6); /// /// Name: System.Video.FrameWidth -- PKEY_Video_FrameWidth @@ -6786,18 +6647,16 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 3 /// public static PROPERTYKEY FrameWidth - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 3); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 3); /// /// Name: System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio - /// - /// Description: Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY, like 16:9. - /// + /// Description: Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY, like 16:9. /// Type: UInt32 -- VT_UI4 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 42 /// public static PROPERTYKEY HorizontalAspectRatio - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 42); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 42); /// /// Name: System.Video.SampleSize -- PKEY_Video_SampleSize @@ -6806,7 +6665,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 9 (PIDVSI_SAMPLE_SIZE) /// public static PROPERTYKEY SampleSize - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 9); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 9); /// /// Name: System.Video.StreamName -- PKEY_Video_StreamName @@ -6815,7 +6674,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 2 (PIDVSI_STREAM_NAME) /// public static PROPERTYKEY StreamName - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 2); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 2); /// /// Name: System.Video.StreamNumber -- PKEY_Video_StreamNumber @@ -6824,7 +6683,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 11 (PIDVSI_STREAM_NUMBER) /// public static PROPERTYKEY StreamNumber - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 11); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 11); /// /// Name: System.Video.TotalBitrate -- PKEY_Video_TotalBitrate @@ -6833,7 +6692,7 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 43 (PIDVSI_TOTAL_BITRATE) /// public static PROPERTYKEY TotalBitrate - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 43); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 43); /// /// Name: System.Video.TranscodedForSync -- PKEY_Video_TranscodedForSync @@ -6842,18 +6701,16 @@ public static partial class Ole32 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 46 /// public static PROPERTYKEY TranscodedForSync - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 46); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 46); /// /// Name: System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio - /// - /// Description: Indicates the vertical portion of the aspect ratio. The Y portion of XX:YY, like 16:9. - /// + /// Description: Indicates the vertical portion of the aspect ratio. The Y portion of XX:YY, like 16:9. /// Type: UInt32 -- VT_UI4 /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 45 /// public static PROPERTYKEY VerticalAspectRatio - => new PROPERTYKEY(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 45); + => new(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 45); } /// Volume Properties @@ -6868,7 +6725,7 @@ public static partial class Ole32 /// /// public static PROPERTYKEY FileSystem - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 4); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 4); /// /// Name: System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive @@ -6877,7 +6734,7 @@ public static partial class Ole32 /// FormatID: {149C0B69-2C2D-48FC-808F-D318D78C4636}, 2 /// public static PROPERTYKEY IsMappedDrive - => new PROPERTYKEY(new Guid("{149C0B69-2C2D-48FC-808F-D318D78C4636}"), 2); + => new(new Guid("{149C0B69-2C2D-48FC-808F-D318D78C4636}"), 2); /// /// Name: System.Volume.IsRoot -- PKEY_Volume_IsRoot @@ -6886,7 +6743,7 @@ public static partial class Ole32 /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 10 (Filesystem Volume Properties) /// public static PROPERTYKEY IsRoot - => new PROPERTYKEY(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 10); + => new(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 10); } } } diff --git a/PInvoke/Ole/Ole32/WTypes.cs b/PInvoke/Ole/Ole32/WTypes.cs index 3e563a83..69526757 100644 --- a/PInvoke/Ole/Ole32/WTypes.cs +++ b/PInvoke/Ole/Ole32/WTypes.cs @@ -424,7 +424,7 @@ public static partial class Ole32 /// pointer to the element type. /// /// - public static Type GetCorrespondingType(this VARTYPE vt) + public static Type? GetCorrespondingType(this VARTYPE vt) { var elemVT = vt & ~(VARTYPE)0xF000; var specVT = vt & (VARTYPE)0xF000; diff --git a/PInvoke/Ole/Ole32/coml2api.cs b/PInvoke/Ole/Ole32/coml2api.cs index 9ea399aa..0185f486 100644 --- a/PInvoke/Ole/Ole32/coml2api.cs +++ b/PInvoke/Ole/Ole32/coml2api.cs @@ -477,7 +477,7 @@ public static partial class Ole32 // *pwcsName, DWORD grfMode, DWORD reserved, IStorage **ppstgOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "3292484b-8eff-438d-b989-b58ae323872b")] - public static extern HRESULT StgCreateDocfile([MarshalAs(UnmanagedType.LPWStr)] string pwcsName, STGM grfMode, [Optional] uint reserved, out IStorage ppstgOpen); + public static extern HRESULT StgCreateDocfile([MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, [Optional] uint reserved, out IStorage ppstgOpen); /// /// The StgCreateDocfileOnILockBytes function creates and opens a new compound file storage object on top of a byte-array @@ -644,150 +644,58 @@ public static partial class Ole32 public static extern HRESULT StgCreatePropStg([In, MarshalAs(UnmanagedType.IUnknown)] object pUnk, in Guid fmtid, in Guid pclsid, PROPSETFLAG grfFlags, [Optional] uint dwReserved, out IPropertyStorage ppPropStg); /// - /// - /// The StgCreateStorageEx function creates a new storage object using a provided implementation for the IStorage or - /// IPropertySetStorage interfaces. To open an existing file, use the StgOpenStorageEx function instead. - /// - /// - /// Applications written for Windows 2000, Windows Server 2003 and Windows XP must use StgCreateStorageEx rather than - /// StgCreateDocfile to take advantage of the enhanced Windows 2000 and Windows XP Structured Storage features. - /// + /// The StgCreatePropStg function creates and opens a property set in a specified storage or stream object. The property set + /// supplies the system-provided, stand-alone implementation of the IPropertyStorage interface. /// - /// - /// - /// A pointer to the path of the file to create. It is passed uninterpreted to the file system. This can be a relative name or - /// NULL. If NULL, a temporary file is allocated with a unique name. If non- NULL, the string size must not - /// exceed MAX_PATH characters. - /// - /// Windows 2000: Unlike the CreateFile function, you cannot exceed the MAX_PATH limit by using the "\?" prefix. + /// + /// A pointer to the IUnknown interface on the storage or stream object that stores the new property set. /// - /// - /// A value that specifies the access mode to use when opening the new storage object. For more information, see STGM Constants. If - /// the caller specifies transacted mode together with STGM_CREATE or STGM_CONVERT, the overwrite or conversion takes place when the - /// commit operation is called for the root storage. If IStorage::Commit is not called for the root storage object, previous contents - /// of the file will be restored. STGM_CREATE and STGM_CONVERT cannot be combined with the STGM_NOSNAPSHOT flag, because a snapshot - /// copy is required when a file is overwritten or converted in the transacted mode. + /// The FMTID of the property set to be created. + /// + /// A Pointer to the initial CLSID for this property set. May be NULL, in which case pclsid is set to all zeroes. /// - /// A value that specifies the storage file format. For more information, see the STGFMT enumeration. - /// - /// A value that depends on the value of the stgfmt parameter. - /// - /// - /// Parameter Values - /// Meaning - /// - /// - /// STGFMT_DOCFILE - /// - /// 0, or FILE_FLAG_NO_BUFFERING. For more information, see CreateFile. If the sector size of the file, specified in pStgOptions, is - /// not an integer multiple of the underlying disk's physical sector size, this operation will fail. - /// - /// - /// - /// All other values of stgfmt - /// Must be 0. - /// - /// + /// The values from PROPSETFLAG Constants that determine how the property set is created and opened. + /// Reserved; must be zero. + /// + /// The address of an IPropertyStorage* pointer variable that receives the interface pointer to the new property set. /// - /// - /// The pStgOptions parameter is valid only if the stgfmt parameter is set to STGFMT_DOCFILE. If the stgfmt parameter is set to - /// STGFMT_DOCFILE, pStgOptions points to the STGOPTIONS structure, which specifies features of the storage object, such as the - /// sector size. This parameter may be NULL, which creates a storage object with a default sector size of 512 bytes. If non- - /// NULL, the ulSectorSize member must be set to either 512 or 4096. If set to 4096, STGM_SIMPLE may not be specified - /// in the grfMode parameter. The usVersion member must be set before calling StgCreateStorageEx. For more information, - /// see STGOPTIONS. - /// - /// - /// - /// Enables the ACLs to be set when the file is created. If not NULL, needs to be a pointer to the SECURITY_ATTRIBUTES - /// structure. See CreateFile for information on how to set ACLs on files. - /// - /// Windows Server 2003, Windows 2000 Server, Windows XP and Windows 2000 Professional: Value must be NULL. - /// - /// - /// A value that specifies the interface identifier (IID) of the interface pointer to return. This IID may be for the IStorage - /// interface or the IPropertySetStorage interface. - /// - /// - /// A pointer to an interface pointer variable that receives a pointer for an interface on the new storage object; contains - /// NULL if operation failed. - /// - /// - /// This function can also return any file system errors or system errors wrapped in an HRESULT. For more information, see - /// Error Handling Strategies and Handling Unknown Errors. - /// + /// This function supports the standard return values E_INVALIDARG and E_UNEXPECTED, in addition to the following: /// /// - /// When an application modifies its file, it usually creates a copy of the original. The StgCreateStorageEx function is one - /// way for creating a copy. This function works indirectly with the Encrypting File System (EFS) duplication API. When you use this - /// function, you will need to set the options for the file storage in the STGOPTIONS structure. + /// StgCreatePropStg creates and opens a new property set which supplies the system-provided, stand-alone implementation of + /// the IPropertyStorage interface. The new property set is contained in the storage or stream object specified by pUnk. The value of + /// the grfFlags parameter indicates whether pUnk specifies a storage or stream object. For example, if PROPSETFLAG_NONSIMPLE is set, + /// then pUnk can be queried for an IStorage interface on a storage object. /// /// - /// StgCreateStorageEx is a superset of the StgCreateDocfile function, and should be used by new code. Future enhancements to - /// Structured Storage will be exposed through the StgCreateStorageEx function. See the following Requirements section for - /// information on supported platforms. + /// In either case, this function calls pUnk->AddRef for the storage or stream object containing the property set. It is the + /// responsibility of the caller to release the object when it is no longer needed. /// /// - /// The StgCreateStorageEx function creates a new storage object using one of the system-provided, structured-storage - /// implementations. This function can be used to obtain an IStorage compound file implementation, an IPropertySetStorage compound - /// file implementation, or to obtain an IPropertySetStorage NTFS implementation. + /// This function is similar to the IPropertySetStorage::Create method. However, StgCreatePropStg adds the pUnk parameter and + /// supports the PROPSETFLAG_UNBUFFERED value for the grfFlags parameter. Use this function instead of the Create method if + /// you have an IStorage interface that does not support the IPropertySetStorage interface, or if you want to use the + /// PROPSETFLAG_UNBUFFERED value. For more information about using this PROPSETFLAG_UNBUFFERED enumeration value, see PROPSETFLAG Constants. /// /// - /// When a new file is created, the storage implementation used depends on the flag that you specify and on the type of drive on - /// which the file is stored. For more information, see the STGFMT enumeration. + /// The property set automatically contains code page and locale identifier (ID) properties. These are set to the current system + /// default and the current user default, respectively. /// /// - /// StgCreateStorageEx creates the file if it does not exist. If it does exist, the use of the STGM_CREATE, STGM_CONVERT, and - /// STGM_FAILIFTHERE flags in the grfMode parameter indicate how to proceed. For more information on these values, see STGM - /// Constants. It is not valid, in direct mode, to specify the STGM_READ mode in the grfMode parameter (direct mode is indicated by - /// not specifying the STGM_TRANSACTED flag). This function cannot be used to open an existing file; use the StgOpenStorageEx - /// function instead. + /// The grfFlags parameter is a combination of values taken from PROPSETFLAG Constants. The new enumeration value + /// PROPSETFLAG_UNBUFFERED is supported. For more information, see PROPSETFLAG Constants. /// /// - /// You can use the StgCreateStorageEx function to get access to the root storage of a structured-storage document or the - /// property set storage of any file that supports property sets. See the STGFMT documentation for information about which IIDs are - /// supported for different STGFMT values. - /// - /// - /// When a file is created with this function to access the NTFS property set implementation, special sharing rules apply. For more - /// information, see IPropertySetStorage-NTFS Implementation. - /// - /// - /// If a compound file is created in transacted mode (by specifying STGM_TRANSACTED) and read-only mode (by specifying STGM_READ), it - /// is possible to make changes to the returned storage object. For example, it is possible to call IStorage::CreateStream. However, - /// it is not possible to commit those changes by calling IStorage::Commit. Therefore, such changes will be lost. - /// - /// - /// Specifying STGM_SIMPLE provides a much faster implementation of a compound file object in a limited, but frequently used case - /// involving applications that require a compound file implementation with multiple streams and no storages. For more information, - /// see STGM Constants. It is not valid to specify that STGM_TRANSACTED if STGM_SIMPLE is specified. - /// - /// - /// The simple mode does not support all the methods on IStorage. Specifically, in simple mode, supported IStorage methods are - /// CreateStream, Commit, and SetClass as well as the COM IUnknown methods of QueryInterface, AddRef and Release. In addition, - /// SetElementTimes is supported with a NULL name, allowing applications to set times on a root storage. All the other methods - /// of IStorage return STG_E_INVALIDFUNCTION. - /// - /// - /// If the grfMode parameter specifies STGM_TRANSACTED and no file yet exists with the name specified by the pwcsName parameter, the - /// file is created immediately. In an access-controlled file system, the caller must have write permissions for the file system - /// directory in which the compound file is created. If STGM_TRANSACTED is not specified, and STGM_CREATE is specified, an existing - /// file with the same name is destroyed before creating the new file. - /// - /// - /// You can also use StgCreateStorageEx to create a temporary compound file by passing a NULL value for the pwcsName - /// parameter. However, these files are temporary only in the sense that they have a unique system-provided name – one that is - /// probably meaningless to the user. The caller is responsible for deleting the temporary file when finished with it, unless - /// STGM_DELETEONRELEASE was specified for the grfMode parameter. For more information on these flags, see STGM Constants. + /// This function is exported out of the redistributable Iprop.dll, which is included in Windows NT 4.0 with Service Pack 2 (SP2) and + /// later and available as a redistributable in Windows 95, Windows 98 and later. In Windows 2000 and Windows XP, it is exported out + /// of ole32.dll. It can also be exported out of iprop.dll in Windows 2000 and Windows XP, but the call gets forwarded to ole32.dll. /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/coml2api/nf-coml2api-stgcreatestorageex HRESULT StgCreateStorageEx( const - // WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, PSECURITY_DESCRIPTOR pSecurityDescriptor, - // REFIID riid, void **ppObjectOpen ); + // https://docs.microsoft.com/en-us/windows/desktop/api/coml2api/nf-coml2api-stgcreatepropstg HRESULT StgCreatePropStg( IUnknown + // *pUnk, REFFMTID fmtid, const CLSID *pclsid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] - [PInvokeData("coml2api.h", MSDNShortId = "6442977d-e980-419e-abe9-9d15dbb045c1")] - public static extern HRESULT StgCreateStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, FileFlagsAndAttributes grfAttrs, in STGOPTIONS pStgOptions, - [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); + [PInvokeData("coml2api.h", MSDNShortId = "fc171888-3723-4894-a356-1b234352c4e8")] + public static extern HRESULT StgCreatePropStg([In, MarshalAs(UnmanagedType.IUnknown)] object pUnk, in Guid fmtid, [In, Optional] IntPtr pclsid, PROPSETFLAG grfFlags, [Optional] uint dwReserved, out IPropertyStorage ppPropStg); /// /// @@ -932,8 +840,156 @@ public static partial class Ole32 // REFIID riid, void **ppObjectOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "6442977d-e980-419e-abe9-9d15dbb045c1")] - public static extern HRESULT StgCreateStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, FileFlagsAndAttributes grfAttrs, [Optional] IntPtr pStgOptions, - [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); + public static extern HRESULT StgCreateStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, + FileFlagsAndAttributes grfAttrs, in STGOPTIONS pStgOptions, [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); + + /// + /// + /// The StgCreateStorageEx function creates a new storage object using a provided implementation for the IStorage or + /// IPropertySetStorage interfaces. To open an existing file, use the StgOpenStorageEx function instead. + /// + /// + /// Applications written for Windows 2000, Windows Server 2003 and Windows XP must use StgCreateStorageEx rather than + /// StgCreateDocfile to take advantage of the enhanced Windows 2000 and Windows XP Structured Storage features. + /// + /// + /// + /// + /// A pointer to the path of the file to create. It is passed uninterpreted to the file system. This can be a relative name or + /// NULL. If NULL, a temporary file is allocated with a unique name. If non- NULL, the string size must not + /// exceed MAX_PATH characters. + /// + /// Windows 2000: Unlike the CreateFile function, you cannot exceed the MAX_PATH limit by using the "\?" prefix. + /// + /// + /// A value that specifies the access mode to use when opening the new storage object. For more information, see STGM Constants. If + /// the caller specifies transacted mode together with STGM_CREATE or STGM_CONVERT, the overwrite or conversion takes place when the + /// commit operation is called for the root storage. If IStorage::Commit is not called for the root storage object, previous contents + /// of the file will be restored. STGM_CREATE and STGM_CONVERT cannot be combined with the STGM_NOSNAPSHOT flag, because a snapshot + /// copy is required when a file is overwritten or converted in the transacted mode. + /// + /// A value that specifies the storage file format. For more information, see the STGFMT enumeration. + /// + /// A value that depends on the value of the stgfmt parameter. + /// + /// + /// Parameter Values + /// Meaning + /// + /// + /// STGFMT_DOCFILE + /// + /// 0, or FILE_FLAG_NO_BUFFERING. For more information, see CreateFile. If the sector size of the file, specified in pStgOptions, is + /// not an integer multiple of the underlying disk's physical sector size, this operation will fail. + /// + /// + /// + /// All other values of stgfmt + /// Must be 0. + /// + /// + /// + /// + /// The pStgOptions parameter is valid only if the stgfmt parameter is set to STGFMT_DOCFILE. If the stgfmt parameter is set to + /// STGFMT_DOCFILE, pStgOptions points to the STGOPTIONS structure, which specifies features of the storage object, such as the + /// sector size. This parameter may be NULL, which creates a storage object with a default sector size of 512 bytes. If non- + /// NULL, the ulSectorSize member must be set to either 512 or 4096. If set to 4096, STGM_SIMPLE may not be specified + /// in the grfMode parameter. The usVersion member must be set before calling StgCreateStorageEx. For more information, + /// see STGOPTIONS. + /// + /// + /// + /// Enables the ACLs to be set when the file is created. If not NULL, needs to be a pointer to the SECURITY_ATTRIBUTES + /// structure. See CreateFile for information on how to set ACLs on files. + /// + /// Windows Server 2003, Windows 2000 Server, Windows XP and Windows 2000 Professional: Value must be NULL. + /// + /// + /// A value that specifies the interface identifier (IID) of the interface pointer to return. This IID may be for the IStorage + /// interface or the IPropertySetStorage interface. + /// + /// + /// A pointer to an interface pointer variable that receives a pointer for an interface on the new storage object; contains + /// NULL if operation failed. + /// + /// + /// This function can also return any file system errors or system errors wrapped in an HRESULT. For more information, see + /// Error Handling Strategies and Handling Unknown Errors. + /// + /// + /// + /// When an application modifies its file, it usually creates a copy of the original. The StgCreateStorageEx function is one + /// way for creating a copy. This function works indirectly with the Encrypting File System (EFS) duplication API. When you use this + /// function, you will need to set the options for the file storage in the STGOPTIONS structure. + /// + /// + /// StgCreateStorageEx is a superset of the StgCreateDocfile function, and should be used by new code. Future enhancements to + /// Structured Storage will be exposed through the StgCreateStorageEx function. See the following Requirements section for + /// information on supported platforms. + /// + /// + /// The StgCreateStorageEx function creates a new storage object using one of the system-provided, structured-storage + /// implementations. This function can be used to obtain an IStorage compound file implementation, an IPropertySetStorage compound + /// file implementation, or to obtain an IPropertySetStorage NTFS implementation. + /// + /// + /// When a new file is created, the storage implementation used depends on the flag that you specify and on the type of drive on + /// which the file is stored. For more information, see the STGFMT enumeration. + /// + /// + /// StgCreateStorageEx creates the file if it does not exist. If it does exist, the use of the STGM_CREATE, STGM_CONVERT, and + /// STGM_FAILIFTHERE flags in the grfMode parameter indicate how to proceed. For more information on these values, see STGM + /// Constants. It is not valid, in direct mode, to specify the STGM_READ mode in the grfMode parameter (direct mode is indicated by + /// not specifying the STGM_TRANSACTED flag). This function cannot be used to open an existing file; use the StgOpenStorageEx + /// function instead. + /// + /// + /// You can use the StgCreateStorageEx function to get access to the root storage of a structured-storage document or the + /// property set storage of any file that supports property sets. See the STGFMT documentation for information about which IIDs are + /// supported for different STGFMT values. + /// + /// + /// When a file is created with this function to access the NTFS property set implementation, special sharing rules apply. For more + /// information, see IPropertySetStorage-NTFS Implementation. + /// + /// + /// If a compound file is created in transacted mode (by specifying STGM_TRANSACTED) and read-only mode (by specifying STGM_READ), it + /// is possible to make changes to the returned storage object. For example, it is possible to call IStorage::CreateStream. However, + /// it is not possible to commit those changes by calling IStorage::Commit. Therefore, such changes will be lost. + /// + /// + /// Specifying STGM_SIMPLE provides a much faster implementation of a compound file object in a limited, but frequently used case + /// involving applications that require a compound file implementation with multiple streams and no storages. For more information, + /// see STGM Constants. It is not valid to specify that STGM_TRANSACTED if STGM_SIMPLE is specified. + /// + /// + /// The simple mode does not support all the methods on IStorage. Specifically, in simple mode, supported IStorage methods are + /// CreateStream, Commit, and SetClass as well as the COM IUnknown methods of QueryInterface, AddRef and Release. In addition, + /// SetElementTimes is supported with a NULL name, allowing applications to set times on a root storage. All the other methods + /// of IStorage return STG_E_INVALIDFUNCTION. + /// + /// + /// If the grfMode parameter specifies STGM_TRANSACTED and no file yet exists with the name specified by the pwcsName parameter, the + /// file is created immediately. In an access-controlled file system, the caller must have write permissions for the file system + /// directory in which the compound file is created. If STGM_TRANSACTED is not specified, and STGM_CREATE is specified, an existing + /// file with the same name is destroyed before creating the new file. + /// + /// + /// You can also use StgCreateStorageEx to create a temporary compound file by passing a NULL value for the pwcsName + /// parameter. However, these files are temporary only in the sense that they have a unique system-provided name – one that is + /// probably meaningless to the user. The caller is responsible for deleting the temporary file when finished with it, unless + /// STGM_DELETEONRELEASE was specified for the grfMode parameter. For more information on these flags, see STGM Constants. + /// + /// + // https://docs.microsoft.com/en-us/windows/desktop/api/coml2api/nf-coml2api-stgcreatestorageex HRESULT StgCreateStorageEx( const + // WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, PSECURITY_DESCRIPTOR pSecurityDescriptor, + // REFIID riid, void **ppObjectOpen ); + [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] + [PInvokeData("coml2api.h", MSDNShortId = "6442977d-e980-419e-abe9-9d15dbb045c1")] + public static extern HRESULT StgCreateStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, + FileFlagsAndAttributes grfAttrs, [Optional] IntPtr pStgOptions, [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); /// The StgIsStorageFile function indicates whether a particular disk file contains a storage object. /// @@ -1119,7 +1175,8 @@ public static partial class Ole32 // *pwcsName, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "5ff18dc8-b24f-42bb-8c32-efc4d3696687")] - public static extern HRESULT StgOpenStorage([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, [In, Optional] IStorage pstgPriority, STGM grfMode, SNB snbExclude, [Optional] uint reserved, out IStorage ppstgOpen); + public static extern HRESULT StgOpenStorage([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, [In, Optional] IStorage? pstgPriority, + STGM grfMode, [Optional] SNB? snbExclude, [Optional] uint reserved, out IStorage ppstgOpen); /// /// @@ -1241,8 +1298,9 @@ public static partial class Ole32 // riid, void **ppObjectOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "4f2138fb-1f80-4345-a3cb-9c11023457b1")] - public static extern HRESULT StgOpenStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, FileFlagsAndAttributes grfAttrs, in STGOPTIONS pStgOptions, - [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); + public static extern HRESULT StgOpenStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, + FileFlagsAndAttributes grfAttrs, in STGOPTIONS pStgOptions, [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); /// /// @@ -1364,8 +1422,9 @@ public static partial class Ole32 // riid, void **ppObjectOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "4f2138fb-1f80-4345-a3cb-9c11023457b1")] - public static extern HRESULT StgOpenStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, FileFlagsAndAttributes grfAttrs, [Optional] IntPtr pStgOptions, - [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); + public static extern HRESULT StgOpenStorageEx([In, Optional, MarshalAs(UnmanagedType.LPWStr)] string? pwcsName, STGM grfMode, STGFMT stgfmt, + FileFlagsAndAttributes grfAttrs, [Optional] IntPtr pStgOptions, [Optional] PSECURITY_DESCRIPTOR pSecurityDescriptor, in Guid riid, + [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 6)] out object ppObjectOpen); /// /// The StgOpenStorageOnILockBytes function opens an existing storage object that does not reside in a disk file, but instead @@ -1431,7 +1490,8 @@ public static partial class Ole32 // **ppstgOpen ); [DllImport(Lib.Ole32, SetLastError = false, ExactSpelling = true)] [PInvokeData("coml2api.h", MSDNShortId = "7920bd46-0a8f-42e0-9988-59d85edb64e2")] - public static extern HRESULT StgOpenStorageOnILockBytes([In] ILockBytes plkbyt, [In, Optional] IStorage pstgPriority, STGM grfMode, SNB snbExclude, [Optional] uint reserved, out IStorage ppstgOpen); + public static extern HRESULT StgOpenStorageOnILockBytes([In] ILockBytes plkbyt, [In, Optional] IStorage? pstgPriority, STGM grfMode, + SNB? snbExclude, [Optional] uint reserved, out IStorage ppstgOpen); /// /// The StgSetTimes function sets the creation, access, and modification times of the indicated file, if supported by the diff --git a/PInvoke/Ole/OleAut32/OAIdl.Interfaces.cs b/PInvoke/Ole/OleAut32/OAIdl.Interfaces.cs index 4c422bb0..f01d4384 100644 --- a/PInvoke/Ole/OleAut32/OAIdl.Interfaces.cs +++ b/PInvoke/Ole/OleAut32/OAIdl.Interfaces.cs @@ -1,6 +1,10 @@ using System; +using System.Collections.Generic; +using System.Linq; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; +using Vanara.Extensions; +using Vanara.InteropServices; using DISPPARAMS = System.Runtime.InteropServices.ComTypes.DISPPARAMS; using EXCEPINFO = System.Runtime.InteropServices.ComTypes.EXCEPINFO; using FUNCDESC = System.Runtime.InteropServices.ComTypes.FUNCDESC; @@ -3592,7 +3596,222 @@ public static partial class OleAut32 // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke HRESULT Invoke(DISPID dispIdMember, REFIID // riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); [System.Security.SecurityCritical] - void Invoke(int dispIdMember, [Optional] in Guid riid, LCID lcid, INVOKEKIND wFlags, ref DISPPARAMS pDispParams, [Optional] IntPtr pVarResult, [Optional] IntPtr pExcepInfo, [Optional] IntPtr puArgErr); + void Invoke(int dispIdMember, [Optional] in Guid riid, LCID lcid, ushort wFlags, ref DISPPARAMS pDispParams, out object? pVarResult, + out EXCEPINFO pExcepInfo, out uint puArgErr); + } + + /// + /// Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on + /// subsequent calls to Invoke. The dispatch function DispGetIDsOfNames provides a standard implementation of GetIDsOfNames. + /// + /// The IDispatch source object. + /// The array of names to be mapped. + /// + /// An array, each element of which contains an identifier (ID) corresponding to one of the names passed in the + /// array. The first element represents the member name. The subsequent elements represent each of the member's parameters. + /// + /// + /// + /// An IDispatch implementation can associate any positive integer ID value with a given name. Zero is reserved for the default, + /// or Value property; –1 is reserved to indicate an unknown name; and other negative values are defined for other + /// purposes. For example, if GetIDsOfNames is called, and the implementation does not recognize one or more of the + /// names, it returns DISP_E_UNKNOWNNAME, and the rgDispId array contains DISPID_UNKNOWN for the entries that correspond to the + /// unknown names. + /// + /// + /// The member and parameter DISPIDs must remain constant for the lifetime of the object. This allows a client to obtain the + /// DISPIDs once, and cache them for later use. + /// + /// + /// When GetIDsOfNames is called with more than one name, the first name (rgszNames[0]) corresponds to the member name, + /// and subsequent names correspond to the names of the member's parameters. + /// + /// + /// The same name may map to different DISPIDs, depending on context. For example, a name may have a DISPID when it is used as a + /// member name with a particular interface, a different ID as a member of a different interface, and different mapping for each + /// time it appears as a parameter. + /// + /// + /// GetIDsOfNames is used when an IDispatch client binds to names at run time. To bind at compile time instead, an + /// IDispatch client can map names to DISPIDs by using the type information interfaces described in Type Description + /// Interfaces. This allows a client to bind to members at compile time and avoid calling GetIDsOfNames at run time. For + /// a description of binding at compile time, see Type Description Interfaces. + /// + /// + /// The implementation of GetIDsOfNames is case insensitive. Users that need case-sensitive name mapping should use type + /// information interfaces to map names to DISPIDs, rather than call GetIDsOfNames. + /// + /// + /// Caution You cannot use this method to access values that have been added dynamically, such as values added through + /// JavaScript. Instead, use the GetDispID of the IDispatchEx interface. For more information, see the IDispatchEx interface. + /// + /// + public static int[] GetIDsOfNames(this IDispatch source, params string[] names) + { + if (source is null) + throw new ArgumentNullException(nameof(source)); + if (names is null || names.Any(s => string.IsNullOrEmpty(s))) + throw new ArgumentNullException(nameof(names)); + var ids = new int[names.Length]; + source.GetIDsOfNames(Guid.Empty, names, (uint)names.Length, LCID.LOCALE_SYSTEM_DEFAULT, ids); + return ids; + } + + /// + /// Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on subsequent + /// calls to Invoke. The dispatch function DispGetIDsOfNames provides a standard implementation of GetIDsOfNames. + /// + /// The IDispatch source object. + /// The name to be mapped. + /// An identifier (ID) corresponding to the name passed in . + /// + /// + /// An IDispatch implementation can associate any positive integer ID value with a given name. Zero is reserved for the default, or + /// Value property; –1 is reserved to indicate an unknown name; and other negative values are defined for other purposes. For + /// example, if GetIDsOfNames is called, and the implementation does not recognize one or more of the names, it returns + /// DISP_E_UNKNOWNNAME, and the rgDispId array contains DISPID_UNKNOWN for the entries that correspond to the unknown names. + /// + /// + /// The member and parameter DISPIDs must remain constant for the lifetime of the object. This allows a client to obtain the DISPIDs + /// once, and cache them for later use. + /// + /// + /// When GetIDsOfNames is called with more than one name, the first name (rgszNames[0]) corresponds to the member name, and + /// subsequent names correspond to the names of the member's parameters. + /// + /// + /// The same name may map to different DISPIDs, depending on context. For example, a name may have a DISPID when it is used as a member + /// name with a particular interface, a different ID as a member of a different interface, and different mapping for each time it appears + /// as a parameter. + /// + /// + /// GetIDsOfNames is used when an IDispatch client binds to names at run time. To bind at compile time instead, an + /// IDispatch client can map names to DISPIDs by using the type information interfaces described in Type Description Interfaces. + /// This allows a client to bind to members at compile time and avoid calling GetIDsOfNames at run time. For a description of + /// binding at compile time, see Type Description Interfaces. + /// + /// + /// The implementation of GetIDsOfNames is case insensitive. Users that need case-sensitive name mapping should use type + /// information interfaces to map names to DISPIDs, rather than call GetIDsOfNames. + /// + /// + /// Caution You cannot use this method to access values that have been added dynamically, such as values added through JavaScript. + /// Instead, use the GetDispID of the IDispatchEx interface. For more information, see the IDispatchEx interface. + /// + /// + public static int GetID(this IDispatch source, string name) => GetIDsOfNames(source, new[] { name })[0]; + + /// + /// Provides access to properties and methods exposed by an object. The dispatch function DispInvoke provides a standard implementation + /// of Invoke. + /// + /// The expected return type. + /// The IDispatch source object. + /// + /// Flags describing the context of the Invoke call. + /// + /// + /// Value + /// Meaning + /// + /// + /// DISPATCH_METHOD + /// The member is invoked as a method. If a property has the same name, both this and the DISPATCH_PROPERTYGET flag can be set. + /// + /// + /// DISPATCH_PROPERTYGET + /// The member is retrieved as a property or data member. + /// + /// + /// DISPATCH_PROPERTYPUT + /// The member is changed as a property or data member. + /// + /// + /// DISPATCH_PROPERTYPUTREF + /// + /// The member is changed by a reference assignment, rather than a value assignment. This flag is valid only when the property accepts a + /// reference to an object. + /// + /// + /// + /// + /// Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier. + /// An array of arguments. + /// + /// Pointer to the location where the result is to be stored, or NULL if the caller expects no result. This argument is ignored if + /// DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF is specified. + /// + /// source + /// + /// Unable to cast source to IDispatch - source or At least one argument must be specified for DISPATCH_PROPERTYPUT + /// + /// + /// + /// Generally, you should not implement Invoke directly. Instead, use the dispatch interface to create functions CreateStdDispatch + /// and DispInvoke. For details, refer to CreateStdDispatch, DispInvoke, Creating the IDispatch Interface and Exposing + /// ActiveX Objects. + /// + /// + /// If some application-specific processing needs to be performed before calling a member, the code should perform the necessary actions, + /// and then call ITypeInfo::Invoke to invoke the member. ITypeInfo::Invoke acts exactly like Invoke. The standard + /// implementations of Invoke created by CreateStdDispatch and DispInvoke defer to ITypeInfo::Invoke. + /// + /// + /// In an ActiveX client, Invoke should be used to get and set the values of properties, or to call a method of an ActiveX object. + /// The dispIdMember argument identifies the member to invoke. The DISPIDs that identify members are defined by the implementor of the + /// object and can be determined by using the object's documentation, the IDispatch::GetIDsOfNames function, or the ITypeInfo interface. + /// + /// + /// When you use IDispatch::Invoke() with DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF, you have to specially initialize the + /// cNamedArgs and rgdispidNamedArgs elements of your DISPPARAMS structure with the following: + /// + /// + /// The information that follows addresses developers of ActiveX clients and others who use code to expose ActiveX objects. It describes + /// the behavior that users of exposed objects should expect. + /// + /// + public static T? Invoke(this IDispatch source, INVOKEKIND invokeFlags, int dispId, params object[] args) + { + if (source is null) + throw new ArgumentNullException(nameof(source)); + args ??= new object[0]; + + DISPPARAMS dp = default; + if (invokeFlags == INVOKEKIND.INVOKE_PROPERTYPUT) + { + // There must be at least one argument specified; only one if it is a non-indexed property and + // multiple if there are index values as well as the value to set to + if (args.Length < 1) + throw new ArgumentException("At least one argument must be specified for DISPATCH_PROPERTYPUT"); + + dp.cNamedArgs = 1; + dp.rgdispidNamedArgs = dispId.MarshalToPtr(Marshal.AllocCoTaskMem, out _); + } + + // Convert parameters to VARIANTs in reverse order and store in array. + if (args.Length > 0) + { + dp.rgvarg = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(VARIANT)) * args.Length); + dp.cArgs = args.Length; + unsafe + { + VARIANT* ptr = (VARIANT*)dp.rgvarg; + for (var i = 0; i < args.Length; i++) + Marshal.GetNativeVariantForObject(args[args.Length - 1 - i], (IntPtr)(void*)&ptr[i]); + } + } + + // Call Invoke and clean up allocated memory + try + { + source.Invoke(dispId, Guid.Empty, LCID.LOCALE_SYSTEM_DEFAULT, (ushort)invokeFlags, ref dp, out var result, out _, out _); + return (T?)result; + } + finally + { + Marshal.FreeCoTaskMem(dp.rgvarg); + Marshal.FreeCoTaskMem(dp.rgdispidNamedArgs); + } } /// Provides detailed contextual error information. @@ -3706,7 +3925,7 @@ public static partial class OleAut32 /// Errors are logged in the error log that is pointed to by pErrorLog. When pVar->vt specifies another object pointer /// (VT_UNKNOWN), the property bag is responsible for creating and initializing the object described by pszPropName. /// - void Read([In, MarshalAs(UnmanagedType.LPWStr)] string pszPropName, [In, Out] ref object pVar, [In] IErrorLog pErrorLog); + void Read([In, MarshalAs(UnmanagedType.LPWStr)] string pszPropName, [In, Out, MarshalAs(UnmanagedType.Struct)] ref object pVar, [In] IErrorLog? pErrorLog); /// Tells the property bag to save the named property in a caller-initialized VARIANT. /// The address of a string containing the name of the property to write. This cannot be NULL. @@ -3728,7 +3947,7 @@ public static partial class OleAut32 /// specific location. This avoids potential extra copy operations that might be involved with other property-based persistence mechanisms. /// /// - void Write([In, MarshalAs(UnmanagedType.LPWStr)] string pszPropName, in object pVar); + void Write([In, MarshalAs(UnmanagedType.LPWStr)] string pszPropName, [MarshalAs(UnmanagedType.Struct)] in object pVar); } /// Provides an object with a property bag in which the object can save its properties persistently. @@ -3792,8 +4011,9 @@ public static partial class OleAut32 /// // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768194%28v%3dvs.85%29 // HRESULT retVal = object.Read(cProperties, pPropBag, pErrLog, pvarValue, phrError); - void Read(uint cProperties, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] PROPBAG2[] pPropBag, [Optional] IErrorLog pErrLog, - [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] object[] pvarValue, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] HRESULT[] phrError); + void Read(uint cProperties, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] PROPBAG2[] pPropBag, [Optional] IErrorLog? pErrLog, + [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0, ArraySubType = UnmanagedType.Struct)] object[] pvarValue, + [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] HRESULT[] phrError); /// Causes one or more properties to be saved into the property bag. /// @@ -3817,7 +4037,8 @@ public static partial class OleAut32 /// // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768195(v=vs.85) // HRESULT retVal = object.Write(cProperties, pPropBag, pvarValue); - void Write(uint cProperties, PROPBAG2[] pPropBag, VARIANT[] pvarValue); + void Write(uint cProperties, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] PROPBAG2[] pPropBag, + [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0, ArraySubType = UnmanagedType.Struct)] object[] pvarValue); /// Gets the number of properties in the property bag. /// @@ -3860,7 +4081,7 @@ public static partial class OleAut32 /// // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768191(v=vs.85) // HRESULT retVal = object.GetPropertyInfo(iProperty, cProperties, pPropBag, pcProperties); - void GetPropertyInfo( uint iProperty, uint cProperties, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] PROPBAG2[] pPropBag, out uint pcProperties); + void GetPropertyInfo(uint iProperty, uint cProperties, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] PROPBAG2[] pPropBag, out uint pcProperties); /// /// Causes the property bag to instruct a property object that was previously created and initialized to read its persistent properties. @@ -3904,7 +4125,7 @@ public static partial class OleAut32 /// // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768193(v=vs.85) // HRESULT retVal = object.LoadObject(pstrName, dwHint, pUnkObject, pErrLog); - void LoadObject([MarshalAs(UnmanagedType.LPWStr)] string pstrName, uint dwHint, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkObject, [Optional] IErrorLog pErrLog); + void LoadObject([MarshalAs(UnmanagedType.LPWStr)] string pstrName, uint dwHint, [In, MarshalAs(UnmanagedType.IUnknown)] object pUnkObject, [Optional] IErrorLog? pErrLog); } /// @@ -4083,7 +4304,7 @@ public static partial class OleAut32 /// The pointer to the variant. /// // https://docs.microsoft.com/en-us/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-putfield - void PutField(uint wFlags, IntPtr pvData, [MarshalAs(UnmanagedType.LPWStr)] string szFieldName, [In, MarshalAs(UnmanagedType.Struct)] ref object pvarField); + void PutField(INVOKEKIND wFlags, IntPtr pvData, [MarshalAs(UnmanagedType.LPWStr)] string szFieldName, [In, MarshalAs(UnmanagedType.Struct)] in object pvarField); /// /// @@ -4105,7 +4326,7 @@ public static partial class OleAut32 /// The variant to be put into the field. /// // https://docs.microsoft.com/en-us/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-putfieldnocopy - void PutFieldNoCopy(uint wFlags, IntPtr pvData, [MarshalAs(UnmanagedType.LPWStr)] string szFieldName, [In, MarshalAs(UnmanagedType.Struct)] ref object pvarField); + void PutFieldNoCopy(INVOKEKIND wFlags, IntPtr pvData, [MarshalAs(UnmanagedType.LPWStr)] string szFieldName, [In, MarshalAs(UnmanagedType.Struct)] in object pvarField); /// /// Gets the names of the fields of the record. @@ -4130,7 +4351,7 @@ public static partial class OleAut32 /// In case of out of memory, pcNames points to error code. /// // https://docs.microsoft.com/en-us/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-getfieldnames - void GetFieldNames(ref uint pcNames, [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 0)] string[] rgBstrNames); + void GetFieldNames(ref uint pcNames, [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.BStr, SizeParamIndex = 0)] string[]? rgBstrNames); /// /// Determines whether the record that is passed in matches that of the current record information. @@ -4155,7 +4376,9 @@ public static partial class OleAut32 /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/oaidl/nf-oaidl-irecordinfo-ismatchingtype - [PreserveSig] [return: MarshalAs(UnmanagedType.Bool)] bool IsMatchingType([In] IRecordInfo pRecordInfo); + [PreserveSig] + [return: MarshalAs(UnmanagedType.Bool)] + bool IsMatchingType([In] IRecordInfo pRecordInfo); /// /// Allocates memory for a new record, initializes the instance and returns a pointer to the record. @@ -4302,7 +4525,7 @@ public static partial class OleAut32 // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nf-oaidl-itypechangeevents-requesttypechange HRESULT // RequestTypeChange( CHANGEKIND changeKind, ITypeInfo *pTInfoBefore, LPOLESTR pStrName, INT *pfCancel ); [PreserveSig] - HRESULT RequestTypeChange([In] CHANGEKIND changeKind, [In] ITypeInfo pTInfoBefore, [MarshalAs(UnmanagedType.LPWStr)] string pStrName, out int pfCancel); + HRESULT RequestTypeChange([In] CHANGEKIND changeKind, [In] ITypeInfo pTInfoBefore, [MarshalAs(UnmanagedType.LPWStr)] string? pStrName, out bool pfCancel); /// Raised after a type has been changed. /// @@ -4344,6 +4567,6 @@ public static partial class OleAut32 // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nf-oaidl-itypechangeevents-aftertypechange HRESULT AfterTypeChange( // CHANGEKIND changeKind, ITypeInfo *pTInfoAfter, LPOLESTR pStrName ); [PreserveSig] - HRESULT AfterTypeChange([In] CHANGEKIND changeKind, [In] ITypeInfo pTInfoAfter, [MarshalAs(UnmanagedType.LPWStr)] string pStrName); + HRESULT AfterTypeChange([In] CHANGEKIND changeKind, [In] ITypeInfo pTInfoAfter, [MarshalAs(UnmanagedType.LPWStr)] string? pStrName); } } \ No newline at end of file diff --git a/PInvoke/Ole/OleAut32/OAIdl.VARIANT.cs b/PInvoke/Ole/OleAut32/OAIdl.VARIANT.cs index 07453b48..337e8d4d 100644 --- a/PInvoke/Ole/OleAut32/OAIdl.VARIANT.cs +++ b/PInvoke/Ole/OleAut32/OAIdl.VARIANT.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Security.Permissions; using static Vanara.PInvoke.Ole32; namespace Vanara.PInvoke; @@ -2363,6 +2364,59 @@ public static partial class OleAut32 [PInvokeData("oleauto.h", MSDNShortId = "5d9be6cd-92e5-485c-ba0d-8630d3e414b8")] public static extern HRESULT VariantCopyInd(out VARIANT pvarDest, in VARIANT pvargSrc); + /// + /// Frees the destination variant and makes a copy of the source variant, performing the necessary indirection if the source is + /// specified to be VT_BYREF. + /// + /// The destination variant. + /// The source variant. + /// + /// This function can return one of these values. + /// + /// + /// Return code + /// Description + /// + /// + /// S_OK + /// Success. + /// + /// + /// DISP_E_ARRAYISLOCKED + /// The variant contains an array that is locked. + /// + /// + /// DISP_E_BADVARTYPE + /// The variant type is not a valid type of variant. + /// + /// + /// E_INVALIDARG + /// One of the arguments is not valid. + /// + /// + /// E_OUTOFMEMORY + /// Insufficient memory to complete the operation. + /// + /// + /// + /// + /// + /// This function is useful when a copy of a variant is needed, and to guarantee that it is not VT_BYREF, such as when handling + /// arguments in an implementation of IDispatch::Invoke. + /// + /// + /// For example, if the source is a (VT_BYREF | VT_I2), the destination will be a BYVAL | VT_I2. The same is true for all legal + /// VT_BYREF combinations, including VT_VARIANT. + /// + /// If pvargSrc is (VT_BYREF | VT_VARIANT), and the contained variant is VT_BYREF, the contained variant is also dereferenced. + /// This function frees any existing contents of pvarDest. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-variantcopyind HRESULT VariantCopyInd( VARIANT *pvarDest, + // const VARIANTARG *pvargSrc ); + [DllImport(Lib.OleAut32, SetLastError = false, ExactSpelling = true)] + [PInvokeData("oleauto.h", MSDNShortId = "5d9be6cd-92e5-485c-ba0d-8630d3e414b8")] + public static extern HRESULT VariantCopyInd(out VARIANT pvarDest, [In] object pvargSrc); + /// Initializes a variant. /// The variant to initialize. /// This function does not return a value. @@ -3066,5 +3120,13 @@ public static partial class OleAut32 private readonly IntPtr _record; private readonly IntPtr _recordInfo; } + + /// Initializes a new instance of the struct. + /// An object value. + public VARIANT(object o) + { + VariantCopyInd(out var v, o).ThrowIfFailed(); + this = v; + } } } \ No newline at end of file diff --git a/PInvoke/Ole/OleAut32/OAIdl.cs b/PInvoke/Ole/OleAut32/OAIdl.cs index 7f551401..4d3d9920 100644 --- a/PInvoke/Ole/OleAut32/OAIdl.cs +++ b/PInvoke/Ole/OleAut32/OAIdl.cs @@ -1,4 +1,8 @@ using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Runtime.InteropServices; using Vanara.Extensions; using Vanara.InteropServices; @@ -456,7 +460,7 @@ public static partial class OleAut32 public IntPtr prgCustData; /// Gets the array of structures. - public CUSTDATAITEM[] Items => prgCustData.ToArray((int)cCustData); + public CUSTDATAITEM[] Items => prgCustData.ToArray((int)cCustData) ?? new CUSTDATAITEM[0]; } /// Represents a custom data item. diff --git a/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs b/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs index f1f5df15..ea8bd5a2 100644 --- a/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs +++ b/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs @@ -1794,7 +1794,7 @@ public static partial class OleAut32 public static extern HRESULT SafeArrayUnlock(SafeSAFEARRAY psa); /// Represents a safe array. - /// + /// [StructLayout(LayoutKind.Sequential, Pack = 4)] [PInvokeData("OaIdl.h", MSDNShortId = "ms221482")] public struct SAFEARRAY @@ -1852,7 +1852,7 @@ public static partial class OleAut32 ///} /// /// - /// + /// [PInvokeData("OleAuto.h")] public class SafeArrayScopedAccessData : IDisposable { @@ -1883,7 +1883,7 @@ public static partial class OleAut32 } /// Provides a safe handle for items created with . - /// + /// public class SafeDescriptorSAFEARRAY : SafeSAFEARRAY { /// Initializes a new instance of the class and assigns an existing handle. diff --git a/PInvoke/Ole/OleAut32/OleAuto.cs b/PInvoke/Ole/OleAut32/OleAuto.cs index cfa9530c..233d2c93 100644 --- a/PInvoke/Ole/OleAut32/OleAuto.cs +++ b/PInvoke/Ole/OleAut32/OleAuto.cs @@ -1999,7 +1999,7 @@ public static partial class OleAut32 public ushort wFlags; /// The return type for the method. - public Ole32.VARTYPE vtReturn; + public VARTYPE vtReturn; } /// Specifies numeric parsing information. @@ -2077,7 +2077,7 @@ public static partial class OleAut32 public StrPtrUni szName; /// The parameter type. If more than one parameter type is accepted, VT_VARIANT should be specified. - public Ole32.VARTYPE vt; + public VARTYPE vt; } /// Represents an unpacked date. diff --git a/PInvoke/Ole/OleAut32/Wia_xp.cs b/PInvoke/Ole/OleAut32/Wia_xp.cs index 1bc413ab..623cbde7 100644 --- a/PInvoke/Ole/OleAut32/Wia_xp.cs +++ b/PInvoke/Ole/OleAut32/Wia_xp.cs @@ -19,7 +19,7 @@ public static partial class OleAut32 // https://docs.microsoft.com/en-us/windows/win32/api/wia_xp/ns-wia_xp-wia_propid_to_name typedef struct _WIA_PROPID_TO_NAME { // PROPID propid; LPOLESTR pszName; } WIA_PROPID_TO_NAME, *PWIA_PROPID_TO_NAME; [PInvokeData("wia_xp.h")] - public static Dictionary WIA_PROPID_TO_NAME = new Dictionary + public static Dictionary WIA_PROPID_TO_NAME = new() { { WIA_PROPID.WIA_DIP_BAUDRATE , "BaudRate" }, { WIA_PROPID.WIA_DIP_DEV_DESC , "Description" }, diff --git a/PInvoke/Ole/PropSys/PropSys.IPropertyChange.cs b/PInvoke/Ole/PropSys/PropSys.IPropertyChange.cs index 047c04c9..e8ed46dc 100644 --- a/PInvoke/Ole/PropSys/PropSys.IPropertyChange.cs +++ b/PInvoke/Ole/PropSys/PropSys.IPropertyChange.cs @@ -35,7 +35,7 @@ public static partial class PropSys } /// Exposes a method that encapsulates a change to a single property. - /// + /// [PInvokeData("Propsys.h", MSDNShortId = "bb775244")] [ComImport, Guid("f917bc8a-1bba-4478-a245-1bde03eb9431"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IPropertyChange : IObjectWithPropertyKey diff --git a/PInvoke/Ole/PropSys/PropSys.Interfaces.cs b/PInvoke/Ole/PropSys/PropSys.Interfaces.cs index 636e2f33..64060599 100644 --- a/PInvoke/Ole/PropSys/PropSys.Interfaces.cs +++ b/PInvoke/Ole/PropSys/PropSys.Interfaces.cs @@ -556,7 +556,7 @@ public static partial class PropSys /// /// Exposes a method to create a specified IPropertyStore object in circumstances where property access is potentially slow. /// - /// + /// // https://docs.microsoft.com/en-us/windows/desktop/api/propsys/nn-propsys-idelayedpropertystorefactory [PInvokeData("propsys.h", MSDNShortId = "855c9f10-9f40-4c60-a669-551fa51133f5")] [ComImport, Guid("40d4577f-e237-4bdb-bd69-58f089431b6a"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -1168,7 +1168,7 @@ public static partial class PropSys } /// Exposes methods that extract data from enumeration information. IPropertyEnumType2 extends IPropertyEnumType. - /// + /// [ComImport, Guid("9b6e051c-5ddd-4321-9070-fe2acb55e794"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [PInvokeData("Propsys.h")] public interface IPropertyEnumType2 : IPropertyEnumType @@ -2156,7 +2156,7 @@ public static class PSExtensions /// Enumerates the keys of a property store. /// The instance used to retrieve the keys. /// A sequence of keys found in the property store. - public static System.Collections.Generic.IEnumerable EnumKeys(this PropSys.IPropertyStore ps) + public static IEnumerable EnumKeys(this PropSys.IPropertyStore ps) { for (var i = 0U; i < ps.GetCount(); i++) yield return ps.GetAt(i); diff --git a/UnitTests/CSharpRunner/TestCaseSources.cs b/UnitTests/CSharpRunner/TestCaseSources.cs index 64085ea8..5aafb0a6 100644 --- a/UnitTests/CSharpRunner/TestCaseSources.cs +++ b/UnitTests/CSharpRunner/TestCaseSources.cs @@ -130,8 +130,7 @@ public static class TestCaseSources if (first) { hdr = items; - if (cols is null) - cols = items; + cols ??= items; idxs = cols.Select(s => Array.IndexOf(items, s)).ToArray(); first = false; continue;