| 6 | // Section Objects |
| 7 | |
| 8 | ntapi::NTSTATUS |
| 9 | NTAPI |
| 10 | ntapi::NtCreateSection( |
| 11 | _Out_ PHANDLE SectionHandle, |
| 12 | _In_ ACCESS_MASK DesiredAccess, |
| 13 | _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, |
| 14 | _In_opt_ PLARGE_INTEGER MaximumSize, |
| 15 | _In_ ULONG SectionPageProtection, |
| 16 | _In_ ULONG AllocationAttributes, |
| 17 | _In_opt_ HANDLE FileHandle) |
| 18 | { |
| 19 | typedef NTSTATUS(NTAPI* NtCreateSection_t)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PLARGE_INTEGER, ULONG, ULONG, HANDLE); |
| 20 | static NtCreateSection_t Fn = NtCreateSection_t(GetProcAddress(hmNtdll, "NtCreateSection")); |
| 21 | if (Fn) |
| 22 | return Fn(SectionHandle, DesiredAccess, ObjectAttributes, MaximumSize, SectionPageProtection, AllocationAttributes, FileHandle); |
| 23 | SetLastError(ERROR_PROC_NOT_FOUND); |
| 24 | return STATUS_PROCEDURE_NOT_FOUND; |
| 25 | } |
| 26 | |
| 27 | ntapi::NTSTATUS |
| 28 | NTAPI |
nothing calls this directly
no outgoing calls
no test coverage detected