28 ULONG HeaderBufferSize;
34 DPRINT(
"Failed to create buffer (Status 0x%lx)\n", InfStatus);
58 DPRINT(
"NtOpenFile() successful\n");
60 if (
NULL != HeaderComment && 0 != HeaderComment->
Length)
63 HeaderBufferSize = HeaderComment->
Length + 7 *
sizeof(
WCHAR);
64 HeaderBuffer =
MALLOC(HeaderBufferSize);
65 if (
NULL != HeaderBuffer)
#define FILE_NON_DIRECTORY_FILE
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
INFSTATUS InfpFindOrAddSection(PINFCACHE Cache, PCWSTR Section, PINFCONTEXT *Context)
INFSTATUS InfpAddLineWithKey(PINFCONTEXT Context, PCWSTR Key)
INFSTATUS InfpBuildFileBuffer(PINFCACHE InfHandle, PWCHAR *Buffer, PULONG BufferSize)
INFSTATUS InfpAddField(PINFCONTEXT Context, PCWSTR Data)
BOOLEAN InfHostAddLine(PINFCONTEXT Context, PCWSTR Key)
BOOLEAN InfHostAddField(PINFCONTEXT Context, PCWSTR Data)
NTSTATUS InfWriteFile(HINF InfHandle, PUNICODE_STRING FileName, PUNICODE_STRING HeaderComment)
BOOLEAN InfFindOrAddSection(HINF InfHandle, PCWSTR Section, PINFCONTEXT *Context)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI NtWriteFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID WriteBuffer, IN ULONG WriteBufferLength, IN PLARGE_INTEGER FileOffset OPTIONAL, IN PULONG LockOperationKey OPTIONAL)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize