ReactOS  0.4.13-dev-249-gcba1a2f
misc.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS NDIS library
4  * FILE: ndis/misc.c
5  */
6 
7 #include "ndissys.h"
8 
9 extern LONG CancelId;
10 
11 /*
12  * @implemented
13  */
14 #undef NdisInterlockedAddUlong
15 VOID
16 EXPORT
21 {
23 }
24 
25 /*
26  * @implemented
27  */
28 VOID
29 EXPORT
34 {
35  /* This needs to be verified. The documentation
36  * seems to be missing but it is exported by
37  * NDIS 5.1 so I'm implementing it like the other
38  * interlocked routines
39  */
40 
42 }
43 
44 /*
45  * @implemented
46  */
47 LONG
48 EXPORT
50  IN PNDIS_ANSI_STRING String1,
53 {
54  /* This one needs to be verified also. See the
55  * comment in NdisInterlockedAddLargeInteger
56  */
57 
58  return RtlCompareString(String1, String2, CaseInSensitive);
59 }
60 
61 /*
62  * @implemented
63  */
64 LONG
65 EXPORT
67  IN PNDIS_STRING String1,
70 {
71  /* This one needs to be verified also. See the
72  * comment in NdisInterlockedAddLargeInteger
73  */
74 
76 }
77 
78 /*
79  * @implemented
80  */
81 #undef NdisInterlockedInsertHeadList
83 EXPORT
85  IN PLIST_ENTRY ListHead,
86  IN PLIST_ENTRY ListEntry,
88 {
89  return ExInterlockedInsertHeadList ( ListHead, ListEntry, &SpinLock->SpinLock );
90 }
91 
92 /*
93  * @implemented
94  */
95 #undef NdisInterlockedInsertTailList
97 EXPORT
99  IN PLIST_ENTRY ListHead,
100  IN PLIST_ENTRY ListEntry,
102 {
103  return ExInterlockedInsertTailList ( ListHead, ListEntry, &SpinLock->SpinLock );
104 }
105 
106 
107 /*
108  * @implemented
109  */
110 #undef NdisInterlockedRemoveHeadList
112 EXPORT
114  IN PLIST_ENTRY ListHead,
116 {
117  return ExInterlockedRemoveHeadList ( ListHead, &SpinLock->SpinLock );
118 }
119 
120 typedef struct _NDIS_HANDLE_OBJECT
121 {
127 
128 __inline
131 {
132  return (PNDIS_HANDLE_OBJECT)handle;
133 }
134 
135 __inline
138 {
139  return (NDIS_HANDLE)obj;
140 }
141 
142 static const WCHAR NDIS_FILE_FOLDER[] = L"\\SystemRoot\\System32\\Drivers\\";
143 
144 /*
145  * @implemented
146  */
147 VOID
148 EXPORT
153 {
155 
156  NDIS_DbgPrint(MAX_TRACE, ("called: FileHandle 0x%x\n", FileHandle));
157 
158  if (HandleObject->Mapped)
159  {
160  /* If a file already mapped we will return an error code */
161  NDIS_DbgPrint(MIN_TRACE, ("File already mapped\n"));
163  return;
164  }
165 
166  HandleObject->Mapped = TRUE;
167  *MappedBuffer = HandleObject->MapBuffer;
168 
169  /* Set returned status */
171 }
172 
173 /*
174  * @implemented
175  */
176 VOID
177 EXPORT
180 {
182 
183  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
184 
185  HandleObject->Mapped = FALSE;
186 }
187 
188 /*
189  * @implemented
190  */
191 VOID
192 EXPORT
195 {
196  PNDIS_HANDLE_OBJECT FileHandleObject;
197 
199 
200  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
201 
202  ASSERT ( FileHandle );
203 
204  FileHandleObject = NDIS_HANDLE_TO_POBJECT(FileHandle);
205 
206  ASSERT ( FileHandleObject->FileHandle );
207 
208  if ( FileHandleObject->Mapped )
210 
211  ZwClose ( FileHandleObject->FileHandle );
212 
213  memset ( FileHandleObject, 0, sizeof(NDIS_HANDLE_OBJECT) );
214 
215  ExFreePool ( FileHandleObject );
216 }
217 
218 
219 /*
220  * @implemented
221  */
222 VOID
223 EXPORT
230 {
231  NDIS_STRING FullFileName;
233  PNDIS_HANDLE_OBJECT FileHandleObject = NULL;
235 
237 
238  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
239 
240  ASSERT ( Status && FileName );
241 
243  FullFileName.Buffer = NULL;
244 
245  FullFileName.Length = sizeof(NDIS_FILE_FOLDER) - sizeof(UNICODE_NULL);
246  FullFileName.MaximumLength = FileName->MaximumLength + FullFileName.Length;
247  FullFileName.Buffer = ExAllocatePool ( NonPagedPool, FullFileName.MaximumLength );
248 
249  if ( !FullFileName.Buffer )
250  {
251  NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources\n"));
253  goto cleanup;
254  }
255 
256  FileHandleObject = ExAllocatePool ( NonPagedPool, sizeof(NDIS_HANDLE_OBJECT) );
257  if ( !FileHandleObject )
258  {
259  NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources\n"));
261  goto cleanup;
262  }
263  memset ( FileHandleObject, 0, sizeof(NDIS_HANDLE_OBJECT) );
264 
265  memmove ( FullFileName.Buffer, NDIS_FILE_FOLDER, FullFileName.Length );
266  *Status = RtlAppendUnicodeStringToString ( &FullFileName, FileName );
267  if ( !NT_SUCCESS(*Status) )
268  {
269  NDIS_DbgPrint(MIN_TRACE, ("RtlAppendUnicodeStringToString failed (%x)\n", *Status));
271  goto cleanup;
272  }
273 
275  &FullFileName,
277  NULL,
278  NULL );
279 
280  *Status = ZwCreateFile (
281  &FileHandleObject->FileHandle,
284  &IoStatusBlock,
285  NULL, // PLARGE_INTEGER AllocationSize
286  0, // ULONG FileAttributes
287  FILE_SHARE_READ, // ULONG ShareAccess
288  FILE_OPEN, // ULONG CreateDisposition
289  FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions
290  0, // PVOID EaBuffer
291  0 ); // ULONG EaLength
292 
293  if ( !NT_SUCCESS(*Status) )
294  {
295  NDIS_DbgPrint(MIN_TRACE, ("ZwCreateFile failed (%x) Name %wZ\n", *Status, FileName));
297  }
298 
299 cleanup:
300  if ( FullFileName.Buffer != NULL )
301  {
302  ExFreePool ( FullFileName.Buffer );
303  FullFileName.Buffer = NULL;
304  }
305  if ( !NT_SUCCESS(*Status) )
306  {
307  if( FileHandleObject ) {
308  ExFreePool ( FileHandleObject );
309  FileHandleObject = NULL;
310  }
311  *FileHandle = NULL;
312  }
313  else
314  *FileHandle = NDIS_POBJECT_TO_HANDLE(FileHandleObject);
315 
316  return;
317 }
318 
319 /*
320  * @implemented
321  */
322 CCHAR
323 EXPORT
325  VOID)
326 {
327  return KeNumberProcessors;
328 }
329 
330 
331 /*
332  * @implemented
333  */
334 VOID
335 EXPORT
337  OUT PULONG pIdleCount,
339  OUT PULONG pIndex)
340 /*
341  * FUNCTION:
342  * ARGUMENTS:
343  * NOTES:
344  * NDIS 5.0
345  */
346 {
347  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
348 
350 }
351 
352 
353 /*
354  * @implemented
355  */
356 VOID
357 EXPORT
359 {
361  LARGE_INTEGER TickCount;
362 
363  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
364 
365  /* Get the increment and current tick count */
367  KeQueryTickCount(&TickCount);
368 
369  /* Convert to milliseconds and return */
370  TickCount.QuadPart *= Increment;
371  TickCount.QuadPart /= (10 * 1000);
372  *pSystemUpTime = TickCount.LowPart;
373 }
374 
375 /*
376  * @implemented
377  */
378 #undef NdisInterlockedDecrement
379 LONG
380 EXPORT
382  IN PLONG Addend)
383 /*
384  * FUNCTION:
385  * ARGUMENTS:
386  * NOTES:
387  * NDIS 5.0
388  */
389 {
390  return InterlockedDecrement ( Addend );
391 }
392 
393 
394 /*
395  * @implemented
396  */
397 #undef NdisInterlockedIncrement
398 LONG
399 EXPORT
401  IN PLONG Addend)
402 /*
403  * FUNCTION:
404  * ARGUMENTS:
405  * NOTES:
406  * NDIS 5.0
407  */
408 {
409  return InterlockedIncrement ( Addend );
410 }
411 
412 
413 /*
414  * @implemented
415  */
416 #undef NdisInterlockedPopEntrySList
418 EXPORT
420  IN PSLIST_HEADER ListHead,
422 /*
423  * FUNCTION:
424  * ARGUMENTS:
425  * NOTES:
426  * NDIS 5.0
427  */
428 {
429  return (PSINGLE_LIST_ENTRY)ExInterlockedPopEntrySList ( ListHead, Lock );
430 }
431 
432 
433 /*
434  * @implemented
435  */
436 #undef NdisInterlockedPushEntrySList
438 EXPORT
440  IN PSLIST_HEADER ListHead,
441  IN PSINGLE_LIST_ENTRY ListEntry,
443 /*
444  * FUNCTION:
445  * ARGUMENTS:
446  * NOTES:
447  * NDIS 5.0
448  */
449 {
450  return (PSINGLE_LIST_ENTRY)ExInterlockedPushEntrySList ( ListHead, (PSLIST_ENTRY)ListEntry, Lock );
451 }
452 
453 
454 VOID
455 NTAPI
457 {
458  PNDIS_WORK_ITEM pNdisItem = (PNDIS_WORK_ITEM)pContext;
459 
460  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
461 
462  pNdisItem->Routine(pNdisItem, pNdisItem->Context);
463 }
464 
466 EXPORT
468  IN PNDIS_WORK_ITEM pWorkItem)
469 {
470  PWORK_QUEUE_ITEM pntWorkItem = (PWORK_QUEUE_ITEM)pWorkItem->WrapperReserved;
471 
472  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
473 
474  ExInitializeWorkItem(pntWorkItem, ndisProcWorkItemHandler, pWorkItem);
475  ExQueueWorkItem(pntWorkItem, DelayedWorkQueue);
476  return NDIS_STATUS_SUCCESS;
477 }
478 
479 /*
480  * @implemented
481  */
482 VOID
483 EXPORT
485  PULONG pCpuUsage)
486 /*
487  * FUNCTION: Returns how busy the current processor is as a percentage
488  * ARGUMENTS:
489  * pCpuUsage = Pointer to a buffer to place CPU usage
490  */
491 {
492  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
493 
495 }
496 
497 /*
498  * @implemented
499  */
500 ULONG
501 EXPORT
503 {
504  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
505 
507 }
508 
509 /*
510  * @implemented
511  */
512 UINT
513 EXPORT
515 {
516  NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
517 
518  return NDIS_VERSION;
519 }
520 
521 /*
522  * @implemented
523  */
524 UCHAR
525 EXPORT
527 {
528  UCHAR PartialCancelId;
529 
530  PartialCancelId = (UCHAR)InterlockedIncrement(&CancelId);
531 
532  NDIS_DbgPrint(MAX_TRACE, ("Cancel ID %u\n", PartialCancelId));
533 
534  return PartialCancelId;
535 }
536 
537 /* EOF */
VOID NTAPI ExGetCurrentProcessorCpuUsage(PULONG CpuUsage)
Definition: sysinfo.c:324
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
VOID EXPORT NdisOpenFile(OUT PNDIS_STATUS Status, OUT PNDIS_HANDLE FileHandle, OUT PUINT FileLength, IN PNDIS_STRING FileName, IN NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress)
Definition: misc.c:224
#define IN
Definition: typedefs.h:38
PVOID MapBuffer
Definition: misc.c:125
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3227
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
#define TRUE
Definition: types.h:120
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
Definition: work.c:717
VOID EXPORT NdisMapFile(OUT PNDIS_STATUS Status, OUT PVOID *MappedBuffer, IN NDIS_HANDLE FileHandle)
Definition: misc.c:149
VOID EXPORT NdisGetCurrentProcessorCounts(OUT PULONG pIdleCount, OUT PULONG pKernelAndUser, OUT PULONG pIndex)
Definition: misc.c:336
NTSYSAPI LONG NTAPI RtlCompareString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
Definition: ntbasedef.h:635
USHORT MaximumLength
Definition: env_spec_w32.h:370
CCHAR EXPORT NdisSystemProcessorCount(VOID)
Definition: misc.c:324
PLIST_ENTRY EXPORT NdisInterlockedInsertTailList(IN PLIST_ENTRY ListHead, IN PLIST_ENTRY ListEntry, IN PNDIS_SPIN_LOCK SpinLock)
Definition: misc.c:98
LONG EXPORT NdisInterlockedIncrement(IN PLONG Addend)
Definition: misc.c:400
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
PLIST_ENTRY NTAPI ExInterlockedInsertTailList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:140
struct _SINGLE_LIST_ENTRY *__fastcall ExInterlockedPushEntrySList(union _SLIST_HEADER *, struct _SINGLE_LIST_ENTRY *, unsigned long *)
VOID EXPORT NdisInterlockedAddLargeInteger(IN PLARGE_INTEGER Addend, IN LARGE_INTEGER Increment, IN PNDIS_SPIN_LOCK SpinLock)
Definition: misc.c:30
* PNDIS_STATUS
Definition: ndis.h:45
ULONG NTAPI KeQueryTimeIncrement(VOID)
Definition: clock.c:153
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
PLIST_ENTRY EXPORT NdisInterlockedInsertHeadList(IN PLIST_ENTRY ListHead, IN PLIST_ENTRY ListEntry, IN PNDIS_SPIN_LOCK SpinLock)
Definition: misc.c:84
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
ULONG FileLength
Definition: misc.c:124
#define FILE_SHARE_READ
Definition: compat.h:125
struct _NDIS_HANDLE_OBJECT * PNDIS_HANDLE_OBJECT
ULONG NTAPI KeGetRecommendedSharedDataAlignment(VOID)
Definition: cpu.c:471
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
int NDIS_STATUS
Definition: ntddndis.h:445
VOID NTAPI ndisProcWorkItemHandler(PVOID pContext)
Definition: misc.c:456
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
PVOID Context
Definition: ndis.h:2318
PSINGLE_LIST_ENTRY EXPORT NdisInterlockedPopEntrySList(IN PSLIST_HEADER ListHead, IN PKSPIN_LOCK Lock)
Definition: misc.c:419
HANDLE FileHandle
Definition: stats.c:38
VOID NTAPI ExGetCurrentProcessorCounts(PULONG ThreadKernelTime, PULONG TotalCpuTime, PULONG ProcessorNumber)
Definition: sysinfo.c:345
PLIST_ENTRY NTAPI ExInterlockedInsertHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PLIST_ENTRY ListEntry, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:114
VOID EXPORT NdisGetSystemUpTime(OUT PULONG pSystemUpTime)
Definition: misc.c:358
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _SINGLE_LIST_ENTRY *__fastcall ExInterlockedPopEntrySList(union _SLIST_HEADER *, unsigned long *)
#define UNICODE_NULL
long LONG
Definition: pedump.c:60
_In_ const STRING _In_ BOOLEAN CaseInSensitive
Definition: rtlfuncs.h:2276
#define FILE_READ_DATA
Definition: nt_native.h:628
VOID EXPORT NdisCloseFile(IN NDIS_HANDLE FileHandle)
Definition: misc.c:193
PLIST_ENTRY NTAPI ExInterlockedRemoveHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:166
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
NDIS_STATUS EXPORT NdisScheduleWorkItem(IN PNDIS_WORK_ITEM pWorkItem)
Definition: misc.c:467
VOID NTAPI KeQueryTickCount(IN PLARGE_INTEGER TickCount)
Definition: clock.c:165
ULONG EXPORT NdisGetSharedDataAlignment(VOID)
Definition: misc.c:502
HANDLE FileHandle
Definition: misc.c:122
#define NDIS_VERSION
Definition: ndissys.h:27
#define ExInitializeWorkItem(Item, Routine, Context)
Definition: exfuncs.h:265
PLIST_ENTRY EXPORT NdisInterlockedRemoveHeadList(IN PLIST_ENTRY ListHead, IN PNDIS_SPIN_LOCK SpinLock)
Definition: misc.c:113
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
char CCHAR
Definition: typedefs.h:50
VOID EXPORT NdisUnmapFile(IN NDIS_HANDLE FileHandle)
Definition: misc.c:178
LONG EXPORT NdisCompareUnicodeString(IN PNDIS_STRING String1, IN PNDIS_STRING String2, IN BOOLEAN CaseInSensitive)
Definition: misc.c:66
LONG EXPORT NdisInterlockedDecrement(IN PLONG Addend)
Definition: misc.c:381
#define PSLIST_ENTRY
Definition: rtltypes.h:130
_Out_ PVOID * MappedBuffer
Definition: ndis.h:3245
NDIS_PROC Routine
Definition: ndis.h:2319
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
#define NDIS_STATUS_ALREADY_MAPPED
Definition: ndis.h:494
unsigned char UCHAR
Definition: xmlstorage.h:181
static const WCHAR L[]
Definition: oid.c:1250
UCHAR EXPORT NdisGeneratePartialCancelId(VOID)
Definition: misc.c:526
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
#define InterlockedDecrement
Definition: armddk.h:52
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
LONG EXPORT NdisCompareAnsiString(IN PNDIS_ANSI_STRING String1, IN PNDIS_ANSI_STRING String2, BOOLEAN CaseInSensitive)
Definition: misc.c:49
_Out_ PNDIS_HANDLE _Out_ PUINT _In_ PNDIS_STRING _In_ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress
Definition: ndis.h:3227
ULONG LowPart
Definition: typedefs.h:104
Definition: typedefs.h:117
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
#define SYNCHRONIZE
Definition: nt_native.h:61
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
VOID EXPORT NdisInterlockedAddUlong(IN PULONG Addend, IN ULONG Increment, IN PNDIS_SPIN_LOCK SpinLock)
Definition: misc.c:17
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
Status
Definition: gdiplustypes.h:24
PSINGLE_LIST_ENTRY EXPORT NdisInterlockedPushEntrySList(IN PSLIST_HEADER ListHead, IN PSINGLE_LIST_ENTRY ListEntry, IN PKSPIN_LOCK Lock)
Definition: misc.c:439
#define FILE_OPEN
Definition: from_kernel.h:54
__inline PNDIS_HANDLE_OBJECT NDIS_HANDLE_TO_POBJECT(NDIS_HANDLE handle)
Definition: misc.c:130
_Out_ PULONG _Out_ PULONG pIndex
Definition: ndis.h:4564
#define InterlockedIncrement
Definition: armddk.h:53
#define MAX_TRACE
Definition: debug.h:16
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
struct _NDIS_WORK_ITEM * PNDIS_WORK_ITEM
_Out_ PULONG pKernelAndUser
Definition: ndis.h:4564
VOID EXPORT NdisGetCurrentProcessorCpuUsage(PULONG pCpuUsage)
Definition: misc.c:484
LARGE_INTEGER NTAPI ExInterlockedAddLargeInteger(IN OUT PLARGE_INTEGER Addend, IN LARGE_INTEGER Increment, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:62
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
BOOLEAN Mapped
Definition: misc.c:123
unsigned int * PULONG
Definition: retypes.h:1
unsigned int UINT
Definition: ndis.h:50
struct _WORK_QUEUE_ITEM * PWORK_QUEUE_ITEM
ULONG NTAPI ExInterlockedAddUlong(IN OUT PULONG Addend, IN ULONG Increment, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:88
#define NDIS_DbgPrint(_t_, _x_)
Definition: debug.h:40
static const WCHAR NDIS_FILE_FOLDER[]
Definition: misc.c:142
_In_ const STRING * String2
Definition: rtlfuncs.h:2245
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
#define OUT
Definition: typedefs.h:39
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
unsigned int ULONG
Definition: retypes.h:1
#define ASSERT_IRQL(x)
Definition: debug.h:42
UINT EXPORT NdisGetVersion(VOID)
Definition: misc.c:514
#define MIN_TRACE
Definition: debug.h:14
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
char * cleanup(char *str)
Definition: wpickclick.c:99
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:42
return STATUS_SUCCESS
Definition: btrfs.c:2745
#define memset(x, y, z)
Definition: compat.h:39
signed int * PLONG
Definition: retypes.h:5
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
unsigned int * PUINT
Definition: ndis.h:50
LONGLONG QuadPart
Definition: typedefs.h:112
LONG CancelId
Definition: main.c:23
struct _NDIS_HANDLE_OBJECT NDIS_HANDLE_OBJECT
__inline NDIS_HANDLE NDIS_POBJECT_TO_HANDLE(PNDIS_HANDLE_OBJECT obj)
Definition: misc.c:137