,


DwCreationDistribution , , . :
CREATE_NEW . - .
CREATE_ALWAYS . , .
OPEN_EXISTING . , .
OPEN_ALWAYS . ..
TRUNCATE_EXISTING . . GENERIC_WRITE. , .
WINBASE.H
#define CREATE_NEW 1
#define CREATE_ALWAYS 2
#define OPEN_EXISTING 3
#define OPEN_ALWAYS 4
#define TRUNCATE_EXISTING 5

dwFlagsAndAttributes
Attribute Meaning
FILE_ATTRIBUTE_ARCHIVE . .
FILE_ATTRIBUTE_COMPRESSED .
FILE_ATTRIBUTE_HIDDEN .
FILE_ATTRIBUTE_NORMAL .
FILE_ATTRIBUTE_READONLY . .
FILE_ATTRIBUTE_SYSTEM .
FILE_ATTRIBUTE_TEMPORARY .
HTemplateFile GENERIC_READ.
Windows 95: NULL, .
:
( ). INVALID_HANDLE_VALUE (-1/ WINBASE.H).
GetLastError.
( )
CloseHandle :
BOOL CloseHandle(
HANDLE hObject //
);

: true ; false ( )