EaseFilter Demo Project
WinDataStructures.cs
Go to the documentation of this file.
1 //
3 // (C) Copyright 2011 EaseFilter Technologies Inc.
4 // All Rights Reserved
5 //
6 // This software is part of a licensed software product and may
7 // only be used or copied in accordance with the terms of that license.
8 //
10 
11 using System;
12 using System.Collections.Generic;
13 using System.Text;
14 
15 namespace EaseFilter.CommonObjects
16 {
17  static public class WinData
18  {
19  //for Disposition,ShareAccess,DesiredAccess,CreateOptions Please reference Winddows API CreateFile
20  //http://msdn.microsoft.com/en-us/library/aa363858%28v=vs.85%29.aspx
21 
22  public enum Disposition : uint
23  {
24  FILE_SUPERSEDE = 0,
25  FILE_OPEN,
30  }
31 
32  public enum ShareAccess : uint
33  {
34  SHARE_READ = 1,
35  SHARE_WRITE = 2,
36  SHARE_READ_WRITE = 3,
37  SHARE_DELETE = 4,
41  }
42 
43  public enum DisiredAccess : uint
44  {
45  DELETE = 0x00010000,
46  READ_CONTROL = 0x00020000,
47  WRITE_DAC = 0x00040000,
48  WRITE_OWNER = 0x00080000,
49  SYNCHRONIZE = 0x00100000,
50  STANDARD_RIGHTS_REQUIRED = 0x000F0000,
51  STANDARD_RIGHTS_ALL = 0x001F0000,
52  SPECIFIC_RIGHTS_ALL = 0x0000FFFF,
53  ACCESS_SYSTEM_SECURITY = 0x01000000,
54  MAXIMUM_ALLOWED = 0x02000000,
55  GENERIC_READ = 0x80000000,
56  GENERIC_WRITE = 0x40000000,
57  GENERIC_EXECUTE = 0x20000000,
58  GENERIC_ALL = 0x10000000,
59  FILE_READ_DATA = 1,
60  FILE_WRITE_DATA = 2,
61  FILE_APPEND_DATA = 0x0004, // file
62  FILE_READ_EA = 0x0008, // file & directory
63  FILE_WRITE_EA = 0x0010, // file & directory
64  FILE_EXECUTE = 0x0020, // file
65  FILE_DELETE_CHILD = 0x0040, // directory
66  FILE_READ_ATTRIBUTES = 0x0080, // all
67  FILE_WRITE_ATTRIBUTES = 0x0100, // all
68 
69  }
70 
71  public enum CreateOptions : uint
72  {
73  FILE_DIRECTORY_FILE = 0x00000001,
74  FILE_WRITE_THROUGH = 0x00000002,
75  FILE_SEQUENTIAL_ONLY = 0x00000004,
76  FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008,
77  FILE_SYNCHRONOUS_IO_ALERT = 0x00000010,
78  FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020,
79  FILE_NON_DIRECTORY_FILE = 0x00000040,
80  FILE_CREATE_TREE_CONNECTION = 0x00000080,
81  FILE_COMPLETE_IF_OPLOCKED = 0x00000100,
82  FILE_NO_EA_KNOWLEDGE = 0x00000200,
83  FILE_OPEN_REMOTE_INSTANCE = 0x00000400,
84  FILE_RANDOM_ACCESS = 0x00000800,
85  FILE_DELETE_ON_CLOSE = 0x00001000,
86  FILE_OPEN_BY_FILE_ID = 0x00002000,
87  FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000,
88  FILE_NO_COMPRESSION = 0x00008000,
89  FILE_OPEN_REQUIRING_OPLOCK = 0x00010000,
90  FILE_DISALLOW_EXCLUSIVE = 0x00020000,
91  FILE_RESERVE_OPFILTER = 0x00100000,
92  FILE_OPEN_REPARSE_POINT = 0x00200000,
93  FILE_OPEN_NO_RECALL = 0x00400000,
94  FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000,
95  FO_REMOTE_ORIGIN = 0x01000000,
96  }
97 
98  //this is the status for post create request.
99  public enum CreateStatus : uint
100  {
101  FILE_SUPERSEDED = 0x00000000,
102  FILE_OPENED = 0x00000001,
103  FILE_CREATED = 0x00000002,
104  FILE_OVERWRITTEN = 0x00000003,
105  FILE_EXISTS = 0x00000004,
106  FILE_DOES_NOT_EXIST = 0x00000005,
107  }
108 
110 
111  //
112  // Define the file information class values,for more information please reference
113  // http://msdn.microsoft.com/en-us/library/ff543439%28v=vs.85%29.aspx
114  //
115  public enum FileInfomationClass : uint
116  {
123  FileEaInformation, // 7
125  FileNameInformation, // 9
126  FileRenameInformation, // 10
127  FileLinkInformation, // 11
128  FileNamesInformation, // 12
131  FileFullEaInformation, // 15
132  FileModeInformation, // 16
134  FileAllInformation, // 18
138  FileStreamInformation, // 22
139  FilePipeInformation, // 23
148  FileQuotaInformation, // 32
173  }
174 
175  public enum SecurityInformation : uint
176  {
177  OWNER_SECURITY_INFORMATION = 0x00000001,
178  GROUP_SECURITY_INFORMATION = 0x00000002,
179  DACL_SECURITY_INFORMATION = 0x00000004,
180  SACL_SECURITY_INFORMATION = 0x00000008,
181  LABEL_SECURITY_INFORMATION = 0x00000010,
182  }
183 
184  public struct FileBasicInformation
185  {
186  public long CreationTime;
187  public long LastAccessTime;
188  public long LastWriteTime;
189  public long ChangeTime;
190  public uint FileAttributes;
191  }
192 
194  {
195  public long AllocationSize;
196  public long EndOfFile;
197  public uint NumberOfLinks;
198  public bool DeletePending;
199  public bool Directory;
200  }
201 
203  {
204  public long CreationTime;
205  public long LastAccessTime;
206  public long LastWriteTime;
207  public long ChangeTime;
208  public long AllocationSize;
209  public long FileSize;
210  public uint FileAttributes;
211  }
212 
213  //end of information structure-----------------------------------------------------------------------------------
214 
215  }
216 }
Disposition
CreateOptions
CreateStatus
ShareAccess

Social Network


Services Overview

Architect, implement and test file system filter drivers for a wide range of functionality. We can offer several levels of assistance to meet your specific.

Contact Us

You are welcome to contact us for salse or partnership.

Sales: sales@easefilter.com
Support: support@easefilter.com
Info: info@easefilter.com