ReactOS  0.4.14-dev-606-g14ebc0b
misc.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYRIGHT.TXT
3  * PROJECT: Ext2 File System Driver for WinNT/2K/XP
4  * FILE: misc.c
5  * PROGRAMMER: Matt Wu <mattwu@163.com>
6  * HOMEPAGE: http://www.ext2fsd.com
7  * UPDATE HISTORY:
8  */
9 
10 /* INCLUDES *****************************************************************/
11 
12 #include "ext2fs.h"
13 
14 /* GLOBALS ***************************************************************/
15 
17 
18 /* DEFINITIONS *************************************************************/
19 
20 #ifdef ALLOC_PRAGMA
21 #pragma alloc_text(PAGE, Ext2Sleep)
22 #endif
23 
24 ULONG
26 {
27  ULONG Order = 0;
28 
29  ASSERT(Value > 0);
30 
31  while (Value) {
32  Order++;
33  Value >>= 1;
34  }
35 
36  return (Order - 1);
37 }
38 
41 {
42  LARGE_INTEGER SysTime;
43 
44  SysTime.QuadPart = 0;
45  RtlSecondsSince1970ToTime(i_time, &SysTime);
46 
47  return SysTime;
48 }
49 
50 ULONG
52 {
53  ULONG Ext2Time = 0;
54 
55  if (!RtlTimeToSecondsSince1970(&SysTime, &Ext2Time)) {
58  RtlTimeToSecondsSince1970(&NtTime, &Ext2Time);
59  }
60 
61  return Ext2Time;
62 }
63 
64 
65 ULONG
67  struct nls_table * PageTable,
68  IN OUT PUNICODE_STRING Unicode,
69  IN PANSI_STRING Mbs )
70 {
71  ULONG Length = 0;
72  int i, mbc = 0;
73  WCHAR uc;
74 
75  /* Count the length of the resulting Unicode. */
76  for (i = 0; i < Mbs->Length; i += mbc) {
77 
78  mbc = PageTable->char2uni(
79  (PUCHAR)&(Mbs->Buffer[i]),
80  Mbs->Length - i,
81  &uc
82  );
83 
84  if (mbc <= 0) {
85 
86  /* invalid character. */
87  if (mbc == 0 && Length > 0) {
88  break;
89  }
90  return 0;
91  }
92 
93  Length += 2;
94  }
95 
96  if (Unicode) {
97  if (Unicode->MaximumLength < Length) {
98 
99  DbgBreak();
100  return 0;
101  }
102 
103  Unicode->Length = 0;
104  mbc = 0;
105 
106  for (i = 0; i < Mbs->Length; i += mbc) {
107 
108  mbc = PageTable->char2uni(
109  (PUCHAR)&(Mbs->Buffer[i]),
110  Mbs->Length - i,
111  &uc
112  );
113  Unicode->Buffer[Unicode->Length/2] = uc;
114  Unicode->Length += 2;
115  }
116  }
117 
118  return Length;
119 }
120 
121 ULONG
123  struct nls_table * PageTable,
124  IN OUT PANSI_STRING Mbs,
125  IN PUNICODE_STRING Unicode)
126 {
127  ULONG Length = 0;
128  UCHAR mbs[0x10];
129  int i, mbc;
130 
131  /* Count the length of the resulting mbc-8. */
132  for (i = 0; i < (Unicode->Length / 2); i++) {
133 
134  RtlZeroMemory(mbs, 0x10);
135  mbc = PageTable->uni2char(
136  Unicode->Buffer[i],
137  mbs,
138  0x10
139  );
140 
141  if (mbc <= 0) {
142 
143  /* Invalid character. */
144  return 0;
145  }
146 
147  Length += mbc;
148  }
149 
150  if (Mbs) {
151 
152  if (Mbs->MaximumLength < Length) {
153 
154  DbgBreak();
155  return 0;
156  }
157 
158  Mbs->Length = 0;
159 
160  for (i = 0; i < (Unicode->Length / 2); i++) {
161 
162  mbc = PageTable->uni2char(
163  Unicode->Buffer[i],
164  mbs,
165  0x10
166  );
167 
169  (PUCHAR)&(Mbs->Buffer[Mbs->Length]),
170  &mbs[0],
171  mbc
172  );
173 
174  Mbs->Length += (USHORT)mbc;
175  }
176  }
177 
178  return Length;
179 }
180 
181 
182 ULONG
184  IN PEXT2_VCB Vcb,
185  IN PANSI_STRING Oem
186 )
187 {
188  ULONG Length = 0;
189 
190  if (Vcb->Codepage.PageTable) {
191  Length = Ext2MbsToUnicode(Vcb->Codepage.PageTable, NULL, Oem);
192  if (Length > 0) {
193  goto errorout;
194  }
195  }
196 
198 
199 errorout:
200 
201  return Length;
202 }
203 
204 
205 NTSTATUS
207  IN PEXT2_VCB Vcb,
208  IN OUT PUNICODE_STRING Unicode,
209  IN POEM_STRING Oem
210 )
211 {
213 
214 
215  if (Vcb->Codepage.PageTable) {
216  Status = Ext2MbsToUnicode(Vcb->Codepage.PageTable,
217  Unicode, Oem);
218 
219  if (Status >0 && Status == Unicode->Length) {
221  goto errorout;
222  }
223  }
224 
226  Unicode, Oem, FALSE );
227 
228  if (!NT_SUCCESS(Status)) {
229  DbgBreak();
230  goto errorout;
231  }
232 
233 errorout:
234 
235  return Status;
236 }
237 
238 ULONG
240  IN PEXT2_VCB Vcb,
241  IN PUNICODE_STRING Unicode
242 )
243 {
244  ULONG Length = 0;
245 
246  if (Vcb->Codepage.PageTable) {
247  Length = Ext2UnicodeToMbs(Vcb->Codepage.PageTable,
248  NULL, Unicode);
249  if (Length > 0) {
250  return Length;
251  }
252 
253  DbgBreak();
254  }
255 
256  return RtlxUnicodeStringToOemSize(Unicode);
257 }
258 
259 
260 NTSTATUS
262  IN PEXT2_VCB Vcb,
263  IN OUT POEM_STRING Oem,
264  IN PUNICODE_STRING Unicode)
265 {
267 
268  if (Vcb->Codepage.PageTable) {
269 
270  Status = Ext2UnicodeToMbs(Vcb->Codepage.PageTable,
271  Oem, Unicode);
272  if (Status > 0 && Status == Oem->Length) {
274  } else {
276  DbgBreak();
277  }
278 
279  goto errorout;
280  }
281 
283  Oem, Unicode, FALSE );
284 
285  if (!NT_SUCCESS(Status))
286  {
287  DbgBreak();
288  goto errorout;
289  }
290 
291 errorout:
292 
293  return Status;
294 }
295 
296 VOID
298 {
300  Timeout.QuadPart = (LONGLONG)ms*1000*(-10); /* ms/1000 sec*/
302 }
303 
305 {
306  switch (Status) {
308  return (-EACCES);
309 
311  return (-EFAULT);
312 
314  return (-ETOOSMALL);
315 
317  return (-EINVAL);
318 
321  return (-EOPNOTSUPP);
322 
325  return (-EADDRNOTAVAIL);
326 
328  case STATUS_NO_SUCH_FILE:
331  case STATUS_NETWORK_BUSY:
334  return (-ENETDOWN);
335 
339  return (-ENETUNREACH);
340 
344  return (-ECONNABORTED);
345 
347  case STATUS_LINK_FAILED:
351  return (-ECONNRESET);
352 
354  return (-ENOMEM);
355 
357  case STATUS_NO_MEMORY:
365  return (-ENOBUFS);
366 
368  return (-ENOTCONN);
369 
371  return (-ESHUTDOWN);
372 
373  case STATUS_TIMEOUT:
374  case STATUS_IO_TIMEOUT:
375  case STATUS_LINK_TIMEOUT:
376  return (-ETIMEDOUT);
377 
380  return (-ECONNREFUSED);
381 
383  return (-EHOSTUNREACH);
384 
385  case STATUS_CANT_WAIT:
386  case STATUS_PENDING:
387  return (-EAGAIN);
388 
390  return (-EIO);
391 
392  case STATUS_CANCELLED:
394  return (-EINTR);
395 
398  return (-EMSGSIZE);
399 
401  return (-EADDRINUSE);
402  }
403 
404  if (NT_SUCCESS (Status))
405  return 0;
406 
407  return (-EINVAL);
408 }
409 
411 {
412  switch (rc) {
413 
414  case 0:
415  return STATUS_SUCCESS;
416 
417  case -EPERM:
418  case -EACCES:
419  return STATUS_ACCESS_DENIED;
420 
421  case -ENOENT:
423 
424  case -EFAULT:
426 
427  case -ETOOSMALL:
429 
430  case -EBADMSG:
431  case -EBADF:
432  case -EINVAL:
433  case -EFBIG:
435 
436  case -EBUSY:
437  return STATUS_DEVICE_BUSY;
438 
439  case -ENOSYS:
440  return STATUS_NOT_IMPLEMENTED;
441 
442  case -ENOSPC:
443  return STATUS_DISK_FULL;
444 
445  case -EOPNOTSUPP:
446  return STATUS_NOT_SUPPORTED;
447 
448  case -EDEADLK:
450 
451  case -EEXIST:
453 
454  case -EIO:
456 
457  case -ENOTDIR:
458  return STATUS_NOT_A_DIRECTORY;
459 
460  case -EISDIR:
462 
463  case -ENOTEMPTY:
465 
466  case -ENODEV:
467  return STATUS_NO_SUCH_DEVICE;
468 
469  case -ENXIO:
470  return STATUS_INVALID_ADDRESS;
471 
472  case -EADDRNOTAVAIL:
473  return STATUS_INVALID_ADDRESS;
474 
475  case -ENETDOWN:
477 
478  case -ENETUNREACH:
480 
481  case -ECONNABORTED:
483 
484  case -ECONNRESET:
486 
487  case -ENOMEM:
489 
490  case -ENOBUFS:
491  return STATUS_NO_MEMORY;
492 
493  case -ENOTCONN:
495 
496  case -ESHUTDOWN:
498 
499  case -ETIMEDOUT:
500  return STATUS_TIMEOUT;
501 
502  case -ECONNREFUSED:
504 
505  case -EHOSTUNREACH:
507 
508  case -EAGAIN:
509  return STATUS_CANT_WAIT;
510 
511  case -EINTR:
512  return STATUS_CANCELLED;
513 
514  case -EMSGSIZE:
516 
517  case -EADDRINUSE:
519  }
520 
521  return STATUS_UNSUCCESSFUL;
522 }
523 
525 {
526  return (name->Length == 2 && name->Buffer[0] == L'.');
527 }
528 
530 {
531  return (name->Length == 4 && name->Buffer[0] == L'.' &&
532  name->Buffer[1] == L'.');
533 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
#define STATUS_OBJECT_NAME_COLLISION
Definition: udferr_usr.h:150
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define STATUS_WORKING_SET_QUOTA
Definition: ntstatus.h:383
#define STATUS_INVALID_CONNECTION
Definition: ntstatus.h:542
#define IN
Definition: typedefs.h:38
ULONG Ext2Log2(ULONG Value)
Definition: misc.c:25
#define STATUS_CONNECTION_REFUSED
Definition: ntstatus.h:684
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_FILE_IS_A_DIRECTORY
Definition: udferr_usr.h:164
#define STATUS_CONNECTION_RESET
Definition: ntstatus.h:643
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STATUS_TOO_MANY_ADDRESSES
Definition: ntstatus.h:639
#define STATUS_QUOTA_EXCEEDED
Definition: ntstatus.h:290
#define STATUS_PIPE_DISCONNECTED
Definition: ntstatus.h:398
#define STATUS_REMOTE_RESOURCES
Definition: ntstatus.h:539
#define ECONNABORTED
Definition: errno.h:114
ULONG Ext2LinuxTime(IN LARGE_INTEGER SysTime)
Definition: misc.c:51
#define EFBIG
Definition: errno.h:33
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
ULONG Ext2UnicodeToMbs(struct nls_table *PageTable, IN OUT PANSI_STRING Mbs, IN PUNICODE_STRING Unicode)
Definition: misc.c:122
static PMEM_HOOK PageTable[TOTAL_PAGES]
Definition: memory.c:40
#define STATUS_DIRECTORY_NOT_EMPTY
Definition: udferr_usr.h:167
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
Definition: arc.h:38
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
Definition: arc.h:39
unsigned char * PUCHAR
Definition: retypes.h:3
VOID Ext2Sleep(ULONG ms)
Definition: misc.c:297
#define EINTR
Definition: acclib.h:80
ULONG Ext2OEMToUnicodeSize(IN PEXT2_VCB Vcb, IN PANSI_STRING Oem)
Definition: misc.c:183
#define EOPNOTSUPP
Definition: errno.h:104
LONG NTSTATUS
Definition: precomp.h:26
#define EDEADLK
Definition: errno.h:39
Definition: arc.h:37
#define ENOBUFS
Definition: errno.h:116
Definition: arc.h:52
Definition: arc.h:36
Definition: arc.h:48
#define STATUS_PAGEFILE_QUOTA
Definition: ntstatus.h:230
#define STATUS_HOST_UNREACHABLE
Definition: ntstatus.h:691
#define EEXIST
Definition: acclib.h:88
#define STATUS_ADDRESS_ALREADY_EXISTS
Definition: ntstatus.h:640
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define ECONNREFUSED
Definition: errno.h:122
#define STATUS_TOO_MANY_PAGING_FILES
Definition: ntstatus.h:373
#define STATUS_LINK_TIMEOUT
Definition: ntstatus.h:541
#define STATUS_TIMEOUT
Definition: ntstatus.h:81
#define ENETUNREACH
Definition: errno.h:112
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
Definition: glfuncs.h:248
#define STATUS_NOT_A_DIRECTORY
Definition: udferr_usr.h:169
#define STATUS_REMOTE_DISCONNECT
Definition: ntstatus.h:538
#define ECONNRESET
Definition: errno.h:115
#define ENOTEMPTY
Definition: errno.h:47
NTSTATUS NTAPI KeDelayExecutionThread(IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Interval OPTIONAL)
Definition: wait.c:283
#define STATUS_BAD_NETWORK_PATH
Definition: ntstatus.h:412
Definition: arc.h:49
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
Definition: arc.h:35
ULONG Ext2UnicodeToOEMSize(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
Definition: misc.c:239
Definition: arc.h:50
#define ETOOSMALL
Definition: errno.h:149
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:636
int64_t LONGLONG
Definition: typedefs.h:66
#define ENOSYS
Definition: errno.h:45
#define STATUS_CONNECTION_DISCONNECTED
Definition: ntstatus.h:642
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
#define ENOTCONN
Definition: errno.h:118
ULONG Ext2MbsToUnicode(struct nls_table *PageTable, IN OUT PUNICODE_STRING Unicode, IN PANSI_STRING Mbs)
Definition: misc.c:66
int Ext2LinuxError(NTSTATUS Status)
Definition: misc.c:304
#define Vcb
Definition: cdprocs.h:1425
#define STATUS_CANCELLED
Definition: udferr_usr.h:170
LARGE_INTEGER Ext2NtTime(IN ULONG i_time)
Definition: misc.c:40
#define STATUS_NETWORK_BUSY
Definition: ntstatus.h:413
#define STATUS_OBJECT_PATH_NOT_FOUND
Definition: udferr_usr.h:151
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define EADDRNOTAVAIL
Definition: errno.h:110
unsigned char UCHAR
Definition: xmlstorage.h:181
#define STATUS_CONNECTION_ABORTED
Definition: ntstatus.h:695
Definition: arc.h:34
_In_ PLARGE_INTEGER NtTime
Definition: fatprocs.h:1905
BOOLEAN Ext2IsDotDot(PUNICODE_STRING name)
Definition: misc.c:529
static const WCHAR L[]
Definition: oid.c:1250
BOOLEAN Ext2IsDot(PUNICODE_STRING name)
Definition: misc.c:524
#define STATUS_COMMITMENT_LIMIT
Definition: ntstatus.h:523
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define STATUS_TRANSACTION_ABORTED
Definition: ntstatus.h:645
NTSYSAPI NTSTATUS NTAPI RtlOemStringToUnicodeString(PUNICODE_STRING DestinationString, PCOEM_STRING SourceString, BOOLEAN AllocateDestinationString)
#define STATUS_POSSIBLE_DEADLOCK
Definition: ntstatus.h:623
#define EADDRINUSE
Definition: errno.h:109
#define STATUS_REQUEST_ABORTED
Definition: udferr_usr.h:183
Status
Definition: gdiplustypes.h:24
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
#define STATUS_INVALID_ADDRESS_COMPONENT
Definition: ntstatus.h:637
Definition: arc.h:45
static ULONG Timeout
Definition: ping.c:61
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
unsigned short USHORT
Definition: pedump.c:61
#define ESHUTDOWN
Definition: errno.h:119
#define STATUS_INVALID_ADDRESS
Definition: ntstatus.h:543
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:1080
#define STATUS_DEVICE_BUSY
Definition: udferr_usr.h:129
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
#define STATUS_NO_SUCH_FILE
Definition: udferr_usr.h:137
Definition: arc.h:46
#define EBADMSG
Definition: errno.h:80
#define STATUS_PROTOCOL_UNREACHABLE
Definition: ntstatus.h:692
Definition: arc.h:40
Definition: arc.h:41
#define STATUS_IO_TIMEOUT
Definition: udferr_usr.h:163
#define ENETDOWN
Definition: errno.h:111
#define STATUS_REMOTE_NOT_LISTENING
Definition: ntstatus.h:410
char mbc
#define STATUS_LOCAL_DISCONNECT
Definition: ntstatus.h:537
#define STATUS_UNEXPECTED_IO_ERROR
Definition: ntstatus.h:455
#define STATUS_UNEXPECTED_NETWORK_ERROR
Definition: ntstatus.h:418
#define EHOSTUNREACH
Definition: errno.h:124
Definition: name.c:38
#define OUT
Definition: typedefs.h:39
#define STATUS_DISK_FULL
Definition: udferr_usr.h:155
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS Ext2UnicodeToOEM(IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
Definition: misc.c:261
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define EMSGSIZE
Definition: errno.h:97
#define ETIMEDOUT
Definition: errno.h:121
#define DbgBreak()
Definition: ext2fs.h:46
NTSTATUS Ext2WinntError(int rc)
Definition: misc.c:410
char mbs[5]
#define STATUS_LINK_FAILED
Definition: ntstatus.h:540
#define STATUS_PORT_UNREACHABLE
Definition: ntstatus.h:693
NTSTATUS Ext2OEMToUnicode(IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Unicode, IN POEM_STRING Oem)
Definition: misc.c:206
#define STATUS_INVALID_NETWORK_RESPONSE
Definition: ntstatus.h:417
#define STATUS_CONFLICTING_ADDRESSES
Definition: ntstatus.h:247
return STATUS_SUCCESS
Definition: btrfs.c:2938
#define STATUS_NETWORK_UNREACHABLE
Definition: ntstatus.h:690
#define EPERM
Definition: acclib.h:78
#define RtlOemStringToCountedUnicodeSize(STRING)
LONGLONG QuadPart
Definition: typedefs.h:112
#define STATUS_CANT_WAIT
Definition: ntstatus.h:438
#define STATUS_DEVICE_NOT_READY
Definition: shellext.h:70