home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / praxis / Streams.exe / Streams.exe / streams.h < prev   
Encoding:
C/C++ Source or Header  |  1999-02-22  |  2.8 KB  |  102 lines

  1.  
  2. //
  3. // return code type
  4. //
  5. typedef INT NTSTATUS;
  6.  
  7. //
  8. // Check for success
  9. //
  10. #define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
  11.  
  12. //
  13. // The NT return codes we care about
  14. //
  15. #define STATUS_BUFFER_OVERFLOW           ((NTSTATUS)0x80000005L)
  16.  
  17. //--------------------------------------------------------------------
  18. //     N T F S C O N T R O L F I L E   D E F I N I T I O N S
  19. //--------------------------------------------------------------------
  20.  
  21. //
  22. // Prototype for NtFsControlFile and data structures
  23. // used in its definition
  24. //
  25.  
  26. //
  27. // Io Status block (see NTDDK.H)
  28. //
  29. typedef struct _IO_STATUS_BLOCK {
  30.     NTSTATUS Status;
  31.     ULONG Information;
  32. } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
  33.  
  34.  
  35. //
  36. // Apc Routine (see NTDDK.H)
  37. //
  38. typedef VOID (*PIO_APC_ROUTINE) (
  39.                 PVOID ApcContext,
  40.                 PIO_STATUS_BLOCK IoStatusBlock,
  41.                 ULONG Reserved
  42.             );
  43.  
  44. //
  45. // File information classes (see NTDDK.H)
  46. //
  47. typedef enum _FILE_INFORMATION_CLASS {
  48. // end_wdm
  49.     FileDirectoryInformation       = 1,
  50.     FileFullDirectoryInformation, // 2
  51.     FileBothDirectoryInformation, // 3
  52.     FileBasicInformation,         // 4  wdm
  53.     FileStandardInformation,      // 5  wdm
  54.     FileInternalInformation,      // 6
  55.     FileEaInformation,            // 7
  56.     FileAccessInformation,        // 8
  57.     FileNameInformation,          // 9
  58.     FileRenameInformation,        // 10
  59.     FileLinkInformation,          // 11
  60.     FileNamesInformation,         // 12
  61.     FileDispositionInformation,   // 13
  62.     FilePositionInformation,      // 14 wdm
  63.     FileFullEaInformation,        // 15
  64.     FileModeInformation,          // 16
  65.     FileAlignmentInformation,     // 17
  66.     FileAllInformation,           // 18
  67.     FileAllocationInformation,    // 19
  68.     FileEndOfFileInformation,     // 20 wdm
  69.     FileAlternateNameInformation, // 21
  70.     FileStreamInformation,        // 22
  71.     FilePipeInformation,          // 23
  72.     FilePipeLocalInformation,     // 24
  73.     FilePipeRemoteInformation,    // 25
  74.     FileMailslotQueryInformation, // 26
  75.     FileMailslotSetInformation,   // 27
  76.     FileCompressionInformation,   // 28
  77.     FileObjectIdInformation,      // 29
  78.     FileCompletionInformation,    // 30
  79.     FileMoveClusterInformation,   // 31
  80.     FileQuotaInformation,         // 32
  81.     FileReparsePointInformation,  // 33
  82.     FileNetworkOpenInformation,   // 34
  83.     FileAttributeTagInformation,  // 35
  84.     FileTrackingInformation,      // 36
  85.     FileMaximumInformation
  86. // begin_wdm
  87. } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
  88.  
  89.  
  90. //
  91. // Streams information
  92. //
  93. #pragma pack(4)
  94. typedef struct {
  95.     ULONG                NextEntry;
  96.     ULONG                NameLength;
  97.     LARGE_INTEGER        Size;
  98.     LARGE_INTEGER        AllocationSize;
  99.     USHORT                Name[1];
  100. } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
  101. #pragma pack()
  102.