| 30 | } |
| 31 | |
| 32 | NTSTATUS OpenSection( |
| 33 | OUT PHANDLE hSection, |
| 34 | LPCWSTR Name, |
| 35 | ACCESS_MASK DesiredAccess, |
| 36 | ULONG SecObjFlags |
| 37 | ) { |
| 38 | if (!Name) return STATUS_INVALID_PARAMETER; |
| 39 | |
| 40 | UNICODE_STRING SecName = {}; |
| 41 | RtlInitUnicodeString(&SecName, Name); |
| 42 | |
| 43 | OBJECT_ATTRIBUTES Attributes = {}; |
| 44 | InitializeObjectAttributes(&Attributes, &SecName, SecObjFlags, NULL, NULL); |
| 45 | |
| 46 | return ZwOpenSection(hSection, DesiredAccess, &Attributes); |
| 47 | } |
| 48 | |
| 49 | NTSTATUS MapViewOfSection( |
| 50 | HANDLE hSection, |