132 Request.CommandCode = CommandCode;
163 *Character =
Request.Character;
260 while (
LOWORD(CurrentDriver) != 0xFFFF)
271 CurrentDriver = DriverHeader->
Link;
288 Node->Name.Buffer =
Node->NameBuffer;
297 Node->Name.Length =
i;
318 DPRINT1(
"The driver at %04X:%04X has no associated device node. "
319 "Installing automagically.\n",
349 while (
LOWORD(CurrentDriver) != 0xFFFF)
355 CurrentDriver = DriverHeader->
Link;
371 DPRINT1(
"ERROR: Block devices are not supported.\n");
451 DPRINT1(
"Device interrupt BOP from an unknown location.\n");
580 DWORD DriversLoaded = 0;
616 if (FileMapping ==
NULL)
640 DPRINT1(
"Error loading driver at %04X:%04X: "
641 "Block device drivers are not supported.\n",
656 DPRINT1(
"Error loading driver at %04X:%04X: "
657 "Initialization routine returned error %u.\n",
683 if (
LOWORD(DriverHeader->
Link) == 0xFFFF)
break;
688 DPRINT1(
"%u drivers loaded from %s.\n", DriversLoaded, DriverFile);
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#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[]
#define TO_LINEAR(seg, off)
#define SEG_OFF_TO_PTR(seg, off)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define RtlFillMemory(Dest, Length, Fill)
NTSYSAPI BOOLEAN NTAPI RtlEqualString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
base of all file and directory entries
CHAR DeviceName[MAX_DEVICE_NAME]
struct _LIST_ENTRY * Flink
VOID RunCallback16(IN PCALLBACK16 Context, IN ULONG FarPtr)
static WORD NTAPI DosDriverDispatchPeek(PDOS_DEVICE_NODE DeviceNode, PBYTE Character)
PDOS_DEVICE_NODE DosGetDevice(LPCSTR DeviceName)
PDOS_DEVICE_NODE DosCreateDevice(WORD Attributes, PCHAR DeviceName)
static VOID DosAddDriver(DWORD Driver)
static const BYTE InterruptRoutine[]
static VOID DosRemoveDriver(DWORD Driver)
VOID DosDeleteDevice(PDOS_DEVICE_NODE DeviceNode)
static WORD NTAPI DosDriverDispatchIoctlWrite(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length)
static WORD NTAPI DosDriverDispatchFlushOutput(PDOS_DEVICE_NODE DeviceNode)
static WORD NTAPI DosDriverDispatchIoctlRead(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length)
static WORD NTAPI DosDriverReadInternal(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length, BOOLEAN IoControl)
static const BYTE StrategyRoutine[]
PDOS_DEVICE_NODE DosCreateDeviceEx(WORD Attributes, PCHAR DeviceName, WORD PrivateDataSize)
static WORD NTAPI DosDriverDispatchOutputStatus(PDOS_DEVICE_NODE DeviceNode)
static WORD NTAPI DosDriverDispatchInputStatus(PDOS_DEVICE_NODE DeviceNode)
static WORD NTAPI DosDriverDispatchFlushInput(PDOS_DEVICE_NODE DeviceNode)
static PDOS_REQUEST_HEADER DeviceRequest
static LIST_ENTRY DeviceList
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
VOID DeviceInterruptBop(VOID)
DWORD DosLoadDriver(LPCSTR DriverFile)
static WORD NTAPI DosDriverDispatchWrite(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length)
static WORD NTAPI DosDriverDispatchClose(PDOS_DEVICE_NODE DeviceNode)
static WORD NTAPI DosDriverDispatchRead(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length)
static WORD NTAPI DosDriverGenericRequest(PDOS_DEVICE_NODE DeviceNode, BYTE CommandCode)
PDOS_DEVICE_NODE DosGetDriverNode(DWORD Driver)
static WORD NTAPI DosDriverWriteInternal(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length, BOOLEAN IoControl)
static WORD NTAPI DosDriverDispatchOutputUntilBusy(PDOS_DEVICE_NODE DeviceNode, DWORD Buffer, PWORD Length)
static WORD NTAPI DosDriverDispatchOpen(PDOS_DEVICE_NODE DeviceNode)
VOID DeviceStrategyBop(VOID)
static PDOS_DEVICE_NODE DosCreateDeviceNode(DWORD Driver)
#define DOS_DEVATTR_STDIN
#define DOS_DEVCMD_OUTPUT_BUSY
struct _DOS_OUTPUT_BUSY_REQUEST DOS_OUTPUT_BUSY_REQUEST
struct _DOS_IOCTL_RW_REQUEST DOS_IOCTL_RW_REQUEST
#define DOS_DEVCMD_FLUSH_INPUT
struct _DOS_OUTPUT_BUSY_REQUEST * PDOS_OUTPUT_BUSY_REQUEST
#define DOS_DEVCMD_FLUSH_OUTPUT
struct _DOS_INIT_REQUEST DOS_INIT_REQUEST
struct _DOS_IOCTL_RW_REQUEST * PDOS_IOCTL_RW_REQUEST
#define BOP_DRV_INTERRUPT
struct _DOS_PEEK_REQUEST DOS_PEEK_REQUEST
#define DOS_DEVCMD_INSTAT
#define DOS_DEVATTR_CLOCK
#define DOS_DEVCMD_IOCTL_WRITE
struct _DOS_PEEK_REQUEST * PDOS_PEEK_REQUEST
struct _DOS_DRIVER DOS_DRIVER
#define DOS_DEVSTAT_ERROR
struct _DOS_REQUEST_HEADER * PDOS_REQUEST_HEADER
struct _DOS_RW_REQUEST * PDOS_RW_REQUEST
#define DOS_DEVATTR_STDOUT
struct _DOS_REQUEST_HEADER DOS_REQUEST_HEADER
#define DOS_DEVCMD_IOCTL_READ
#define DOS_DEVCMD_OUTSTAT
#define DOS_DEVATTR_CHARACTER
struct _DOS_DRIVER * PDOS_DRIVER
#define DOS_DATA_OFFSET(x)
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable)
BOOLEAN DosFreeMemory(WORD BlockData)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
VOID WINAPI setBX(USHORT)
USHORT WINAPI getIP(VOID)
VOID WINAPI setCX(USHORT)
VOID WINAPI setDX(USHORT)
USHORT WINAPI getBX(VOID)
USHORT WINAPI getDS(VOID)
USHORT WINAPI getCX(VOID)
USHORT WINAPI getSI(VOID)
USHORT WINAPI getDX(VOID)
VOID WINAPI setDS(USHORT)
USHORT WINAPI getAX(VOID)
USHORT WINAPI getES(VOID)
USHORT WINAPI getBP(VOID)
USHORT WINAPI getDI(VOID)
USHORT WINAPI getCS(VOID)
VOID WINAPI setBP(USHORT)
VOID WINAPI setAX(USHORT)
VOID WINAPI setES(USHORT)
VOID WINAPI setSI(USHORT)
VOID WINAPI setDI(USHORT)
static int Link(const char **args)
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDRIVER Driver
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
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