572{
580 DWORD DriversLoaded = 0;
583
584
593 {
596 }
597
598
600
601
604 {
607 }
608
609
613 0,
614 0,
616 if (FileMapping ==
NULL)
617 {
620 }
621
622
625 {
628 }
629
630
634
635
637 {
639 {
640 DPRINT1(
"Error loading driver at %04X:%04X: "
641 "Block device drivers are not supported.\n",
644 goto Next;
645 }
646
647
651
653
655 {
656 DPRINT1(
"Error loading driver at %04X:%04X: "
657 "Initialization routine returned error %u.\n",
661 goto Next;
662 }
663
664
678
680 DriversLoaded++;
681
682Next:
683 if (
LOWORD(DriverHeader->
Link) == 0xFFFF)
break;
686 }
687
688 DPRINT1(
"%u drivers loaded from %s.\n", DriversLoaded, DriverFile);
689
692 {
693
695 }
696
697
699
700
702
703
705
707}
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
static const WCHAR Cleanup[]
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
struct _DOS_INIT_REQUEST DOS_INIT_REQUEST
#define DOS_DEVSTAT_ERROR
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
DWORD WINAPI GetLastError(void)
#define CreateFileMapping
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO