V
vertigo
Hello
I use some win 32 API function for example:
HANDLE CreateFile(
LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
my code:
[DllImport("kernel32.dll")]
static extern IntPtr CreateFile(string name, int DesiredAccess, int
ShareMode, IntPtr securityAttributes, int CreationDisposition,
int FlagsAndAttributes, IntPtr TemplateFile);
later:
Handle = CreateFile( Name, GENERIC_WRITE, FILE_SHARE_READ, IntPtr.Zero,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero );
But i compiler does not know these constants: GENERIC_WRITE,
FILE_SHARE_READ, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL.
How can i access them ?
Thanx
Michal
I use some win 32 API function for example:
HANDLE CreateFile(
LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
my code:
[DllImport("kernel32.dll")]
static extern IntPtr CreateFile(string name, int DesiredAccess, int
ShareMode, IntPtr securityAttributes, int CreationDisposition,
int FlagsAndAttributes, IntPtr TemplateFile);
later:
Handle = CreateFile( Name, GENERIC_WRITE, FILE_SHARE_READ, IntPtr.Zero,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero );
But i compiler does not know these constants: GENERIC_WRITE,
FILE_SHARE_READ, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL.
How can i access them ?
Thanx
Michal