From c11860bf0c1f4975ab3caf2798995e19b45e444c Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 24 May 2019 14:42:05 -0600 Subject: [PATCH] Fixed documentation --- PInvoke/Ole/Ole32/ComBaseApi.cs | 38 ++++---- PInvoke/Ole/Ole32/PropIdl.cs | 191 ++++++++++++++-------------------------- PInvoke/Ole/Ole32/UnknwnBase.cs | 3 - 3 files changed, 89 insertions(+), 143 deletions(-) diff --git a/PInvoke/Ole/Ole32/ComBaseApi.cs b/PInvoke/Ole/Ole32/ComBaseApi.cs index 494df660..3739e043 100644 --- a/PInvoke/Ole/Ole32/ComBaseApi.cs +++ b/PInvoke/Ole/Ole32/ComBaseApi.cs @@ -2031,7 +2031,6 @@ namespace Vanara.PInvoke /// /// /// - /// The . /// /// On successful return, address of pointer to the IUnknown interface on the newly-created aggregated standard marshaler. If an /// error occurs, this value is NULL. @@ -2516,19 +2515,29 @@ namespace Vanara.PInvoke [PInvokeData("combaseapi.h", MSDNShortId = "e9e7c5a3-70ec-4a68-ac21-1ab6774d140f")] public static extern HRESULT CoQueryAuthenticationServices(out uint pcAuthSvc, out SafeCoTaskMemHandle asAuthSvc); - /// Retrieves a list of the authentication services registered when the process called CoInitializeSecurity. - /// An array of SOLE_AUTHENTICATION_SERVICE structures. CoQueryAuthenticationServices retrieves a - /// list of the authentication services currently registered. If the process calls CoInitializeSecurity, these are the services - /// registered through that call. If the application does not call it, CoInitializeSecurity is called automatically by COM, - /// registering the default security package, the first time an interface is marshaled or unmarshaled.This function - /// returns only the authentication services registered with CoInitializeSecurity. It does not return all of the authentication - /// services installed on the computer, but EnumerateSecurityPackages does. CoQueryAuthenticationServices is primarily useful - /// for custom marshalers, to determine which principal names an application can use.Different authentication services - /// support different levels of security. For example, NTLMSSP does not support delegation or mutual authentication while Kerberos - /// does. The application is responsible only for registering authentication services that provide the features the application - /// needs. This function provides a way to find out which services have been registered with CoInitializeSecurity. + /// Retrieves a list of the authentication services registered when the process called CoInitializeSecurity. + /// + /// An array of SOLE_AUTHENTICATION_SERVICE structures. + /// + /// + /// + /// CoQueryAuthenticationServices retrieves a list of the authentication services currently registered. If the process calls + /// CoInitializeSecurity, these are the services registered through that call. If the application does not call it, + /// CoInitializeSecurity is called automatically by COM, registering the default security package, the first time an interface + /// is marshaled or unmarshaled. + /// + /// + /// This function returns only the authentication services registered with CoInitializeSecurity. It does not return all of the + /// authentication services installed on the computer, but EnumerateSecurityPackages does. CoQueryAuthenticationServices is + /// primarily useful for custom marshalers, to determine which principal names an application can use. + /// + /// + /// Different authentication services support different levels of security. For example, NTLMSSP does not support delegation or + /// mutual authentication while Kerberos does. The application is responsible only for registering authentication services that + /// provide the features the application needs. This function provides a way to find out which services have been registered with CoInitializeSecurity. + /// + /// // https://docs.microsoft.com/en-us/windows/desktop/api/combaseapi/nf-combaseapi-coqueryauthenticationservices HRESULT - // CoQueryAuthenticationServices( DWORD *pcAuthSvc, SOLE_AUTHENTICATION_SERVICE **asAuthSvc ); [PInvokeData("combaseapi.h", MSDNShortId = "e9e7c5a3-70ec-4a68-ac21-1ab6774d140f")] public static SOLE_AUTHENTICATION_SERVICE[] CoQueryAuthenticationServices() { CoQueryAuthenticationServices(out var c, out var a).ThrowIfFailed(); return a.ToArray((int)c); } @@ -2544,8 +2553,7 @@ namespace Vanara.PInvoke /// A pointer to a variable that receives the current authorization service. This will be a single value taken from the authorization /// constants. If the caller specifies NULL, the current authorization service is not retrieved. /// - /// The string builder. - /// The . + /// The string builder. /// /// A pointer to a variable that receives the current authentication level. This will be a single value taken from the authentication /// level constants. If the caller specifies NULL, the current authentication level is not retrieved. diff --git a/PInvoke/Ole/Ole32/PropIdl.cs b/PInvoke/Ole/Ole32/PropIdl.cs index 38f96fdd..78f37141 100644 --- a/PInvoke/Ole/Ole32/PropIdl.cs +++ b/PInvoke/Ole/Ole32/PropIdl.cs @@ -112,26 +112,18 @@ namespace Vanara.PInvoke /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nn-propidl-ienumstatpropsetstg - [PInvokeData("propidl.h", MSDNShortId = "8d5e658f-312c-4c91-8794-808b2e8dd182")] - [ComImport, Guid("0000013B-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [PInvokeData("propidl.h", MSDNShortId = "0000013B-0000-0000-C000-000000000046")] + [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("0e6d4d92-6738-11cf-9608-00aa00680db4")] public interface IEnumSTATPROPSETSTG { /// - /// /// The Next method retrieves a specified number of STATPROPSETSTG structures that follow subsequently in the enumeration /// sequence. If fewer than the requested number of STATPROPSETSTG structures exist in the enumeration sequence, it retrieves the /// remaining STATPROPSETSTG structures. - /// /// - /// - /// The number of STATPROPSETSTG structures requested. - /// - /// - /// An array of STATPROPSETSTG structures returned. - /// - /// - /// The number of STATPROPSETSTG structures retrieved in the parameter. - /// + /// The number of STATPROPSETSTG structures requested. + /// An array of STATPROPSETSTG structures returned. + /// The number of STATPROPSETSTG structures retrieved in the rgelt parameter. /// /// This method supports the following return values: /// @@ -141,87 +133,46 @@ namespace Vanara.PInvoke /// /// /// S_OK - /// The number of STATPROPSETSTG structures returned equals the number specified in the parameter. + /// The number of STATPROPSETSTG structures returned equals the number specified in the celt parameter. /// /// /// S_FALSE - /// The number of STATPROPSETSTG structures returned is less than the number specified in the parameter. + /// The number of STATPROPSETSTG structures returned is less than the number specified in the celt parameter. /// /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-next + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-next HRESULT Next( ULONG celt, + // STATPROPSETSTG *rgelt, ULONG *pceltFetched ); + [PInvokeData("propidl.h", MSDNShortId = "3af3c518-3db4-4436-b1c1-86587ce8fbf3")] [PreserveSig] - HRESULT Next(uint celt, IntPtr rgelt, out uint pceltFetched); + HRESULT Next(uint celt, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] STATPROPSETSTG[] rgelt, out uint pceltFetched); - /// - /// The Skip method skips a specified number of STATPROPSETSTG structures in the enumeration sequence. - /// - /// - /// The number of STATPROPSETSTG structures to skip. - /// - /// - /// This method supports the following return values: - /// + /// The Skip method skips a specified number of STATPROPSETSTG structures in the enumeration sequence. + /// The number of STATPROPSETSTG structures to skip. + /// This method supports the following return values: /// - /// - /// A positive value for the parameter skips forward in the STATPROPSETSTG structure enumeration. A negative value for the - /// parameter skips backward in the STATPROPSETSTG structure enumeration. - /// + /// A positive value for the celt parameter skips forward in the STATPROPSETSTG structure enumeration. A negative value for the + /// celt parameter skips backward in the STATPROPSETSTG structure enumeration. /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-skip + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-skip HRESULT Skip( ULONG celt ); + [PInvokeData("propidl.h", MSDNShortId = "48275ca5-f9d1-42cb-b218-f51488a91bf8")] [PreserveSig] HRESULT Skip(uint celt); - /// - /// The Reset method resets the enumeration sequence to the beginning of the STATPROPSETSTG structure array. - /// - /// - /// This method supports the S_OK return value. - /// - /// - /// Return code - /// Description - /// - /// - /// S_OK - /// The enumeration sequence was successfully reset to the beginning of the enumeration. - /// - /// - /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-reset + /// The Reset method resets the enumeration sequence to the beginning of the STATPROPSETSTG structure array. + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-reset HRESULT Reset( ); + [PInvokeData("propidl.h", MSDNShortId = "41207be6-81ec-4dfc-a737-eb56792edb6d")] void Reset(); /// - /// /// The Clone method creates an enumerator that contains the same enumeration state as the current STATPROPSETSTG /// structure enumerator. Using this method, a client can record a particular point in the enumeration sequence and then return /// to that point later. The new enumerator supports the same IEnumSTATPROPSETSTG interface. - /// /// - /// - /// A pointer to the variable that receives the IEnumSTATPROPSETSTG interface pointer. - /// If the method does not succeed, the value of the parameter is undefined. - /// This method supports exceptions listed in the following table. - /// - /// - /// Return code - /// Description - /// - /// - /// E_INVALIDARG - /// The parameter is NULL. - /// - /// - /// E_OUTOFMEMORY - /// Insufficient memory. - /// - /// - /// E_UNEXPECTED - /// An unexpected exception occurred. - /// - /// - /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-clone + /// The variable that receives the IEnumSTATPROPSETSTG interface pointer. + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropsetstg-clone HRESULT Clone( + // IEnumSTATPROPSETSTG **ppenum ); + [PInvokeData("propidl.h", MSDNShortId = "f875d5e9-fac0-4961-9570-342f55cf307e")] IEnumSTATPROPSETSTG Clone(); } @@ -246,27 +197,19 @@ namespace Vanara.PInvoke /// is prohibitive during property enumeration. /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nn-propidl-ienumstatpropstg - [PInvokeData("propidl.h", MSDNShortId = "e625e52a-5628-4d18-9282-aa1c141c83af")] - [ComImport, Guid("00000139-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + // https://docs.microsoft.com/en-us/windows/desktop/api/propidlbase/nn-propidlbase-ienumstatpropstg + [PInvokeData("propidlbase.h", MSDNShortId = "e625e52a-5628-4d18-9282-aa1c141c83af")] + [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000139-0000-0000-C000-000000000046")] public interface IEnumSTATPROPSTG { /// - /// /// The Next method retrieves a specified number of STATPROPSTG structures, that follow subsequently in the enumeration /// sequence. If fewer than the requested number of STATPROPSTG structures exist in the enumeration sequence, it retrieves the /// remaining STATPROPSTG structures. - /// /// - /// - /// The number of STATPROPSTG structures requested. - /// - /// - /// An array of STATPROPSTG structures returned. - /// - /// - /// The number of STATPROPSTG structures retrieved in the parameter. - /// + /// The number of STATPROPSTG structures requested. + /// An array of STATPROPSTG structures returned. + /// The number of STATPROPSTG structures retrieved in the rgelt parameter. /// /// This method supports the following return values. /// @@ -276,68 +219,66 @@ namespace Vanara.PInvoke /// /// /// S_OK - /// The number of STATPROPSTG structures returned is equal to the number specified in the parameter. + /// The number of STATPROPSTG structures returned is equal to the number specified in the celt parameter. /// /// /// S_FALSE - /// The number of STATPROPSTG structures returned is less than the number specified in the parameter. + /// The number of STATPROPSTG structures returned is less than the number specified in the celt parameter. /// /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-next + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-next HRESULT Next( ULONG celt, + // STATPROPSTG *rgelt, ULONG *pceltFetched ); + [PInvokeData("propidl.h", MSDNShortId = "8e911da9-0056-4267-b9d0-c4ba929ddb94")] [PreserveSig] - HRESULT Next(uint celt, IntPtr rgelt, out uint pceltFetched); + HRESULT Next(uint celt, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] STATPROPSTG[] rgelt, out uint pceltFetched); - /// - /// The Skip method skips the specified number of STATPROPSTG structures in the enumeration sequence. - /// - /// - /// The number of STATPROPSTG structures to skip. - /// - /// - /// This method supports the following return values: - /// + /// The Skip method skips the specified number of STATPROPSTG structures in the enumeration sequence. + /// The number of STATPROPSTG structures to skip. + /// This method supports the following return values: /// - /// - /// A positive value for the parameter skips forward in the STATPROPSTG structure enumeration. A negative value for the parameter - /// skips backward in the STATPROPSTG structure enumeration. - /// + /// A positive value for the celt parameter skips forward in the STATPROPSTG structure enumeration. A negative value for the celt + /// parameter skips backward in the STATPROPSTG structure enumeration. /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-skip + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-skip HRESULT Skip( ULONG celt ); + [PInvokeData("propidl.h", MSDNShortId = "e70e4668-d52c-4135-948b-c8f5d141e6a2")] [PreserveSig] HRESULT Skip(uint celt); + /// The Reset method resets the enumeration sequence to the beginning of the STATPROPSTG structure array. + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-reset HRESULT Reset( ); + [PInvokeData("propidl.h", MSDNShortId = "e742e3ee-6261-4d6d-85ca-8df770aa58ad")] + void Reset(); + /// - /// The Reset method resets the enumeration sequence to the beginning of the STATPROPSTG structure array. + /// The Clone method creates an enumerator that contains the same enumeration state as the current STATPROPSTG structure + /// enumerator. Using this method, a client can record a particular point in the enumeration sequence and then return to that + /// point later. The new enumerator supports the same IEnumSTATPROPSTG interface. /// /// - /// This method supports the S_OK return value. + /// This method supports the following return values. /// /// /// Return code /// Description /// /// - /// S_OK - /// The enumeration sequence was successfully reset to the beginning of the enumeration. + /// E_INVALIDARG + /// The ppenum parameter is NULL. + /// + /// + /// E_OUTOFMEMORY + /// Insufficient memory. + /// + /// + /// E_UNEXPECTED + /// An unexpected exception occurred. /// /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-reset - void Reset(); - - /// - /// - /// The Clone method creates an enumerator that contains the same enumeration state as the current STATPROPSTG structure - /// enumerator. Using this method, a client can record a particular point in the enumeration sequence and then return to that - /// point later. The new enumerator supports the same IEnumSTATPROPSTG interface. - /// - /// - /// - /// A pointer to the variable that receives the IEnumSTATPROPSTG interface pointer. - /// If the method is unsuccessful, the value of the parameter is undefined. - /// - // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-clone + // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-clone HRESULT Clone( IEnumSTATPROPSTG + // **ppenum ); + [PInvokeData("propidl.h", MSDNShortId = "e06e109a-3f9d-4b08-bde9-888cb795287c")] IEnumSTATPROPSTG Clone(); } diff --git a/PInvoke/Ole/Ole32/UnknwnBase.cs b/PInvoke/Ole/Ole32/UnknwnBase.cs index d8f57438..f1e483c7 100644 --- a/PInvoke/Ole/Ole32/UnknwnBase.cs +++ b/PInvoke/Ole/Ole32/UnknwnBase.cs @@ -159,9 +159,6 @@ namespace Vanara.PInvoke /// contains the requested interface pointer. If the object does not support the interface specified in riid, the implementation /// must set *ppvObject to NULL. /// - /// The lock server. - /// The . - /// The f lock. /// /// /// This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.