typedef struct tagOFSTRUCT { /* of */
BYTE cBytes;
BYTE fFixedDisk;
UINT nErrCode;
BYTE reserved[4];
BYTE szPathName[128];
} OFSTRUCT;
The OFSTRUCT structure contains file information which results from opening that file.
cBytes
Specifies the length, in bytes, of the OFSTRUCT structure.
fFixedDisk
Specifies whether the file is on a fixed disk. The fFixedDisk member is nonzero if the file is on a fixed disk.
nErrCode
Specifies the MS-DOS error value if the OpenFile function returns –1 (that is, OpenFile fails). For a list of possible error values, see the following Comments section.
reserved
Reserved member. Four bytes reserved for future use.
szPathName
Specifies 128 bytes that contain the path of the file. This string consists of characters from the OEM character set.
The error values that may be specified in the nErrCode parameter follow:
Value | Meaning |
0x0001 | Invalid function |
0x0002 | File not found |
0x0003 | Path not found |
0x0004 | Too many open files |
0x0005 | Access denied |
0x0006 | Invalid handle |
0x0007 | Arena trashed |
0x0008 | Not enough memory |
0x0009 | Invalid block |
0x000A | Bad environment |
0x000B | Bad format |
0x000C | Invalid access |
0x000D | Invalid data |
0x000F | Invalid drive |
0x0010 | Current directory |
0x0011 | Not same device |
0x0012 | No more files |
0x0013 | Write protect error |
0x0014 | Bad unit |
0x0015 | Not ready |
0x0016 | Bad command |
0x0017 | CRC error |
0x0018 | Bad length |
0x0019 | Seek error |
0x001A | Not MS-DOS disk |
0x001B | Sector not found |
0x001C | Out of paper |
0x001D | Write fault |
0x001E | Read fault |
0x001F | General failure |
0x0020 | Sharing violation |
0x0021 | Lock violation |
0x0022 | Wrong disk |
0x0023 | File control block unavailable |
0x0024 | Sharing buffer exceeded |
0x0032 | Not supported |
0x0033 | Remote not listed |
0x0034 | Duplicate name |
0x0035 | Bad netpath |
0x0036 | Network busy |
0x0037 | Device does not exist |
0x0038 | Too many commands |
0x0039 | Adaptor hardware error |
0x003A | Bad network response |
0x003B | Unexpected network error |
0x003C | Bad remote adaptor |
0x003D | Print queue full |
0x003E | No spool space |
0x003F | Print canceled |
0x0040 | Netname deleted |
0x0041 | Network access denied |
0x0042 | Bad device type |
0x0043 | Bad network name |
0x0044 | Too many names |
0x0045 | Too many sessions |
0x0046 | Sharing paused |
0x0047 | Request not accepted |
0x0048 | Redirection paused |
0x0050 | File exists |
0x0051 | Duplicate file control block |
0x0052 | Cannot make |
0x0053 | Interrupt 24 failure |
0x0054 | Out of structures |
0x0055 | Already assigned |
0x0056 | Invalid password |
0x0057 | Invalid parameter |
0x0058 | Net write fault |