home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / cecko / install / devcpp4920.exe / include / ntdef.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-14  |  1.4 KB  |  52 lines

  1. #ifndef _NTDEF_H
  2. #define _NTDEF_H
  3. #define NTAPI __stdcall
  4. #define OBJ_INHERIT 2L
  5. #define OBJ_PERMANENT 16L
  6. #define OBJ_EXCLUSIVE 32L
  7. #define OBJ_CASE_INSENSITIVE 64L
  8. #define OBJ_OPENIF 128L
  9. #define OBJ_OPENLINK 256L
  10. #define OBJ_VALID_ATTRIBUTES 498L
  11. #define InitializeObjectAttributes(p,n,a,r,s) { \
  12.   (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
  13.   (p)->RootDirectory = (r); \
  14.   (p)->Attributes = (a); \
  15.   (p)->ObjectName = (n); \
  16.   (p)->SecurityDescriptor = (s); \
  17.   (p)->SecurityQualityOfService = NULL; \
  18. }
  19. #ifndef NT_SUCCESS
  20. #define NT_SUCCESS(x) ((x)>=0)
  21. #define STATUS_SUCCESS ((NTSTATUS)0)
  22. #endif
  23. #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
  24. typedef LONG NTSTATUS, *PNTSTATUS;
  25. typedef struct _UNICODE_STRING {
  26.   USHORT Length;
  27.   USHORT MaximumLength;
  28.   PWSTR  Buffer;
  29. } UNICODE_STRING, *PUNICODE_STRING;
  30. typedef struct _STRING {
  31.   USHORT Length;
  32.   USHORT MaximumLength;
  33.   PCHAR  Buffer;
  34. } STRING, *PSTRING;
  35. #endif
  36. typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
  37. typedef enum _SECTION_INHERIT {
  38.   ViewShare = 1,
  39.   ViewUnmap = 2
  40. } SECTION_INHERIT;
  41. #if !defined(_NTSECAPI_H)
  42. typedef struct _OBJECT_ATTRIBUTES {
  43.   ULONG Length;
  44.   HANDLE RootDirectory;
  45.   PUNICODE_STRING ObjectName;
  46.   ULONG Attributes;                      
  47.   PVOID SecurityDescriptor;              
  48.   PVOID SecurityQualityOfService;
  49. } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
  50. #endif
  51. #endif /* _NTDEF_H */
  52.