Go to the source code of this file.
◆ CreateSection()
Definition at line 12 of file NtQuerySection.c.
13{
17
23 Protection,
28}
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
#define ok_ntstatus(status, expected)
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER MaximumSize
#define SECTION_ALL_ACCESS
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ const BITMAPINFO _In_ UINT _In_opt_ HANDLE hSection
Referenced by Test_SectionBasicInformation().
◆ QuerySbi()
Definition at line 32 of file NtQuerySection.c.
33{
36
39 SectionInfo,
40 sizeof(*SectionInfo),
44}
_In_ PVOID _In_ ULONG _Out_ PVOID _In_ ULONG _Inout_ PULONG ReturnLength
#define ok_eq_hex(value, expected)
@ SectionBasicInformation
NTSTATUS NTAPI NtQuerySection(_In_ HANDLE SectionHandle, _In_ SECTION_INFORMATION_CLASS SectionInformationClass, _Out_ PVOID SectionInformation, _In_ SIZE_T SectionInformationLength, _Out_opt_ PSIZE_T ResultLength)
Referenced by Test_SectionBasicInformation().
◆ START_TEST()
Definition at line 155 of file NtQuerySection.c.
156{
158}
void Test_SectionBasicInformation(void)
◆ Test_SectionBasicInformation()
void Test_SectionBasicInformation |
( |
void |
| ) |
|
Definition at line 46 of file NtQuerySection.c.
47{
52
53
56
57
60 &SectionInfo,
61 sizeof(SectionInfo),
64
65
69 sizeof(SectionInfo),
72
73
76 &SectionInfo,
77 sizeof(SectionInfo) - 1,
80
81
84 &SectionInfo,
85 sizeof(SectionInfo),
93
94
102
103
111
112
123
124
132
133
141
142
150
151
153}
static HANDLE CreateSection(ULONG Size, ULONG Protection, ULONG Attributes, HANDLE hFile)
static VOID QuerySbi(SECTION_BASIC_INFORMATION *SectionInfo, HANDLE hSection)
#define ok_eq_pointer(value, expected)
#define ok_eq_hex64(value, expected)
#define STATUS_INVALID_HANDLE
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
#define PAGE_EXECUTE_READ
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define PAGE_EXECUTE_READWRITE
#define STATUS_ACCESS_VIOLATION
#define STATUS_INFO_LENGTH_MISMATCH
Referenced by START_TEST().