ReactOS  0.4.14-dev-342-gdc047f9
kbdclass.h File Reference
#include <ntifs.h>
#include <ntddkbd.h>
Include dependency graph for kbdclass.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CLASS_DRIVER_EXTENSION
 
struct  _COMMON_DEVICE_EXTENSION
 
struct  _PORT_DEVICE_EXTENSION
 
struct  _CLASS_DEVICE_EXTENSION
 

Macros

#define MAX_PATH   260
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define CLASS_TAG   'CdbK'
 
#define DPFLTR_CLASS_NAME_ID   DPFLTR_KBDCLASS_ID
 

Typedefs

typedef struct _CLASS_DRIVER_EXTENSION CLASS_DRIVER_EXTENSION
 
typedef struct _CLASS_DRIVER_EXTENSIONPCLASS_DRIVER_EXTENSION
 
typedef struct _COMMON_DEVICE_EXTENSION COMMON_DEVICE_EXTENSION
 
typedef struct _COMMON_DEVICE_EXTENSIONPCOMMON_DEVICE_EXTENSION
 
typedef struct _PORT_DEVICE_EXTENSION PORT_DEVICE_EXTENSION
 
typedef struct _PORT_DEVICE_EXTENSIONPPORT_DEVICE_EXTENSION
 
typedef struct _CLASS_DEVICE_EXTENSION CLASS_DEVICE_EXTENSION
 
typedef struct _CLASS_DEVICE_EXTENSIONPCLASS_DEVICE_EXTENSION
 

Enumerations

enum  PORT_DEVICE_STATE {
  dsStopped, dsStarted, dsPaused, dsRemoved,
  dsSurpriseRemoved, dsStopped, dsStarted, dsPaused,
  dsRemoved, dsSurpriseRemoved
}
 

Functions

NTSTATUS ForwardIrpAndWait (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS DuplicateUnicodeString (IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
 

Variables

DRIVER_DISPATCH ForwardIrpAndForget
 

Macro Definition Documentation

◆ CLASS_TAG

#define CLASS_TAG   'CdbK'

Definition at line 11 of file kbdclass.h.

◆ DPFLTR_CLASS_NAME_ID

#define DPFLTR_CLASS_NAME_ID   DPFLTR_KBDCLASS_ID

Definition at line 12 of file kbdclass.h.

◆ MAX_PATH

#define MAX_PATH   260

Definition at line 7 of file kbdclass.h.

◆ MIN

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 9 of file kbdclass.h.

Typedef Documentation

◆ CLASS_DEVICE_EXTENSION

◆ CLASS_DRIVER_EXTENSION

◆ COMMON_DEVICE_EXTENSION

◆ PCLASS_DEVICE_EXTENSION

◆ PCLASS_DRIVER_EXTENSION

◆ PCOMMON_DEVICE_EXTENSION

◆ PORT_DEVICE_EXTENSION

◆ PPORT_DEVICE_EXTENSION

Enumeration Type Documentation

◆ PORT_DEVICE_STATE

Enumerator
dsStopped 
dsStarted 
dsPaused 
dsRemoved 
dsSurpriseRemoved 
dsStopped 
dsStarted 
dsPaused 
dsRemoved 
dsSurpriseRemoved 

Definition at line 14 of file kbdclass.h.

Function Documentation

◆ DuplicateUnicodeString()

NTSTATUS DuplicateUnicodeString ( IN ULONG  Flags,
IN PCUNICODE_STRING  SourceString,
OUT PUNICODE_STRING  DestinationString 
)

Definition at line 72 of file misc.c.

76 {
81  {
83  }
84 
85 
86  if ((SourceString->Length == 0)
89  {
93  }
94  else
95  {
96  USHORT DestMaxLength = SourceString->Length;
97 
99  DestMaxLength += sizeof(UNICODE_NULL);
100 
102  if (DestinationString->Buffer == NULL)
103  return STATUS_NO_MEMORY;
104 
107  DestinationString->MaximumLength = DestMaxLength;
108 
111  }
112 
113  return STATUS_SUCCESS;
114 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING
Definition: green.h:16
unsigned short Length
Definition: sprintf.c:451
#define I8042PRT_TAG
Definition: i8042prt.h:12
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
void * Buffer
Definition: sprintf.c:453
#define UNICODE_NULL
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
Definition: green.h:15
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
return STATUS_SUCCESS
Definition: btrfs.c:2938
unsigned short MaximumLength
Definition: sprintf.c:452

◆ ForwardIrpAndWait()

NTSTATUS ForwardIrpAndWait ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 32 of file fdo.c.

35 {
36  KEVENT Event;
39  ASSERT(LowerDevice);
40 
43 
45 
46  Status = IoCallDriver(LowerDevice, Irp);
47  if (Status == STATUS_PENDING)
48  {
50  if (NT_SUCCESS(Status))
51  Status = Irp->IoStatus.Status;
52  }
53 
54  return Status;
55 }
#define TRUE
Definition: types.h:120
_In_ PIRP Irp
Definition: csq.h:116
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext(_Inout_ PIRP Irp)
Definition: iofuncs.h:2820
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
PVOID DeviceExtension
Definition: env_spec_w32.h:418
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion
Definition: fdo.c:17
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218

Variable Documentation

◆ ForwardIrpAndForget

DRIVER_DISPATCH ForwardIrpAndForget

Definition at line 75 of file kbdclass.h.