See Also
Call this method to create or open a file.
HRESULT Create( LPCTSTR szFilename, DWORD dwDesiredAccess, DWORD dwShareMode, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL, LPSECURITY_ATTRIBUTES lpsa = NULL, HANDLE hTemplateFile = NULL ) throw( );
Parameters
-
szFilename
- The file name. dwDesiredAccess
- The desired access. See dwDesiredAccess in tabindex="0" keywords="_win32_CreateFile"/>CreateFile in the Platform SDK. dwShareMode
- The share mode. See dwShareMode in CreateFile. dwCreationDisposition
- The creation disposition. See dwCreationDisposition in CreateFile. dwFlagsAndAttributes
- The flags and attributes. See dwFlagsAndAttributes in CreateFile. lpsa
- The security attributes. See lpSecurityAttributes in CreateFile. hTemplateFile
- The template file. See hTemplateFile in CreateFile.
Return Value
Returns S_OK on success, or an error HRESULT on failure.
[in] Pointer to a null-terminated string that specifies the name of the object to create or open.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "//?/" to the path. For more information, see Naming a File.
<