[This is preliminary documentation and subject to change.]
The OpenRaw function opens the specified encrypted file for a backup (export) operation or opens the file for a restore (import) operation.
DWORD OpenRaw(
LPCTSTR lpFileName,
ULONG ulFlags,
PVOID *pvContext
);
Value | Meaning |
---|---|
0 | The file is being opened for export (backup). This is the default option. |
CREATE_FOR_IMPORT | The file is being opened for import (restore). |
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
To back up an encrypted file, call OpenRaw to open the file, then call ReadRaw. When the operation is completed, call CloseRaw.
To restore an encrypted file, call OpenRaw specifying CREATE_FOR_IMPORT in the ulFlags parameter, then call WriteRaw. When the operation is completed, call CloseRaw.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
File Systems Overview, File System Functions, CloseRaw, ReadRaw, WriteRaw