pszFileName (PSZ) - input
In the Raw File System, this is the universal naming convention (UNC) name for either a logical partition or physical disk.
Logical partitions are identified using a UNC name in the form of: \\.\X:, where X is replaced with the letter corresponding to the drive.
Physical disks are identified with a UNC name in the form of: \\.\Physical_Disk#, where # is replaced with the physical disk number as reported by the FDISK utility.
pHf (PHFILE) - output
pulAction (PULONG) - output
If DosOpen fails, this value has no meaning. Otherwise, it is one of the following values:
cbFile (ULONG) - input
This parameter is significant only when creating a new file or replacing an existing one. Otherwise, it is ignored. It is an error to create or replace a file with a nonzero length if the fsOpenMode Access-Mode flag is set to read-only.
ulAttribute (ULONG) - input
This parameter is significant only when manipulating a file, it is ignored on raw file system devices.
Possible values are shown in the following list.:
Bit
These bits may be set individually or in combination. For example, an attribute value of 0x00000021 (bits 5 and 0 set to 1) indicates a read-only file that has been archived.
fsOpenFlags (ULONG) - input
This parameter is not used in the raw file system.
Possible values are shown in the following list:
Bits
0000
0000
fsOpenMode (ULONG) - input
Bit
Media I/O errors generated through Category 08h Logical Disk Control IOCtl Commands always get reported directly to the caller by way of return code. The Fail-Errors function applies only to non-IOCtl handle-based file I/O calls.
This flag bit is not inherited by child processes.
The setting of this bit determines whether file-system drivers should place data into the cache. Like the write-through bit, this is a per-handle bit, and is not inherited by child processes.
000
This bit is not inherited by child processes.
001
000
File sharing requires the cooperation of sharing processes. This cooperation is communicated through sharing and access modes. Any sharing restrictions placed on a file opened by a process are removed when the process closes the file with a DosClose request.
Sharing Mode
If the file is inherited by a child process, all sharing and access restrictions also are inherited.
If an open file handle is duplicated by a call to DosDupHandle, all sharing and access restrictions also are duplicated.
When a device is opened in the raw file system, the only valid access mode is OPEN_ACCESS_READWRITE. The valid sharing modes are:
Mode
peaop2 (PEAOP2) - in/out
This parameter is only used to specify extended attributes (EAs) when creating a new file, replacing an existing file, or truncating an existing file. It is ignored when used on a device. When opening existing files, it should be set to null.
Input
If peaop2 is zero, then no extended attributes are defined for the file.
If extended attributes are not to be defined or modified, the pointer peaop2 must be set to zero.
ulrc (APIRET) - returns
DosOpen returns one of the following values: