From 6a5f6fc4e7b779c3fbb818be0e88e20ee968879b Mon Sep 17 00:00:00 2001 From: dahall Date: Wed, 18 Aug 2021 17:23:52 -0600 Subject: [PATCH] Fixed documentation --- PInvoke/NtDll/Winternl.cs | 70 ++++++++++++++++++++++++++++++++++++++++++++ PInvoke/Shell32/Clipboard.cs | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/PInvoke/NtDll/Winternl.cs b/PInvoke/NtDll/Winternl.cs index 9d4ff2f2..ba9d6c14 100644 --- a/PInvoke/NtDll/Winternl.cs +++ b/PInvoke/NtDll/Winternl.cs @@ -207,21 +207,91 @@ namespace Vanara.PInvoke PROCESS_CREATE_FLAGS_LARGE_PAGES = 0x00000010, } + /// Creates a process. This function is UNDOCUMENTED. + /// The process handle. + /// The desired access. + /// The object attributes. + /// The parent process. + /// if set to , inherits the object table. + /// The section handle. + /// The debug port. + /// The exception port. + /// + /// The function returns an NTSTATUS success or error code. + /// + /// The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK, and are + /// described in the DDK documentation under Kernel-Mode Driver Architecture / Design Guide / Driver Programming Techniques / + /// Logging Errors. + /// + /// [DllImport(Lib.NtDll, SetLastError = false, ExactSpelling = true)] public static extern NTStatus NtCreateProcess(out HPROCESS ProcessHandle, [In] ACCESS_MASK DesiredAccess, in OBJECT_ATTRIBUTES ObjectAttributes, [In] HPROCESS ParentProcess, [In, MarshalAs(UnmanagedType.U1)] bool InheritObjectTable, [In, Optional] IntPtr SectionHandle, [In, Optional] IntPtr DebugPort, [In, Optional] IntPtr ExceptionPort); + /// Creates a process. This function is UNDOCUMENTED. + /// The process handle. + /// The desired access. + /// The object attributes. + /// The parent process. + /// if set to , inherits the object table. + /// The section handle. + /// The debug port. + /// The exception port. + /// + /// The function returns an NTSTATUS success or error code. + /// + /// The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK, and are + /// described in the DDK documentation under Kernel-Mode Driver Architecture / Design Guide / Driver Programming Techniques / + /// Logging Errors. + /// + /// [DllImport(Lib.NtDll, SetLastError = false, ExactSpelling = true)] public static extern NTStatus NtCreateProcess(out HPROCESS ProcessHandle, [In] ACCESS_MASK DesiredAccess, [In, Optional] IntPtr ObjectAttributes, [In] HPROCESS ParentProcess, [In, MarshalAs(UnmanagedType.U1)] bool InheritObjectTable, [In, Optional] IntPtr SectionHandle, [In, Optional] IntPtr DebugPort, [In, Optional] IntPtr ExceptionPort); + /// Creates a process. This function is UNDOCUMENTED. + /// The process handle. + /// The desired access. + /// The object attributes. + /// The parent process. + /// The flags. + /// The section handle. + /// The debug port. + /// The exception port. + /// The job member level. + /// + /// The function returns an NTSTATUS success or error code. + /// + /// The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK, and are + /// described in the DDK documentation under Kernel-Mode Driver Architecture / Design Guide / Driver Programming Techniques / + /// Logging Errors. + /// + /// [DllImport(Lib.NtDll, SetLastError = false, ExactSpelling = true)] public static extern NTStatus NtCreateProcessEx(out HPROCESS ProcessHandle, [In] ACCESS_MASK DesiredAccess, in OBJECT_ATTRIBUTES ObjectAttributes, [In] HPROCESS ParentProcess, [In] PROCESS_CREATE_FLAGS Flags, [In, Optional] IntPtr SectionHandle, [In, Optional] IntPtr DebugPort, [In, Optional] IntPtr ExceptionPort, uint JobMemberLevel); + /// Creates a process. This function is UNDOCUMENTED. + /// The process handle. + /// The desired access. + /// The object attributes. + /// The parent process. + /// The flags. + /// The section handle. + /// The debug port. + /// The exception port. + /// The job member level. + /// + /// The function returns an NTSTATUS success or error code. + /// + /// The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK, and are + /// described in the DDK documentation under Kernel-Mode Driver Architecture / Design Guide / Driver Programming Techniques / + /// Logging Errors. + /// + /// [DllImport(Lib.NtDll, SetLastError = false, ExactSpelling = true)] public static extern NTStatus NtCreateProcessEx(out HPROCESS ProcessHandle, [In] ACCESS_MASK DesiredAccess, [In, Optional] IntPtr ObjectAttributes, [In] HPROCESS ParentProcess, [In] PROCESS_CREATE_FLAGS Flags, [In, Optional] IntPtr SectionHandle, diff --git a/PInvoke/Shell32/Clipboard.cs b/PInvoke/Shell32/Clipboard.cs index 1faf5efc..649eef7e 100644 --- a/PInvoke/Shell32/Clipboard.cs +++ b/PInvoke/Shell32/Clipboard.cs @@ -766,7 +766,7 @@ namespace Vanara.PInvoke /// public const string CFSTR_SHELLIDLISTOFFSET = "Shell Object Offsets"; - /// This format identifier has been deprecated; use instead. + /// This format identifier has been deprecated; use instead. public const string CFSTR_SHELLURL = "UniformResourceLocator"; ///