Open Files 5.3.0
Multi-Platform Event-Driven Application Framework
file.h File Reference
#include "ofc/core.h"
#include "ofc/types.h"
#include "ofc/config.h"
#include "ofc/handle.h"
#include "ofc/fstype.h"
Include dependency graph for file.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _OFC_FILETIME
 
struct  _OFC_SECURITY_ATTRIBUTES
 
struct  _OFC_WIN32_FIND_DATAW
 
struct  _OFC_WIN32_FIND_DATAA
 
struct  _OFC_WIN32_FILE_ATTRIBUTE_DATA
 
struct  _OFC_OVERLAPPED
 
struct  _OFC_FILE_BASIC_INFO
 
struct  _OFC_FILE_INTERNAL_INFO
 
struct  _OFC_FILE_EA_INFO
 
struct  _OFC_FILE_ACCESS_INFO
 
struct  _OFC_FILE_POSITION_INFO
 
struct  _OFC_FILE_MODE_INFO
 
struct  _OFC_FILE_ALIGNMENT_INFO
 
struct  _OFC_FILE_NETWORK_OPEN_INFO
 
struct  _OFC_FILE_STANDARD_INFO
 
struct  _OFC_FILE_NAME_INFO
 
struct  _OFC_FILE_RENAME_INFO
 
struct  _OFC_FILE_DISPOSITION_INFO
 
struct  _OFC_FILE_ALLOCATION_INFO
 
struct  _OFC_FILE_END_OF_FILE_INFO
 
struct  _OFC_FILE_STREAM_INFO
 
struct  _OFC_FILE_COMPRESSION_INFO
 
struct  _OFC_FILE_ATTRIBUTE_TAG_INFO
 
struct  _OFC_FILE_DIR_INFO
 
struct  _OFC_FILE_FULL_DIR_INFO
 
struct  _OFC_FILE_ID_FULL_DIR_INFO
 
struct  _OFC_FILE_BOTH_DIR_INFO
 
struct  _OFC_FILE_ID_BOTH_DIR_INFO
 
struct  _OFC_FILE_ALL_INFO
 
struct  _OFC_FILE_NAMES_INFO
 
struct  _OFC_FILE_IO_PRIORITY_HINT_INFO
 
struct  _OFC_FILEFS_SIZE_INFO
 
struct  _OFC_FILEFS_FULL_SIZE_INFO
 
struct  _OFC_FILEFS_ATTRIBUTE_INFO
 
struct  _OFC_FILEFS_VOLUME_INFO
 
struct  _OFC_FILEFS_DEVICE_INFO
 
struct  _OFC_FILESECURITY_DESCRIPTOR
 
#define OFC_MAX_PATH   260
 
#define OFC_FILE_BASIC_CREATION_TIME   0
 
#define OFC_FILE_BASIC_LAST_ACCESS_TIME   8
 
#define OFC_FILE_BASIC_LAST_WRITE_TIME   16
 
#define OFC_FILE_BASIC_CHANGE_TIME   24
 
#define OFC_FILE_BASIC_ATTRIBUTES   32
 
#define OFC_FILE_BASIC_SIZE   36
 
#define OFC_FILE_STANDARD_ALLOCATION_SIZE   0
 
#define OFC_FILE_STANDARD_END_OF_FILE   8
 
#define OFC_FILE_STANDARD_NUMBER_OF_LINKS   16
 
#define OFC_FILE_STANDARD_DELETE_PENDING   20
 
#define OFC_FILE_STANDARD_DIRECTORY   21
 
#define OFC_FILE_STANDARD_SIZE   22
 
#define OFC_DELETE   0x00010000
 
#define OFC_READ_CONTROL   0x00020000
 
#define OFC_WRITE_DAC   0x00040000
 
#define OFC_WRITE_OWNER   0x00080000
 
#define OFC_SYNCHRONIZE   0x00100000
 
#define OFC_ACCESS_SYSTEM_SECURITY   0x01000000
 
#define OFC_MAXIMUM_ALLOWED   0x02000000
 
#define OFC_GENERIC_ALL   0x10000000
 
#define FILEFS_SIZE_TOTAL_ALLOCATION_UNITS   0
 
#define FILEFS_SIZE_AVAILABLE_ALLOCATION_UNITS   8
 
#define FILEFS_SIZE_SECTORS_PER_ALLOCATION_UNIT   16
 
#define FILEFS_SIZE_BYTES_PER_SECTOR   20
 
#define FILEFS_SIZE_SIZE   24
 
#define OFC_FILEFS_FILE_SYSTEM_ATTRIBUTES   0
 
#define OFC_FILEFS_MAX_COMPONENT_NAME_LENGTH   4
 
#define OFC_FILEFS_FILE_SYSTEM_NAME_LENGTH   8
 
#define OFC_FILEFS_FILE_SYSTEM_NAME   12
 
#define OFC_FILEFS_SUPPORTS_OBJECT_IDS   0x00010000
 
#define OFC_FILEFS_SUPPORTS_SPARSE_FILES   0x00000040
 
#define OFC_FILEFS_VOLUME_QUOTAS   0x00000020
 
#define OFC_FILEFS_PERSISTENT_ACLS   0x00000008
 
#define OFC_FILEFS_UNICODE_ON_DISK   0x00000004
 
#define OFC_FILEFS_CASE_PRESERVED_NAMES   0x00000002
 
#define OFC_FILEFS_CASE_SENSITIVE_SEARCH   0x00000001
 
#define OFC_FILEFS_VOLUME_CREATION_TIME   0
 
#define OFC_FILEFS_VOLUME_SERIAL_NUMBER   8
 
#define OFC_FILEFS_VOLUME_LABEL_LENGTH   12
 
#define OFC_FILEFS_SUPPORTS_OBJECTS   16
 
#define OFC_FILEFS_RESERVED   17
 
#define OFC_FILEFS_VOLUME_LABEL   18
 
#define OFC_FILE_DEVICE_CD_ROM   2
 
#define OFC_FILE_DEVICE_DISK   7
 
#define OFC_FILE_REMOVABLE_MEDIA   0x01
 
#define OFC_FILE_READ_ONLY_DEVICE   0x02
 
#define OFC_FILE_FLOPPY_DISKETTE   0x04
 
#define OFC_FILE_WRITE_ONCE_MEDIA   0x08
 
#define OFC_FILE_REMOTE_DEVICE   0x10
 
#define OFC_FILE_DEVICE_IS_MOUNTED   0x20
 
#define OFC_FILE_VIRTUAL_VOLUME   0x40
 
#define OFC_FILE_DEVICE_SECURE_OPEN   0x100
 
#define OFC_FILE_CHARACTERISTIC_TS_DEVICE   0x1000
 
#define OFC_FILE_CHARACTERISTIC_WEBDEV_DEVICE   0x2000
 
#define OFC_FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL   0x20000
 
#define OFC_FILE_PORTABLE_DEVICE   0x4000
 
#define SECURITY_DESCRIPTOR_CONTROL_SR   0x8000
 
#define SECURITY_DESCRIPTOR_CONTROL_RM   0x4000
 
#define SECURITY_DESCRIPTOR_CONTROL_PS   0x2000
 
#define SECURITY_DESCRIPTOR_CONTROL_PD   0x1000
 
#define SECURITY_DESCRIPTOR_CONTROL_SI   0x0800
 
#define SECURITY_DESCRIPTOR_CONTROL_DI   0x0400
 
#define SECURITY_DESCRIPTOR_CONTROL_SC   0x0200
 
#define SECURITY_DESCRIPTOR_CONTROL_DC   0x0100
 
#define SECURITY_DESCRIPTOR_CONTROL_DT   0x0080
 
#define SECURITY_DESCRIPTOR_CONTROL_SS   0x0040
 
#define SECURITY_DESCRIPTOR_CONTROL_SD   0x0020
 
#define SECURITY_DESCRIPTOR_CONTROL_SP   0x0010
 
#define SECURITY_DESCRIPTOR_CONTROL_DD   0x0008
 
#define SECURITY_DESCRIPTOR_CONTROL_DP   0x0004
 
#define SECURITY_DESCRIPTOR_CONTROL_GD   0x0002
 
#define SECURITY_DESCRIPTOR_CONTROL_OD   0x0001
 
#define OFC_INVALID_SET_FILE_POINTER   ((OFC_DWORD)-1)
 
#define OfcCreateFile   OfcCreateFileA
 
#define OfcCreateDirectory   OfcCreateDirectoryA
 
#define OfcDeleteFile   OfcDeleteFileA
 
#define OfcRemoveDirectory   OfcRemoveDirectoryA
 
#define OfcFindFirstFile   OfcFindFirstFileA
 
#define OfcFindNextFile   OfcFindNextFileA
 
#define OfcGetFileAttributesEx   OfcGetFileAttributesExA
 
#define OfcMoveFile   OfcMoveFileA
 
#define OfcSetFileAttributes   OfcSetFileAttributesA
 
#define OfcGetLastFileNameError   OfcGetLastFileNameErrorA
 
#define OfcGetDiskFreeSpace   OfcGetDiskFreeSpaceA
 
#define OfcGetVolumeInformation   OfcGetVolumeInformationA
 
#define OfcDismount   OfcDismountA
 
#define OfcSetCurrentDirectory   OfcSetCurrentDirectoryA
 
#define OfcGetCurrentDirectory   OfcGetCurrentDirectoryA
 
#define OFC_WIN32_FIND_DATA   OFC_WIN32_FIND_DATAA
 
#define OFC_LPWIN32_FIND_DATA   OFC_LPWIN32_FIND_DATAA
 
enum  {
  OFC_FILE_ADD_FILE = 0x0002 , OFC_FILE_ADD_SUBDIRECTORY = 0x0004 , OFC_FILE_ALL_ACCESS = 0xFFFF , OFC_FILE_APPEND_DATA = 0x0004 ,
  OFC_FILE_DELETE_CHILD = 0x0040 , OFC_FILE_EXECUTE = 0x0020 , OFC_FILE_LIST_DIRECTORY = 0x0001 , OFC_FILE_READ_ATTRIBUTES = 0x0080 ,
  OFC_FILE_READ_DATA = 0x0001 , OFC_FILE_READ_EA = 0x0008 , OFC_FILE_TRAVERSE = 0x0020 , OFC_FILE_WRITE_ATTRIBUTES = 0x0100 ,
  OFC_FILE_WRITE_DATA = 0x0002 , OFC_FILE_WRITE_EA = 0x0010 , OFC_FILE_DELETE = 0x00010000L , OFC_GENERIC_EXECUTE ,
  OFC_GENERIC_READ , OFC_GENERIC_WRITE
}
 
enum  { OFC_FILE_SHARE_NONE = 0 , OFC_FILE_SHARE_DELETE = 0x04 , OFC_FILE_SHARE_WRITE = 0x02 , OFC_FILE_SHARE_READ = 0x01 }
 
enum  {
  OFC_CREATE_NEW = 1 , OFC_CREATE_ALWAYS = 2 , OFC_OPEN_EXISTING = 3 , OFC_OPEN_ALWAYS = 4 ,
  OFC_TRUNCATE_EXISTING = 5
}
 
enum  {
  OFC_FILE_ATTRIBUTE_READONLY = 0x0001 , OFC_FILE_ATTRIBUTE_HIDDEN = 0x0002 , OFC_FILE_ATTRIBUTE_SYSTEM = 0x0004 , OFC_FILE_ATTRIBUTE_BOOKMARK = 0x0008 ,
  OFC_FILE_ATTRIBUTE_DIRECTORY = 0x0010 , OFC_FILE_ATTRIBUTE_ARCHIVE = 0x0020 , OFC_FILE_ATTRIBUTE_NORMAL = 0x0080 , OFC_FILE_ATTRIBUTE_TEMPORARY = 0x0100 ,
  OFC_FILE_ATTRIBUTE_SPARSE_FILE = 0x0200 , OFC_FILE_ATTRIBUTE_REPARSE_POINT = 0x0400 , OFC_FILE_ATTRIBUTE_COMPRESSED = 0x0800 , OFC_FILE_ATTRIBUTE_OFFLINE = 0x1000 ,
  OFC_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000 , OFC_FILE_ATTRIBUTE_ENCRYPTED = 0x4000 , OFC_FILE_ATTRIBUTE_INTEGRITY_STREAM = 0x8000 , OFC_FILE_ATTRIBUTE_VIRTUAL = 0x00010000 ,
  OFC_FILE_ATTRIBUTE_NO_SCRUB_DATA = 0x00020000 , OFC_FILE_ATTRIBUTE_REFERRAL = 0x00040000 , OFC_FILE_FLAG_OPEN_NO_RECALL = 0x00100000 , OFC_FILE_FLAG_WORKGROUP = 0x00200000 ,
  OFC_FILE_FLAG_SERVER = 0x00400000 , OFC_FILE_FLAG_SHARE = 0x00800000 , OFC_FILE_FLAG_POSIX_SEMANTICS = 0x01000000 , OFC_FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 ,
  OFC_FILE_FLAG_DELETE_ON_CLOSE = 0x04000000 , OFC_FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000 , OFC_FILE_FLAG_RANDOM_ACCESS = 0x10000000 , OFC_FILE_FLAG_NO_BUFFERING = 0x20000000 ,
  OFC_FILE_FLAG_OVERLAPPED = 0x40000000 , OFC_FILE_FLAG_WRITE_THROUGH = 0x80000000
}
 
enum  {
  OFC_FILE_CREATE_DIRECTORY = 0x0001 , OFC_FILE_CREATE_WRITETHROUGH = 0x0002 , OFC_FILE_CREATE_SEQUENTIAL = 0x0004 , OFC_FILE_CREATE_SIOALERT = 0x0010 ,
  OFC_FILE_CREATE_SIONONALERT = 0x0020 , OFC_FILE_CREATE_NONDIRECTORY = 0x0040 , OFC_FILE_CREATE_NOEA = 0x0200 , OFC_FILE_CREATE_8x3 = 0x0400 ,
  OFC_FILE_CREATE_RANDOM = 0x0800 , OFC_FILE_CREATE_DELONCLOSE = 0x1000
}
 
enum  { OFC_FILE_OPEN_ACTION_OPENED , OFC_FILE_OPEN_ACTION_CREATED , OFC_FILE_OPEN_ACTION_TRUNCATED }
 
enum  _OFC_FILE_INFO_BY_HANDLE_CLASS {
  OfcFileBasicInfo = 0 , OfcFileStandardInfo , OfcFileAllInfo , OfcFileNameInfo ,
  OfcFileRenameInfo , OfcFileDispositionInfo , OfcFileAllocationInfo , OfcFileEndOfFileInfo ,
  OfcFileStreamInfo , OfcFileEaInfo , OfcFileCompressionInfo , OfcFileAttributeTagInfo ,
  OfcFileIdBothDirectoryInfo , OfcFileIdBothDirectoryRestartInfo , OfcFileInfoStandard , OfcFileInfoAll ,
  OfcFileNetworkOpenInfo , OfcFileDirectoryInformation , OfcFileFullDirectoryInformation , OfcFileIdFullDirectoryInformation ,
  OfcFileBothDirectoryInformation , OfcFileIdBothDirectoryInformation , OfcFileNamesInformation , OfcFileInternalInformation ,
  OfcMaximumFileInfoByHandlesClass
}
 
enum  _OFC_FILEFS_INFO_BY_HANDLE_CLASS {
  OfcFileFSAttributeInformation , OfcFileFSSizeInformation , OfcFileFSVolumeInformation , OfcFileFSFullSizeInformation ,
  OfcFileFSDeviceInformation
}
 
enum  _OFC_FILE_INFO_BY_HANDLE_TYPE { OfcFileInfoTypeFile , OfcFileInfoTypeFS , OfcFileInfoTypeSecurity , OfcFileInfoTypeQuota }
 
enum  _OFC_GET_FILEEX_INFO_LEVELS { OfcGetFileExInfoStandard , OfcGetFileExMaxInfoLevel }
 
enum  _OFC_PRIORITY_HINT { OfcIoPriorityHintVeryLow = 0 , OfcIoPriorityHintLow , OfcIoPriorityHintNormal , OfcMaximumIoPriorityHintType }
 
enum  { OFC_FILE_BEGIN = 0 , OFC_FILE_CURRENT = 1 , OFC_FILE_END = 2 }
 
enum  { OFC_LOCKFILE_FAIL_IMMEDIATELY = 0x01 , OFC_LOCKFILE_EXCLUSIVE_LOCK = 0x02 }
 
enum  OFC_FILE_ERRORS {
  OFC_ERROR_SUCCESS = 0 , OFC_ERROR_INVALID_FUNCTION = 1 , OFC_ERROR_FILE_NOT_FOUND = 2 , OFC_ERROR_PATH_NOT_FOUND = 3 ,
  OFC_ERROR_TOO_MANY_OPEN_FILES = 4 , OFC_ERROR_ACCESS_DENIED = 5 , OFC_ERROR_INVALID_HANDLE = 6 , OFC_ERROR_NOT_ENOUGH_MEMORY = 8 ,
  OFC_ERROR_INVALID_ACCESS = 12 , OFC_ERROR_OUTOFMEMORY = 14 , OFC_ERROR_INVALID_DRIVE = 15 , OFC_ERROR_CURRENT_DIRECTORY = 16 ,
  OFC_ERROR_NOT_SAME_DEVICE = 17 , OFC_ERROR_NO_MORE_FILES = 18 , OFC_ERROR_WRITE_PROTECT = 19 , OFC_ERROR_NOT_READY = 21 ,
  OFC_ERROR_CRC = 23 , OFC_ERROR_BAD_LENGTH = 24 , OFC_ERROR_SEEK = 25 , OFC_ERROR_WRITE_FAULT = 29 ,
  OFC_ERROR_READ_FAULT = 30 , OFC_ERROR_GEN_FAILURE = 31 , OFC_ERROR_SHARING_VIOLATION = 32 , OFC_ERROR_LOCK_VIOLATION = 33 ,
  OFC_ERROR_WRONG_DISK = 34 , OFC_ERROR_SHARING_BUFFER_EXCEEDED = 35 , OFC_ERROR_HANDLE_EOF = 38 , OFC_ERROR_HANDLE_DISK_FULL = 39 ,
  OFC_ERROR_BAD_NET_NAME = 43 , OFC_ERROR_NOT_SUPPORTED = 50 , OFC_ERROR_REM_NOT_LIST = 51 , OFC_ERROR_DUP_NAME = 52 ,
  OFC_ERROR_BAD_NETPATH = 53 , OFC_ERROR_NETWORK_BUSY = 54 , OFC_ERROR_DEV_NOT_EXIST = 55 , OFC_ERROR_BAD_NET_RESP = 58 ,
  OFC_ERROR_UNEXP_NET_ERR = 59 , OFC_ERROR_BAD_DEV_TYPE = 66 , OFC_ERROR_FILE_EXISTS = 80 , OFC_ERROR_CANNOT_MAKE = 82 ,
  OFC_ERROR_INVALID_PASSWORD = 86 , OFC_ERROR_INVALID_PARAMETER = 87 , OFC_ERROR_NET_WRITE_FAULT = 88 , OFC_ERROR_MORE_ENTRIES = 105 ,
  OFC_ERROR_BROKEN_PIPE = 109 , OFC_ERROR_OPEN_FAILED = 110 , OFC_ERROR_BUFFER_OVERFLOW = 111 , OFC_ERROR_DISK_FULL = 112 ,
  OFC_ERROR_CALL_NOT_IMPLEMENTED = 120 , OFC_ERROR_INSUFFICIENT_BUFFER = 122 , OFC_ERROR_INVALID_NAME = 123 , OFC_ERROR_INVALID_LEVEL = 124 ,
  OFC_ERROR_NO_VOLUME_LABEL = 125 , OFC_ERROR_NEGATIVE_SEEK = 131 , OFC_ERROR_SEEK_ON_DEVICE = 132 , OFC_ERROR_DIR_NOT_EMPTY = 145 ,
  OFC_ERROR_PATH_BUSY = 148 , OFC_ERROR_BAD_ARGUMENTS = 160 , OFC_ERROR_BAD_PATHNAME = 161 , OFC_ERROR_BUSY = 170 ,
  OFC_ERROR_ALREADY_EXISTS = 183 , OFC_ERROR_INVALID_FLAG_NUMBER = 186 , OFC_ERROR_BAD_PIPE = 230 , OFC_ERROR_PIPE_BUSY = 231 ,
  OFC_ERROR_NO_DATA = 232 , OFC_ERROR_PIPE_NOT_CONNECTED = 233 , OFC_ERROR_MORE_DATA = 234 , OFC_ERROR_INVALID_EA_NAME = 254 ,
  OFC_ERROR_EA_LIST_INCONSISTENT = 255 , OFC_ERROR_DIRECTORY = 267 , OFC_ERROR_EAS_DIDNT_FIT = 275 , OFC_ERROR_EA_FILE_CORRUPT = 276 ,
  OFC_ERROR_EA_TABLE_FULL = 277 , OFC_ERROR_INVALID_EA_HANDLE = 278 , OFC_ERROR_EAS_NOT_SUPPORTED = 282 , OFC_ERROR_OPLOCK_NOT_GRANTED = 300 ,
  OFC_ERROR_DISK_TOO_FRAGMENTED = 302 , OFC_ERROR_DELETE_PENDING = 303 , OFC_ERROR_PIPE_CONNECTED = 535 , OFC_ERROR_PIPE_LISTENING = 536 ,
  OFC_ERROR_EA_ACCESS_DENIED = 994 , OFC_ERROR_OPERATION_ABORTED = 995 , OFC_ERROR_IO_INCOMPLETE = 996 , OFC_ERROR_IO_PENDING = 997 ,
  OFC_ERROR_NOACCESS = 998 , OFC_ERROR_INVALID_FLAGS = 1004 , OFC_ERROR_UNRECOGNIZED_VOLUME = 1005 , OFC_ERROR_FILE_INVALID = 1006 ,
  OFC_ERROR_NOTIFY_ENUM_DIR = 1022 , OFC_ERROR_BUS_RESET = 1111 , OFC_ERROR_IO_DEVICE = 1117 , OFC_ERROR_DISK_OPERATION_FAILED = 1127 ,
  OFC_ERROR_BAD_DEVICE = 1200 , OFC_ERROR_INVALID_PASSWORDNAME = 1215 , OFC_ERROR_LOGON_FAILURE = 1326 , OFC_ERROR_NOT_ENOUGH_QUOTA = 1816 ,
  OFC_ERROR_CONNECTION_REFUSED = 1225 , OFC_ERROR_NETWORK_UNREACHABLE = 1231 , OFC_ERROR_PROTOCOL_UNREACHABLE = 1233 , OFC_ERROR_INVALID_LOGON_HOURS = 1328 ,
  OFC_ERROR_INVALID_WORKSTATION = 1329 , OFC_ERROR_PASSWORD_EXPIRED = 1330 , OFC_ERROR_ACCOUNT_DISABLED = 1331 , OFC_ERROR_LOGON_NOT_GRANTED = 1380 ,
  OFC_ERROR_TIMEOUT = 1460 , OFC_ERROR_ACCOUNT_EXPIRED = 1793 , OFC_ERROR_ACCOUNT_LOCKED_OUT = 1909
}
 
typedef struct _OFC_FILETIME OFC_FILETIME
 
typedef enum _OFC_FILE_INFO_BY_HANDLE_CLASS OFC_FILE_INFO_BY_HANDLE_CLASS
 
typedef enum _OFC_FILEFS_INFO_BY_HANDLE_CLASS OFC_FILEFS_INFO_BY_HANDLE_CLASS
 
typedef enum _OFC_FILE_INFO_BY_HANDLE_TYPE OFC_FILE_INFO_BY_HANDLE_TYPE
 
typedef struct _OFC_SECURITY_ATTRIBUTES OFC_SECURITY_ATTRIBUTES
 
typedef OFC_VOIDOFC_PSECURITY_DESCRIPTOR
 
typedef OFC_SECURITY_ATTRIBUTESOFC_LPSECURITY_ATTRIBUTES
 
typedef struct _OFC_WIN32_FIND_DATAW OFC_WIN32_FIND_DATAW
 
typedef OFC_WIN32_FIND_DATAWOFC_LPWIN32_FIND_DATAW
 
typedef struct _OFC_WIN32_FIND_DATAA OFC_WIN32_FIND_DATAA
 
typedef OFC_WIN32_FIND_DATAAOFC_LPWIN32_FIND_DATAA
 
typedef struct _OFC_WIN32_FILE_ATTRIBUTE_DATA OFC_WIN32_FILE_ATTRIBUTE_DATA
 
typedef OFC_WIN32_FILE_ATTRIBUTE_DATAOFC_LPWIN32_FILE_ATTRIBUTE_DATA
 
typedef enum _OFC_GET_FILEEX_INFO_LEVELS OFC_GET_FILEEX_INFO_LEVELS
 
typedef struct _OFC_OVERLAPPED OFC_OVERLAPPED
 
typedef OFC_OVERLAPPEDOFC_LPOVERLAPPED
 
typedef struct _OFC_FILE_BASIC_INFO OFC_FILE_BASIC_INFO
 
typedef struct _OFC_FILE_INTERNAL_INFO OFC_FILE_INTERNAL_INFO
 
typedef struct _OFC_FILE_EA_INFO OFC_FILE_EA_INFO
 
typedef struct _OFC_FILE_ACCESS_INFO OFC_FILE_ACCESS_INFO
 
typedef struct _OFC_FILE_POSITION_INFO OFC_FILE_POSITION_INFO
 
typedef struct _OFC_FILE_MODE_INFO OFC_FILE_MODE_INFO
 
typedef struct _OFC_FILE_ALIGNMENT_INFO OFC_FILE_ALIGNMENT_INFO
 
typedef struct _OFC_FILE_NETWORK_OPEN_INFO OFC_FILE_NETWORK_OPEN_INFO
 
typedef struct _OFC_FILE_STANDARD_INFO OFC_FILE_STANDARD_INFO
 
typedef struct _OFC_FILE_NAME_INFO OFC_FILE_NAME_INFO
 
typedef struct _OFC_FILE_RENAME_INFO OFC_FILE_RENAME_INFO
 
typedef struct _OFC_FILE_DISPOSITION_INFO OFC_FILE_DISPOSITION_INFO
 
typedef struct _OFC_FILE_ALLOCATION_INFO OFC_FILE_ALLOCATION_INFO
 
typedef struct _OFC_FILE_END_OF_FILE_INFO OFC_FILE_END_OF_FILE_INFO
 
typedef struct _OFC_FILE_STREAM_INFO OFC_FILE_STREAM_INFO
 
typedef struct _OFC_FILE_COMPRESSION_INFO OFC_FILE_COMPRESSION_INFO
 
typedef struct _OFC_FILE_ATTRIBUTE_TAG_INFO OFC_FILE_ATTRIBUTE_TAG_INFO
 
typedef struct _OFC_FILE_DIR_INFO OFC_FILE_DIR_INFO
 
typedef struct _OFC_FILE_FULL_DIR_INFO OFC_FILE_FULL_DIR_INFO
 
typedef struct _OFC_FILE_ID_FULL_DIR_INFO OFC_FILE_ID_FULL_DIR_INFO
 
typedef struct _OFC_FILE_BOTH_DIR_INFO OFC_FILE_BOTH_DIR_INFO
 
typedef struct _OFC_FILE_ID_BOTH_DIR_INFO OFC_FILE_ID_BOTH_DIR_INFO
 
typedef struct _OFC_FILE_ALL_INFO OFC_FILE_ALL_INFO
 
typedef struct _OFC_FILE_NAMES_INFO OFC_FILE_NAMES_INFO
 
typedef enum _OFC_PRIORITY_HINT OFC_PRIORITY_HINT
 
typedef struct _OFC_FILE_IO_PRIORITY_HINT_INFO OFC_FILE_IO_PRIORITY_HINT_INFO
 
typedef struct _OFC_FILEFS_SIZE_INFO OFC_FILEFS_SIZE_INFO
 
typedef struct _OFC_FILEFS_FULL_SIZE_INFO OFC_FILEFS_FULL_SIZE_INFO
 
typedef struct _OFC_FILEFS_ATTRIBUTE_INFO OFC_FILEFS_ATTRIBUTE_INFO
 
typedef struct _OFC_FILEFS_VOLUME_INFO OFC_FILEFS_VOLUME_INFO
 
typedef struct _OFC_FILEFS_DEVICE_INFO OFC_FILEFS_DEVICE_INFO
 
typedef struct _OFC_FILESECURITY_DESCRIPTOR OFC_FILESECURITY_DESCRIPTOR
 
OFC_DWORD OfcLastError
 
OFC_CORE_LIB OFC_VOID OfcFileInit (OFC_VOID)
 
OFC_CORE_LIB OFC_VOID OfcFileThreadInit (OFC_VOID)
 
OFC_CORE_LIB OFC_VOID OfcFileThreadDeinit (OFC_VOID)
 
OFC_CORE_LIB OFC_VOID OfcFileDestroy (OFC_VOID)
 
OFC_CORE_LIB OFC_BOOL OfcCloseHandle (OFC_HANDLE hObject)
 
OFC_CORE_LIB OFC_HANDLE OfcCreateFileW (OFC_LPCTSTR lpFileName, OFC_DWORD dwDesiredAccess, OFC_DWORD dwShareMode, OFC_LPSECURITY_ATTRIBUTES lpSecurityAttributes, OFC_DWORD dwCreationDisposition, OFC_DWORD dwFlagsAndAttributes, OFC_HANDLE hTemplateFile)
 
OFC_CORE_LIB OFC_HANDLE OfcCreateFileA (OFC_LPCSTR lpFileName, OFC_DWORD dwDesiredAccess, OFC_DWORD dwShareMode, OFC_LPSECURITY_ATTRIBUTES lpSecurityAttributes, OFC_DWORD dwCreationDisposition, OFC_DWORD dwFlagsAndAttributes, OFC_HANDLE hTemplateFile)
 
OFC_CORE_LIB OFC_BOOL OfcCreateDirectoryW (OFC_LPCTSTR lpPathName, OFC_LPSECURITY_ATTRIBUTES lpSecurityAttr)
 
OFC_CORE_LIB OFC_BOOL OfcCreateDirectoryA (OFC_LPCSTR lpPathName, OFC_LPSECURITY_ATTRIBUTES lpSecurityAttr)
 
OFC_CORE_LIB OFC_BOOL OfcDeleteFileW (OFC_LPCTSTR lpFileName)
 
OFC_CORE_LIB OFC_BOOL OfcDeleteFileA (OFC_LPCSTR lpFileName)
 
OFC_CORE_LIB OFC_BOOL OfcRemoveDirectoryW (OFC_LPCTSTR lpPathName)
 
OFC_CORE_LIB OFC_BOOL OfcRemoveDirectoryA (OFC_LPCSTR lpPathName)
 
OFC_CORE_LIB OFC_HANDLE OfcFindFirstFileW (OFC_LPCTSTR lpFileName, OFC_LPWIN32_FIND_DATAW lpFindFileData, OFC_BOOL *more)
 
OFC_CORE_LIB OFC_HANDLE OfcFindFirstFileA (OFC_LPCSTR lpFileName, OFC_LPWIN32_FIND_DATAA lpFindFileData, OFC_BOOL *more)
 
OFC_CORE_LIB OFC_BOOL OfcFindNextFileW (OFC_HANDLE hFindFile, OFC_LPWIN32_FIND_DATAW lpFindFileData, OFC_BOOL *more)
 
OFC_CORE_LIB OFC_BOOL OfcFindNextFileA (OFC_HANDLE hFindFile, OFC_LPWIN32_FIND_DATAA lpFindFileData, OFC_BOOL *more)
 
OFC_CORE_LIB OFC_BOOL OfcFindClose (OFC_HANDLE hFindFile)
 
OFC_CORE_LIB OFC_BOOL OfcFlushFileBuffers (OFC_HANDLE hFile)
 
OFC_CORE_LIB OFC_BOOL OfcGetFileAttributesExW (OFC_LPCTSTR lpFileName, OFC_GET_FILEEX_INFO_LEVELS fInfoLevelId, OFC_LPVOID lpFileInformation)
 
OFC_CORE_LIB OFC_BOOL OfcGetFileAttributesExA (OFC_LPCSTR lpFileName, OFC_GET_FILEEX_INFO_LEVELS fInfoLevelId, OFC_LPVOID lpFileInformation)
 
OFC_CORE_LIB OFC_BOOL OfcGetFileInformationByHandleEx (OFC_HANDLE hFile, OFC_FILE_INFO_BY_HANDLE_CLASS FileInformationClass, OFC_LPVOID lpFileInformation, OFC_DWORD dwBufferSize)
 
OFC_CORE_LIB OFC_BOOL OfcMoveFileW (OFC_LPCTSTR lpExistingFileName, OFC_LPCTSTR lpNewFileName)
 
OFC_CORE_LIB OFC_BOOL OfcMoveFileA (OFC_LPCSTR lpExistingFileName, OFC_LPCSTR lpNewFileName)
 
OFC_CORE_LIB OFC_BOOL OfcReadFile (OFC_HANDLE hFile, OFC_LPVOID lpBuffer, OFC_DWORD nNumberOfBytesToRead, OFC_LPDWORD lpNumberOfBytesRead, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_HANDLE OfcCreateOverlapped (OFC_HANDLE hFile)
 
OFC_CORE_LIB OFC_VOID OfcDestroyOverlapped (OFC_HANDLE hFile, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_VOID OfcSetOverlappedOffset (OFC_HANDLE hFile, OFC_HANDLE hOverlapped, OFC_OFFT offset)
 
OFC_CORE_LIB OFC_BOOL OfcGetOverlappedResult (OFC_HANDLE hFile, OFC_HANDLE hOverlapped, OFC_LPDWORD lpNumberOfBytesTransferred, OFC_BOOL bWait)
 
OFC_CORE_LIB OFC_BOOL OfcSetEndOfFile (OFC_HANDLE hFile)
 
OFC_CORE_LIB OFC_BOOL OfcSetFileAttributesW (OFC_LPCTSTR lpFileName, OFC_DWORD dwFileAttributes)
 
OFC_CORE_LIB OFC_BOOL OfcSetFileAttributesA (OFC_LPCSTR lpFileName, OFC_DWORD dwFileAttributes)
 
OFC_CORE_LIB OFC_BOOL OfcSetFileInformationByHandle (OFC_HANDLE hFile, OFC_FILE_INFO_BY_HANDLE_CLASS FileInformationClass, OFC_LPVOID lpFileInformation, OFC_DWORD dwBufferSize)
 
OFC_CORE_LIB OFC_DWORD OfcSetFilePointer (OFC_HANDLE hFile, OFC_LONG lDistanceToMove, OFC_PLONG lpDistanceToMoveHigh, OFC_DWORD dwMoveMethod)
 
OFC_CORE_LIB OFC_BOOL OfcWriteFile (OFC_HANDLE hFile, OFC_LPCVOID lpBuffer, OFC_DWORD nNumberOfBytesToWrite, OFC_LPDWORD lpNumberOfBytesWritten, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_BOOL OfcTransactNamedPipe (OFC_HANDLE hFile, OFC_LPVOID lpInBuffer, OFC_DWORD nInBufferSize, OFC_LPVOID lpOutBuffer, OFC_DWORD nOutBufferSize, OFC_LPDWORD lpBytesRead, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_UINT32 OfcGetLastFileError (OFC_HANDLE hHandle)
 
OFC_CORE_LIB OFC_DWORD OfcGetLastError (OFC_VOID)
 
OFC_CORE_LIB const OFC_CHARofc_get_error_string (OFC_DWORD dwerr)
 
OFC_CORE_LIB OFC_UINT32 OfcGetLastFileNameErrorW (OFC_LPCTSTR lpFileName)
 
OFC_CORE_LIB OFC_UINT32 OfcGetLastFileNameErrorA (OFC_LPCSTR lpFileName)
 
OFC_CORE_LIB OFC_BOOL OfcGetDiskFreeSpaceW (OFC_LPCTSTR lpRootPathName, OFC_LPDWORD lpSectorsPerCluster, OFC_LPDWORD lpBytesPerSector, OFC_LPDWORD lpNumberOfFreeClusters, OFC_LPDWORD lpTotalNumberOfClusters)
 
OFC_CORE_LIB OFC_BOOL OfcGetDiskFreeSpaceA (OFC_LPCSTR lpRootPathName, OFC_LPDWORD lpSectorsPerCluster, OFC_LPDWORD lpBytesPerSector, OFC_LPDWORD lpNumberOfFreeClusters, OFC_LPDWORD lpTotalNumberOfClusters)
 
OFC_CORE_LIB OFC_BOOL OfcGetVolumeInformationW (OFC_LPCTSTR lpRootPathName, OFC_LPTSTR lpVolumeNameBuffer, OFC_DWORD nVolumeNameSize, OFC_LPDWORD lpVolumeSerialNumber, OFC_LPDWORD lpMaximumComponentLength, OFC_LPDWORD lpFileSystemFlags, OFC_LPTSTR lpFileSystemName, OFC_DWORD nFileSystemName)
 
OFC_CORE_LIB OFC_BOOL OfcGetVolumeInformationA (OFC_LPCSTR lpRootPathName, OFC_LPSTR lpVolumeNameBuffer, OFC_DWORD nVolumeNameSize, OFC_LPDWORD lpVolumeSerialNumber, OFC_LPDWORD lpMaximumComponentLength, OFC_LPDWORD lpFileSystemFlags, OFC_LPSTR lpFileSystemName, OFC_DWORD nFileSystemName)
 
OFC_CORE_LIB OFC_FST_TYPE OfcFileGetFSType (OFC_HANDLE hHandle)
 
OFC_CORE_LIB OFC_HANDLE OfcFileGetFSHandle (OFC_HANDLE hHandle)
 
OFC_CORE_LIB OFC_BOOL OfcUnlockFileEx (OFC_HANDLE hFile, OFC_UINT32 length_low, OFC_UINT32 length_high, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_BOOL OfcLockFileEx (OFC_HANDLE hFile, OFC_DWORD flags, OFC_DWORD length_low, OFC_DWORD length_high, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_HANDLE OfcFileGetOverlappedEvent (OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_HANDLE OfcFileGetOverlappedWaitQ (OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_BOOL OfcDismountW (OFC_LPCTSTR lpFileName)
 
OFC_CORE_LIB OFC_BOOL OfcDismountA (OFC_LPCSTR lpFileName)
 
OFC_CORE_LIB OFC_BOOL OfcDeviceIoControl (OFC_HANDLE hFile, OFC_DWORD dwIoControlCode, OFC_LPVOID lpInBuffer, OFC_DWORD nInBufferSize, OFC_LPVOID lpOutBuffer, OFC_DWORD nOutBufferSize, OFC_LPDWORD lpBytesReturned, OFC_HANDLE hOverlapped)
 
OFC_CORE_LIB OFC_BOOL OfcSetCurrentDirectoryW (OFC_LPCTSTR lpPathName)
 
OFC_CORE_LIB OFC_BOOL OfcSetCurrentDirectoryA (OFC_LPCSTR lpPathName)
 
OFC_CORE_LIB OFC_DWORD OfcGetCurrentDirectoryW (OFC_DWORD nBufferLength, OFC_LPTSTR lpBuffer)
 
OFC_CORE_LIB OFC_DWORD OfcGetCurrentDirectoryA (OFC_DWORD nBufferLength, OFC_LPSTR lpBuffer)
 

Macro Definition Documentation

◆ FILEFS_SIZE_AVAILABLE_ALLOCATION_UNITS

#define FILEFS_SIZE_AVAILABLE_ALLOCATION_UNITS   8

◆ FILEFS_SIZE_BYTES_PER_SECTOR

#define FILEFS_SIZE_BYTES_PER_SECTOR   20

◆ FILEFS_SIZE_SECTORS_PER_ALLOCATION_UNIT

#define FILEFS_SIZE_SECTORS_PER_ALLOCATION_UNIT   16

◆ FILEFS_SIZE_SIZE

#define FILEFS_SIZE_SIZE   24

◆ FILEFS_SIZE_TOTAL_ALLOCATION_UNITS

#define FILEFS_SIZE_TOTAL_ALLOCATION_UNITS   0

◆ OFC_ACCESS_SYSTEM_SECURITY

#define OFC_ACCESS_SYSTEM_SECURITY   0x01000000

◆ OFC_DELETE

#define OFC_DELETE   0x00010000

◆ OFC_FILE_BASIC_ATTRIBUTES

#define OFC_FILE_BASIC_ATTRIBUTES   32

◆ OFC_FILE_BASIC_CHANGE_TIME

#define OFC_FILE_BASIC_CHANGE_TIME   24

◆ OFC_FILE_BASIC_CREATION_TIME

#define OFC_FILE_BASIC_CREATION_TIME   0

◆ OFC_FILE_BASIC_LAST_ACCESS_TIME

#define OFC_FILE_BASIC_LAST_ACCESS_TIME   8

◆ OFC_FILE_BASIC_LAST_WRITE_TIME

#define OFC_FILE_BASIC_LAST_WRITE_TIME   16

◆ OFC_FILE_BASIC_SIZE

#define OFC_FILE_BASIC_SIZE   36

◆ OFC_FILE_CHARACTERISTIC_TS_DEVICE

#define OFC_FILE_CHARACTERISTIC_TS_DEVICE   0x1000

◆ OFC_FILE_CHARACTERISTIC_WEBDEV_DEVICE

#define OFC_FILE_CHARACTERISTIC_WEBDEV_DEVICE   0x2000

◆ OFC_FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL

#define OFC_FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL   0x20000

◆ OFC_FILE_DEVICE_CD_ROM

#define OFC_FILE_DEVICE_CD_ROM   2

◆ OFC_FILE_DEVICE_DISK

#define OFC_FILE_DEVICE_DISK   7

◆ OFC_FILE_DEVICE_IS_MOUNTED

#define OFC_FILE_DEVICE_IS_MOUNTED   0x20

◆ OFC_FILE_DEVICE_SECURE_OPEN

#define OFC_FILE_DEVICE_SECURE_OPEN   0x100

◆ OFC_FILE_FLOPPY_DISKETTE

#define OFC_FILE_FLOPPY_DISKETTE   0x04

◆ OFC_FILE_PORTABLE_DEVICE

#define OFC_FILE_PORTABLE_DEVICE   0x4000

◆ OFC_FILE_READ_ONLY_DEVICE

#define OFC_FILE_READ_ONLY_DEVICE   0x02

◆ OFC_FILE_REMOTE_DEVICE

#define OFC_FILE_REMOTE_DEVICE   0x10

◆ OFC_FILE_REMOVABLE_MEDIA

#define OFC_FILE_REMOVABLE_MEDIA   0x01

◆ OFC_FILE_STANDARD_ALLOCATION_SIZE

#define OFC_FILE_STANDARD_ALLOCATION_SIZE   0

◆ OFC_FILE_STANDARD_DELETE_PENDING

#define OFC_FILE_STANDARD_DELETE_PENDING   20

◆ OFC_FILE_STANDARD_DIRECTORY

#define OFC_FILE_STANDARD_DIRECTORY   21

◆ OFC_FILE_STANDARD_END_OF_FILE

#define OFC_FILE_STANDARD_END_OF_FILE   8

◆ OFC_FILE_STANDARD_NUMBER_OF_LINKS

#define OFC_FILE_STANDARD_NUMBER_OF_LINKS   16

◆ OFC_FILE_STANDARD_SIZE

#define OFC_FILE_STANDARD_SIZE   22

◆ OFC_FILE_VIRTUAL_VOLUME

#define OFC_FILE_VIRTUAL_VOLUME   0x40

◆ OFC_FILE_WRITE_ONCE_MEDIA

#define OFC_FILE_WRITE_ONCE_MEDIA   0x08

◆ OFC_FILEFS_CASE_PRESERVED_NAMES

#define OFC_FILEFS_CASE_PRESERVED_NAMES   0x00000002

◆ OFC_FILEFS_CASE_SENSITIVE_SEARCH

#define OFC_FILEFS_CASE_SENSITIVE_SEARCH   0x00000001

◆ OFC_FILEFS_FILE_SYSTEM_ATTRIBUTES

#define OFC_FILEFS_FILE_SYSTEM_ATTRIBUTES   0

◆ OFC_FILEFS_FILE_SYSTEM_NAME

#define OFC_FILEFS_FILE_SYSTEM_NAME   12

◆ OFC_FILEFS_FILE_SYSTEM_NAME_LENGTH

#define OFC_FILEFS_FILE_SYSTEM_NAME_LENGTH   8

◆ OFC_FILEFS_MAX_COMPONENT_NAME_LENGTH

#define OFC_FILEFS_MAX_COMPONENT_NAME_LENGTH   4

◆ OFC_FILEFS_PERSISTENT_ACLS

#define OFC_FILEFS_PERSISTENT_ACLS   0x00000008

◆ OFC_FILEFS_RESERVED

#define OFC_FILEFS_RESERVED   17

◆ OFC_FILEFS_SUPPORTS_OBJECT_IDS

#define OFC_FILEFS_SUPPORTS_OBJECT_IDS   0x00010000

◆ OFC_FILEFS_SUPPORTS_OBJECTS

#define OFC_FILEFS_SUPPORTS_OBJECTS   16

◆ OFC_FILEFS_SUPPORTS_SPARSE_FILES

#define OFC_FILEFS_SUPPORTS_SPARSE_FILES   0x00000040

◆ OFC_FILEFS_UNICODE_ON_DISK

#define OFC_FILEFS_UNICODE_ON_DISK   0x00000004

◆ OFC_FILEFS_VOLUME_CREATION_TIME

#define OFC_FILEFS_VOLUME_CREATION_TIME   0

◆ OFC_FILEFS_VOLUME_LABEL

#define OFC_FILEFS_VOLUME_LABEL   18

◆ OFC_FILEFS_VOLUME_LABEL_LENGTH

#define OFC_FILEFS_VOLUME_LABEL_LENGTH   12

◆ OFC_FILEFS_VOLUME_QUOTAS

#define OFC_FILEFS_VOLUME_QUOTAS   0x00000020

◆ OFC_FILEFS_VOLUME_SERIAL_NUMBER

#define OFC_FILEFS_VOLUME_SERIAL_NUMBER   8

◆ OFC_GENERIC_ALL

#define OFC_GENERIC_ALL   0x10000000

◆ OFC_INVALID_SET_FILE_POINTER

#define OFC_INVALID_SET_FILE_POINTER   ((OFC_DWORD)-1)

Value returned to OfcSetFilePointer function when the pointer could not be set

Examples
test_file.c.

◆ OFC_LPWIN32_FIND_DATA

#define OFC_LPWIN32_FIND_DATA   OFC_LPWIN32_FIND_DATAA

◆ OFC_MAX_PATH

#define OFC_MAX_PATH   260

◆ OFC_MAXIMUM_ALLOWED

#define OFC_MAXIMUM_ALLOWED   0x02000000

◆ OFC_READ_CONTROL

#define OFC_READ_CONTROL   0x00020000

◆ OFC_SYNCHRONIZE

#define OFC_SYNCHRONIZE   0x00100000

◆ OFC_WIN32_FIND_DATA

#define OFC_WIN32_FIND_DATA   OFC_WIN32_FIND_DATAA
Examples
smbls.c, and test_file.c.

◆ OFC_WRITE_DAC

#define OFC_WRITE_DAC   0x00040000

◆ OFC_WRITE_OWNER

#define OFC_WRITE_OWNER   0x00080000

◆ OfcCreateDirectory

#define OfcCreateDirectory   OfcCreateDirectoryA
Examples
test_file.c.

◆ OfcCreateFile

#define OfcCreateFile   OfcCreateFileA
Examples
smbcp.c, smbrm.c, and test_file.c.

◆ OfcDeleteFile

#define OfcDeleteFile   OfcDeleteFileA
Examples
test_file.c.

◆ OfcDismount

#define OfcDismount   OfcDismountA
Examples
smbls.c, and test_file.c.

◆ OfcFindFirstFile

#define OfcFindFirstFile   OfcFindFirstFileA
Examples
smbls.c, and test_file.c.

◆ OfcFindNextFile

#define OfcFindNextFile   OfcFindNextFileA
Examples
smbls.c, and test_file.c.

◆ OfcGetCurrentDirectory

#define OfcGetCurrentDirectory   OfcGetCurrentDirectoryA

◆ OfcGetDiskFreeSpace

#define OfcGetDiskFreeSpace   OfcGetDiskFreeSpaceA
Examples
smbfree.c, and test_file.c.

◆ OfcGetFileAttributesEx

#define OfcGetFileAttributesEx   OfcGetFileAttributesExA
Examples
test_file.c.

◆ OfcGetLastFileNameError

#define OfcGetLastFileNameError   OfcGetLastFileNameErrorA

◆ OfcGetVolumeInformation

#define OfcGetVolumeInformation   OfcGetVolumeInformationA
Examples
smbls.c, and test_file.c.

◆ OfcMoveFile

#define OfcMoveFile   OfcMoveFileA
Examples
test_file.c.

◆ OfcRemoveDirectory

#define OfcRemoveDirectory   OfcRemoveDirectoryA
Examples
test_file.c.

◆ OfcSetCurrentDirectory

#define OfcSetCurrentDirectory   OfcSetCurrentDirectoryA

◆ OfcSetFileAttributes

#define OfcSetFileAttributes   OfcSetFileAttributesA

◆ SECURITY_DESCRIPTOR_CONTROL_DC

#define SECURITY_DESCRIPTOR_CONTROL_DC   0x0100

◆ SECURITY_DESCRIPTOR_CONTROL_DD

#define SECURITY_DESCRIPTOR_CONTROL_DD   0x0008

◆ SECURITY_DESCRIPTOR_CONTROL_DI

#define SECURITY_DESCRIPTOR_CONTROL_DI   0x0400

◆ SECURITY_DESCRIPTOR_CONTROL_DP

#define SECURITY_DESCRIPTOR_CONTROL_DP   0x0004

◆ SECURITY_DESCRIPTOR_CONTROL_DT

#define SECURITY_DESCRIPTOR_CONTROL_DT   0x0080

◆ SECURITY_DESCRIPTOR_CONTROL_GD

#define SECURITY_DESCRIPTOR_CONTROL_GD   0x0002

◆ SECURITY_DESCRIPTOR_CONTROL_OD

#define SECURITY_DESCRIPTOR_CONTROL_OD   0x0001

◆ SECURITY_DESCRIPTOR_CONTROL_PD

#define SECURITY_DESCRIPTOR_CONTROL_PD   0x1000

◆ SECURITY_DESCRIPTOR_CONTROL_PS

#define SECURITY_DESCRIPTOR_CONTROL_PS   0x2000

◆ SECURITY_DESCRIPTOR_CONTROL_RM

#define SECURITY_DESCRIPTOR_CONTROL_RM   0x4000

◆ SECURITY_DESCRIPTOR_CONTROL_SC

#define SECURITY_DESCRIPTOR_CONTROL_SC   0x0200

◆ SECURITY_DESCRIPTOR_CONTROL_SD

#define SECURITY_DESCRIPTOR_CONTROL_SD   0x0020

◆ SECURITY_DESCRIPTOR_CONTROL_SI

#define SECURITY_DESCRIPTOR_CONTROL_SI   0x0800

◆ SECURITY_DESCRIPTOR_CONTROL_SP

#define SECURITY_DESCRIPTOR_CONTROL_SP   0x0010

◆ SECURITY_DESCRIPTOR_CONTROL_SR

#define SECURITY_DESCRIPTOR_CONTROL_SR   0x8000

◆ SECURITY_DESCRIPTOR_CONTROL_SS

#define SECURITY_DESCRIPTOR_CONTROL_SS   0x0040

Typedef Documentation

◆ OFC_FILE_ACCESS_INFO

◆ OFC_FILE_ALIGNMENT_INFO

◆ OFC_FILE_ALL_INFO

◆ OFC_FILE_ALLOCATION_INFO

Contains the total number of bytes that should be allocated for a file

◆ OFC_FILE_ATTRIBUTE_TAG_INFO

Receives the requested file attribute information

◆ OFC_FILE_BASIC_INFO

Basic Information for a file

◆ OFC_FILE_BOTH_DIR_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_COMPRESSION_INFO

Receives file compression information

◆ OFC_FILE_DIR_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_DISPOSITION_INFO

Indicates whether a file should be deleted

◆ OFC_FILE_EA_INFO

◆ OFC_FILE_END_OF_FILE_INFO

Contains the specified value to which the end of file should be set

◆ OFC_FILE_FULL_DIR_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_ID_BOTH_DIR_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_ID_FULL_DIR_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_INFO_BY_HANDLE_CLASS

Identifies the type of file information for the GetFileInformationByHandleEx or SetFileInformationByHandleEx call

◆ OFC_FILE_INFO_BY_HANDLE_TYPE

◆ OFC_FILE_INTERNAL_INFO

◆ OFC_FILE_IO_PRIORITY_HINT_INFO

Specifies the priority hint for a file I/O operation

◆ OFC_FILE_MODE_INFO

◆ OFC_FILE_NAME_INFO

Receives the File Name

◆ OFC_FILE_NAMES_INFO

Contains Information about files in a specified directory

◆ OFC_FILE_NETWORK_OPEN_INFO

Network Open Information for a file

◆ OFC_FILE_POSITION_INFO

◆ OFC_FILE_RENAME_INFO

Contains the name to which the file should be renamed

Examples
test_file.c.

◆ OFC_FILE_STANDARD_INFO

Extended Information for a file

◆ OFC_FILE_STREAM_INFO

Receives file stream info for the file

◆ OFC_FILEFS_ATTRIBUTE_INFO

◆ OFC_FILEFS_DEVICE_INFO

◆ OFC_FILEFS_FULL_SIZE_INFO

◆ OFC_FILEFS_INFO_BY_HANDLE_CLASS

◆ OFC_FILEFS_SIZE_INFO

◆ OFC_FILEFS_VOLUME_INFO

◆ OFC_FILESECURITY_DESCRIPTOR

◆ OFC_FILETIME

typedef struct _OFC_FILETIME OFC_FILETIME

◆ OFC_GET_FILEEX_INFO_LEVELS

Values for the OfcGetFileAttributesEx Call

◆ OFC_LPOVERLAPPED

◆ OFC_LPSECURITY_ATTRIBUTES

A pointer to the security attributes

◆ OFC_LPWIN32_FILE_ATTRIBUTE_DATA

A pointer to the Win32 File Attribute Data

◆ OFC_LPWIN32_FIND_DATAA

A pointer to the Win32 Find data

◆ OFC_LPWIN32_FIND_DATAW

A pointer to the Win32 Find data

◆ OFC_OVERLAPPED

Contains information used in asynchrous I/O

◆ OFC_PRIORITY_HINT

Defines values for File I/O Priority

◆ OFC_PSECURITY_DESCRIPTOR

A pointer to a security descriptor

◆ OFC_SECURITY_ATTRIBUTES

Security Attributes for files

This is not used but is here for completeness

◆ OFC_WIN32_FILE_ATTRIBUTE_DATA

Contains information about the file that is found by OfcFindFirstFile, OfcFindFirstFileEx or OfcFindNextFile

◆ OFC_WIN32_FIND_DATAA

◆ OFC_WIN32_FIND_DATAW

Contains information about the file that is found by OfcFindFirstFile, OfcFindFirstFileEx or OfcFindNextFile

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Valid Access Rights for Files and Directories

Enumerator
OFC_FILE_ADD_FILE 

The right to create a file in the directory

OFC_FILE_ADD_SUBDIRECTORY 

The right to create a subdirectory

OFC_FILE_ALL_ACCESS 

All possible access rights for a file

OFC_FILE_APPEND_DATA 

The right to append data to a file

OFC_FILE_DELETE_CHILD 

The right to delete a directory

OFC_FILE_EXECUTE 

The right to execute the file

OFC_FILE_LIST_DIRECTORY 

The right to list contents of a directory

OFC_FILE_READ_ATTRIBUTES 

The right to read file attributes

OFC_FILE_READ_DATA 

The right to read file data

OFC_FILE_READ_EA 

The right to read extended file attributes

OFC_FILE_TRAVERSE 

The right to traverse a directory

OFC_FILE_WRITE_ATTRIBUTES 

The right to write file attributes

OFC_FILE_WRITE_DATA 

The right to write data to a file

OFC_FILE_WRITE_EA 

The right to write extended file attributes

OFC_FILE_DELETE 

Delete Access

OFC_GENERIC_EXECUTE 

Generic Execute Access

OFC_GENERIC_READ 

Generic Read Access

OFC_GENERIC_WRITE 

Generic Write Access

◆ anonymous enum

anonymous enum

The Sharing Mode of an object

Enumerator
OFC_FILE_SHARE_NONE 

Open file for exclusive access

OFC_FILE_SHARE_DELETE 

Allow subsequent opens to request delete access and allow this access if file previously opened with delete access

OFC_FILE_SHARE_WRITE 

Allow subsequent opens to request write access and allow this access if file previously opened with write access

OFC_FILE_SHARE_READ 

Allow subsequent opens to request read access and allow this access if file previously opened with read access

◆ anonymous enum

anonymous enum

A action to take on files whether they exist or not.

Enumerator
OFC_CREATE_NEW 

Create a New File. Fail if file already exists

OFC_CREATE_ALWAYS 

Create a file always. If it exists overwrite.

OFC_OPEN_EXISTING 

Open an Existing File. If the file doesn't exist, fail

OFC_OPEN_ALWAYS 

Open a file always. If the file doesn't exist, create

OFC_TRUNCATE_EXISTING 

Open a file and truncate. If the file doesn't exist, fail.

◆ anonymous enum

anonymous enum

File Attributes and Flags

Enumerator
OFC_FILE_ATTRIBUTE_READONLY 

The file is read only

OFC_FILE_ATTRIBUTE_HIDDEN 

The file is hidden

OFC_FILE_ATTRIBUTE_SYSTEM 

The file is a system file

OFC_FILE_ATTRIBUTE_BOOKMARK 
OFC_FILE_ATTRIBUTE_DIRECTORY 

The file is a directory

OFC_FILE_ATTRIBUTE_ARCHIVE 

The file should be archived

OFC_FILE_ATTRIBUTE_NORMAL 

The file is a normal file

OFC_FILE_ATTRIBUTE_TEMPORARY 

The file is a temporary file

OFC_FILE_ATTRIBUTE_SPARSE_FILE 

The file is a sparse file

OFC_FILE_ATTRIBUTE_REPARSE_POINT 
OFC_FILE_ATTRIBUTE_COMPRESSED 

The file is compressed

OFC_FILE_ATTRIBUTE_OFFLINE 

The file data is not immediate available

OFC_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 
OFC_FILE_ATTRIBUTE_ENCRYPTED 

The file is encrypted

OFC_FILE_ATTRIBUTE_INTEGRITY_STREAM 
OFC_FILE_ATTRIBUTE_VIRTUAL 

The file is virtual

OFC_FILE_ATTRIBUTE_NO_SCRUB_DATA 
OFC_FILE_ATTRIBUTE_REFERRAL 
OFC_FILE_FLAG_OPEN_NO_RECALL 

If the file is remote, don't move back to local storage

OFC_FILE_FLAG_WORKGROUP 

File is a workgroup directory

OFC_FILE_FLAG_SERVER 

File is a server directory

OFC_FILE_FLAG_SHARE 
OFC_FILE_FLAG_POSIX_SEMANTICS 

The file is being opened with Posix Semantics (i.e. case sensitive)

OFC_FILE_FLAG_BACKUP_SEMANTICS 

The file is opened for a backup or restore operation

OFC_FILE_FLAG_DELETE_ON_CLOSE 

The file is to be deleted when closed

OFC_FILE_FLAG_SEQUENTIAL_SCAN 

The file will be accessed sequentially from beggining to end

OFC_FILE_FLAG_RANDOM_ACCESS 

The file is to be accessed randomly

OFC_FILE_FLAG_NO_BUFFERING 

The file data should not be cached

OFC_FILE_FLAG_OVERLAPPED 

The file is being opened for asynchronous I/O

OFC_FILE_FLAG_WRITE_THROUGH 

Write Caching should not occur

◆ anonymous enum

anonymous enum
Enumerator
OFC_FILE_CREATE_DIRECTORY 

Create a directory

OFC_FILE_CREATE_WRITETHROUGH 

Do not cache writes

OFC_FILE_CREATE_SEQUENTIAL 

I/O is performed sequentially

OFC_FILE_CREATE_SIOALERT 

Enable Alerts on the file

OFC_FILE_CREATE_SIONONALERT 

Do not enable alerts on the file

OFC_FILE_CREATE_NONDIRECTORY 

This is not a directory

OFC_FILE_CREATE_NOEA 

Do not create extended attributes

OFC_FILE_CREATE_8x3 

Enforce 8x3 file naming

OFC_FILE_CREATE_RANDOM 

Create a random file

OFC_FILE_CREATE_DELONCLOSE 

Delete this file when closed

◆ anonymous enum

anonymous enum
Enumerator
OFC_FILE_OPEN_ACTION_OPENED 

The file was opened

OFC_FILE_OPEN_ACTION_CREATED 

The file was created

OFC_FILE_OPEN_ACTION_TRUNCATED 

The file was truncated

◆ anonymous enum

anonymous enum

Enumerator for Move Method

Enumerator
OFC_FILE_BEGIN 

Move relative from the beginning of the file

OFC_FILE_CURRENT 

Move relative to the current file pointer

OFC_FILE_END 

Move relative to EOF

◆ anonymous enum

anonymous enum

Flags for OfcLockFileEx

Enumerator
OFC_LOCKFILE_FAIL_IMMEDIATELY 
OFC_LOCKFILE_EXCLUSIVE_LOCK 

◆ _OFC_FILE_INFO_BY_HANDLE_CLASS

Identifies the type of file information for the GetFileInformationByHandleEx or SetFileInformationByHandleEx call

Enumerator
OfcFileBasicInfo 

Minimal Information

OfcFileStandardInfo 

Extended Information

OfcFileAllInfo 

All Information

OfcFileNameInfo 

The File Name

OfcFileRenameInfo 

The File Name should be changed

OfcFileDispositionInfo 

The File Should be deleted

OfcFileAllocationInfo 

File Allocation Info should be changed

OfcFileEndOfFileInfo 

The end of the file should be set

OfcFileStreamInfo 

File Stream Information should be retrieved

OfcFileEaInfo 

File Extended Attribute Information should be retrieved

OfcFileCompressionInfo 

File Compression Info should be retrieved

OfcFileAttributeTagInfo 

File Attribute Information Should be Retrieved

OfcFileIdBothDirectoryInfo 

Files in the directory should be retrieved

OfcFileIdBothDirectoryRestartInfo 

Identical fo FileIdBothDirectoryInfo but the enumeration should begin from the beginning

OfcFileInfoStandard 
OfcFileInfoAll 
OfcFileNetworkOpenInfo 
OfcFileDirectoryInformation 
OfcFileFullDirectoryInformation 
OfcFileIdFullDirectoryInformation 
OfcFileBothDirectoryInformation 
OfcFileIdBothDirectoryInformation 
OfcFileNamesInformation 
OfcFileInternalInformation 
OfcMaximumFileInfoByHandlesClass 

Maximum Value

◆ _OFC_FILE_INFO_BY_HANDLE_TYPE

Enumerator
OfcFileInfoTypeFile 
OfcFileInfoTypeFS 
OfcFileInfoTypeSecurity 
OfcFileInfoTypeQuota 

◆ _OFC_FILEFS_INFO_BY_HANDLE_CLASS

Enumerator
OfcFileFSAttributeInformation 
OfcFileFSSizeInformation 
OfcFileFSVolumeInformation 
OfcFileFSFullSizeInformation 
OfcFileFSDeviceInformation 

◆ _OFC_GET_FILEEX_INFO_LEVELS

Values for the OfcGetFileAttributesEx Call

Enumerator
OfcGetFileExInfoStandard 

Standard Information

OfcGetFileExMaxInfoLevel 

Max Value

◆ _OFC_PRIORITY_HINT

Defines values for File I/O Priority

Enumerator
OfcIoPriorityHintVeryLow 
OfcIoPriorityHintLow 
OfcIoPriorityHintNormal 
OfcMaximumIoPriorityHintType 

◆ OFC_FILE_ERRORS

Error Codes that can be returned by File APIs

Enumerator
OFC_ERROR_SUCCESS 
OFC_ERROR_INVALID_FUNCTION 
OFC_ERROR_FILE_NOT_FOUND 
OFC_ERROR_PATH_NOT_FOUND 
OFC_ERROR_TOO_MANY_OPEN_FILES 
OFC_ERROR_ACCESS_DENIED 
OFC_ERROR_INVALID_HANDLE 
OFC_ERROR_NOT_ENOUGH_MEMORY 
OFC_ERROR_INVALID_ACCESS 
OFC_ERROR_OUTOFMEMORY 
OFC_ERROR_INVALID_DRIVE 
OFC_ERROR_CURRENT_DIRECTORY 
OFC_ERROR_NOT_SAME_DEVICE 
OFC_ERROR_NO_MORE_FILES 
OFC_ERROR_WRITE_PROTECT 
OFC_ERROR_NOT_READY 
OFC_ERROR_CRC 
OFC_ERROR_BAD_LENGTH 
OFC_ERROR_SEEK 
OFC_ERROR_WRITE_FAULT 
OFC_ERROR_READ_FAULT 
OFC_ERROR_GEN_FAILURE 
OFC_ERROR_SHARING_VIOLATION 
OFC_ERROR_LOCK_VIOLATION 
OFC_ERROR_WRONG_DISK 
OFC_ERROR_SHARING_BUFFER_EXCEEDED 
OFC_ERROR_HANDLE_EOF 
OFC_ERROR_HANDLE_DISK_FULL 
OFC_ERROR_BAD_NET_NAME 
OFC_ERROR_NOT_SUPPORTED 
OFC_ERROR_REM_NOT_LIST 
OFC_ERROR_DUP_NAME 
OFC_ERROR_BAD_NETPATH 
OFC_ERROR_NETWORK_BUSY 
OFC_ERROR_DEV_NOT_EXIST 
OFC_ERROR_BAD_NET_RESP 
OFC_ERROR_UNEXP_NET_ERR 
OFC_ERROR_BAD_DEV_TYPE 
OFC_ERROR_FILE_EXISTS 
OFC_ERROR_CANNOT_MAKE 
OFC_ERROR_INVALID_PASSWORD 
OFC_ERROR_INVALID_PARAMETER 
OFC_ERROR_NET_WRITE_FAULT 
OFC_ERROR_MORE_ENTRIES 
OFC_ERROR_BROKEN_PIPE 
OFC_ERROR_OPEN_FAILED 
OFC_ERROR_BUFFER_OVERFLOW 
OFC_ERROR_DISK_FULL 
OFC_ERROR_CALL_NOT_IMPLEMENTED 
OFC_ERROR_INSUFFICIENT_BUFFER 
OFC_ERROR_INVALID_NAME 
OFC_ERROR_INVALID_LEVEL 
OFC_ERROR_NO_VOLUME_LABEL 
OFC_ERROR_NEGATIVE_SEEK 
OFC_ERROR_SEEK_ON_DEVICE 
OFC_ERROR_DIR_NOT_EMPTY 
OFC_ERROR_PATH_BUSY 
OFC_ERROR_BAD_ARGUMENTS 
OFC_ERROR_BAD_PATHNAME 
OFC_ERROR_BUSY 
OFC_ERROR_ALREADY_EXISTS 
OFC_ERROR_INVALID_FLAG_NUMBER 
OFC_ERROR_BAD_PIPE 
OFC_ERROR_PIPE_BUSY 
OFC_ERROR_NO_DATA 
OFC_ERROR_PIPE_NOT_CONNECTED 
OFC_ERROR_MORE_DATA 
OFC_ERROR_INVALID_EA_NAME 
OFC_ERROR_EA_LIST_INCONSISTENT 
OFC_ERROR_DIRECTORY 
OFC_ERROR_EAS_DIDNT_FIT 
OFC_ERROR_EA_FILE_CORRUPT 
OFC_ERROR_EA_TABLE_FULL 
OFC_ERROR_INVALID_EA_HANDLE 
OFC_ERROR_EAS_NOT_SUPPORTED 
OFC_ERROR_OPLOCK_NOT_GRANTED 
OFC_ERROR_DISK_TOO_FRAGMENTED 
OFC_ERROR_DELETE_PENDING 
OFC_ERROR_PIPE_CONNECTED 
OFC_ERROR_PIPE_LISTENING 
OFC_ERROR_EA_ACCESS_DENIED 
OFC_ERROR_OPERATION_ABORTED 
OFC_ERROR_IO_INCOMPLETE 
OFC_ERROR_IO_PENDING 
OFC_ERROR_NOACCESS 
OFC_ERROR_INVALID_FLAGS 
OFC_ERROR_UNRECOGNIZED_VOLUME 
OFC_ERROR_FILE_INVALID 
OFC_ERROR_NOTIFY_ENUM_DIR 
OFC_ERROR_BUS_RESET 
OFC_ERROR_IO_DEVICE 
OFC_ERROR_DISK_OPERATION_FAILED 
OFC_ERROR_BAD_DEVICE 
OFC_ERROR_INVALID_PASSWORDNAME 
OFC_ERROR_LOGON_FAILURE 
OFC_ERROR_NOT_ENOUGH_QUOTA 
OFC_ERROR_CONNECTION_REFUSED 
OFC_ERROR_NETWORK_UNREACHABLE 
OFC_ERROR_PROTOCOL_UNREACHABLE 
OFC_ERROR_INVALID_LOGON_HOURS 
OFC_ERROR_INVALID_WORKSTATION 
OFC_ERROR_PASSWORD_EXPIRED 
OFC_ERROR_ACCOUNT_DISABLED 
OFC_ERROR_LOGON_NOT_GRANTED 
OFC_ERROR_TIMEOUT 
OFC_ERROR_ACCOUNT_EXPIRED 
OFC_ERROR_ACCOUNT_LOCKED_OUT 

Function Documentation

◆ ofc_get_error_string()

OFC_CORE_LIB const OFC_CHAR* ofc_get_error_string ( OFC_DWORD  dwerr)

Get Error String from Error

Parameters
dwerrError Code
Returns
Error String
Examples
smbcp.c, smbfree.c, smbls.c, smbrm.c, and test_file.c.

◆ OfcCloseHandle()

OFC_CORE_LIB OFC_BOOL OfcCloseHandle ( OFC_HANDLE  hObject)

Close A File Handle

Use this call to release a file handle obtained from the Create call

Parameters
hObjectThe handle to close
Returns
OFC_TRUE if the function succeeded, OFC_FALSE if failure
Examples
smbcp.c, smbrm.c, and test_file.c.

◆ OfcCreateDirectoryA()

OFC_CORE_LIB OFC_BOOL OfcCreateDirectoryA ( OFC_LPCSTR  lpPathName,
OFC_LPSECURITY_ATTRIBUTES  lpSecurityAttr 
)

Create a Directory Using Normal Characters

See also
OfcCreateDirectoryW

◆ OfcCreateDirectoryW()

OFC_CORE_LIB OFC_BOOL OfcCreateDirectoryW ( OFC_LPCTSTR  lpPathName,
OFC_LPSECURITY_ATTRIBUTES  lpSecurityAttr 
)

Create a directory

Parameters
lpPathNamePath to the directory to create
lpSecurityAttrSecurity Attributes for the directory
Returns
OFC_TRUE if success, OFC_FALSE otherwise

◆ OfcCreateFileA()

OFC_CORE_LIB OFC_HANDLE OfcCreateFileA ( OFC_LPCSTR  lpFileName,
OFC_DWORD  dwDesiredAccess,
OFC_DWORD  dwShareMode,
OFC_LPSECURITY_ATTRIBUTES  lpSecurityAttributes,
OFC_DWORD  dwCreationDisposition,
OFC_DWORD  dwFlagsAndAttributes,
OFC_HANDLE  hTemplateFile 
)

Create or Open a File Using Normal Characters

See also
OfcCreateFileW
Examples
test_file.c.

◆ OfcCreateFileW()

OFC_CORE_LIB OFC_HANDLE OfcCreateFileW ( OFC_LPCTSTR  lpFileName,
OFC_DWORD  dwDesiredAccess,
OFC_DWORD  dwShareMode,
OFC_LPSECURITY_ATTRIBUTES  lpSecurityAttributes,
OFC_DWORD  dwCreationDisposition,
OFC_DWORD  dwFlagsAndAttributes,
OFC_HANDLE  hTemplateFile 
)

Create or Open a File

Use this call to obtain a file handle for a new or existing file

Parameters
lpFileNameThe name of the object to be crated or opened.
dwDesiredAccessThe access to the object, which can be read, write, or both.
dwShareModeThe sharing mode of an object which can be read, write, both or none.
lpSecurityAttributesThis parameter is ignored and should be NULL.
dwCreationDispositionAn action to take on files that exist or do not exist.
dwFlagsAndAttributesThe file attributes and flag. The flags used by Win32 are accepted.
hTemplateFileThis parameter is ignored and should be OFC_HANDLE_NULL
Returns
If the function fails, the return valid is OFC_INVALID_HANDLE_VALUE If it succeeds, it will return a file handle.

◆ OfcCreateOverlapped()

OFC_CORE_LIB OFC_HANDLE OfcCreateOverlapped ( OFC_HANDLE  hFile)

Create an Overlapped I/O Structure for the desired platform

This is used by Read and Write calls to schedule overlapped I/O. The implementation of Overlapped I/O is platform specific so the context for an overlapped I/O is also platform specific

Returns
Handle to the Overlapped I/O Context
Examples
smbcp.c, and test_file.c.

◆ OfcDeleteFileA()

OFC_CORE_LIB OFC_BOOL OfcDeleteFileA ( OFC_LPCSTR  lpFileName)

Delete a File Using Normal Characters

See also
OfcDeleteFileW

◆ OfcDeleteFileW()

OFC_CORE_LIB OFC_BOOL OfcDeleteFileW ( OFC_LPCTSTR  lpFileName)

Deletes an existing file

Parameters
lpFileNameThe name of the file in UNC or SMB URL format
Returns
If success, returns OFC_TRUE, if failure returns OFC_FALSE

◆ OfcDestroyOverlapped()

OFC_CORE_LIB OFC_VOID OfcDestroyOverlapped ( OFC_HANDLE  hFile,
OFC_HANDLE  hOverlapped 
)

Destroy an Overlapped I/O context

Parameters
hFileFile handle that overlapped context handle is for
hOverlappedThe overlapped context to destroy
Examples
smbcp.c, and test_file.c.

◆ OfcDeviceIoControl()

OFC_CORE_LIB OFC_BOOL OfcDeviceIoControl ( OFC_HANDLE  hFile,
OFC_DWORD  dwIoControlCode,
OFC_LPVOID  lpInBuffer,
OFC_DWORD  nInBufferSize,
OFC_LPVOID  lpOutBuffer,
OFC_DWORD  nOutBufferSize,
OFC_LPDWORD  lpBytesReturned,
OFC_HANDLE  hOverlapped 
)

Perform a Device IOCTL

This is an internal API that is used for DFS resolution

◆ OfcDismountA()

OFC_CORE_LIB OFC_BOOL OfcDismountA ( OFC_LPCSTR  lpFileName)

Dismount a File Using Normal Characters

See also
OfcDismountW
Examples
test_file.c.

◆ OfcDismountW()

OFC_CORE_LIB OFC_BOOL OfcDismountW ( OFC_LPCTSTR  lpFileName)

Dismount an SMB client connection

This is a non-standard and optional API for those that wish to ensure that a client connection to a server is disconnected. Under normal operation, client connections are disconnected after idle for a period of time.

Parameters
lpFileNameA path that includes the server URL
Returns
Status

◆ OfcFileDestroy()

OFC_CORE_LIB OFC_VOID OfcFileDestroy ( OFC_VOID  )

◆ OfcFileGetFSHandle()

OFC_CORE_LIB OFC_HANDLE OfcFileGetFSHandle ( OFC_HANDLE  hHandle)

An internal call to return the native file system handle

Parameters
hHandleHandle to the file
Returns
A handle to the lower file system specific file

◆ OfcFileGetFSType()

OFC_CORE_LIB OFC_FST_TYPE OfcFileGetFSType ( OFC_HANDLE  hHandle)

Return the type of file system that a file is on

Parameters
hHandleHandle to the file
Returns
The type of file system

◆ OfcFileGetOverlappedEvent()

OFC_CORE_LIB OFC_HANDLE OfcFileGetOverlappedEvent ( OFC_HANDLE  hOverlapped)

Get the event handle of the overlapped event (deprecated)

Parameters
hOverlappedThe overlapped event
Returns
The event handle

◆ OfcFileGetOverlappedWaitQ()

OFC_CORE_LIB OFC_HANDLE OfcFileGetOverlappedWaitQ ( OFC_HANDLE  hOverlapped)

Get the Message Queue of the overlapped event

Parameters
hOverlappedThe overlapped event
Returns
The msgq handle

◆ OfcFileInit()

OFC_CORE_LIB OFC_VOID OfcFileInit ( OFC_VOID  )

Initialize the Open File Redirector

This should only be called by the Framework Init Layer

◆ OfcFileThreadDeinit()

OFC_CORE_LIB OFC_VOID OfcFileThreadDeinit ( OFC_VOID  )

Deinitialize File Local Storage for Threads

Examples
smbls.c.

◆ OfcFileThreadInit()

OFC_CORE_LIB OFC_VOID OfcFileThreadInit ( OFC_VOID  )

Initialize File Local Storage for Threads

Examples
smbls.c.

◆ OfcFindClose()

OFC_CORE_LIB OFC_BOOL OfcFindClose ( OFC_HANDLE  hFindFile)

Closes a file search handle opened by a call to OfcFindFirstFile

Parameters
hFindFileThe file search handle
Returns
OFC_TRUE if the call succeeded, OFC_FALSE otherwise
Examples
smbls.c, and test_file.c.

◆ OfcFindFirstFileA()

OFC_CORE_LIB OFC_HANDLE OfcFindFirstFileA ( OFC_LPCSTR  lpFileName,
OFC_LPWIN32_FIND_DATAA  lpFindFileData,
OFC_BOOL more 
)

Searches a Directory Using a Normal Character Pattern

See also
OfcFindFirstFileW

◆ OfcFindFirstFileW()

OFC_CORE_LIB OFC_HANDLE OfcFindFirstFileW ( OFC_LPCTSTR  lpFileName,
OFC_LPWIN32_FIND_DATAW  lpFindFileData,
OFC_BOOL more 
)

Searches a directory for a file or subdirectory that matches the name or pattern.

Parameters
lpFileNameThe file name or pattern. The file name can contain '?' characters which will specified a wildcard for that particular character, or '*' which specifies a wildcard for all characters up to the next text pattern or the next directory level. For instance File*me would match FileName and FileGnome. Direct* would match Direct, Directory, DirectDeposit
lpFindFileDataA pointer to the OFC_WIN32_FIND_DATA structure.
morePointer to where to return more indication. OFC_TRUE says more files are available. OFC_FALSE says this is the last one
Returns
If the function succeeds, it will return a handle that can be used in subsequent OfcFindNextFile or OfcFindClose call. If the function failed, it will return OFC_INVALID_HANDLE_VALUE.

◆ OfcFindNextFileA()

OFC_CORE_LIB OFC_BOOL OfcFindNextFileA ( OFC_HANDLE  hFindFile,
OFC_LPWIN32_FIND_DATAA  lpFindFileData,
OFC_BOOL more 
)

Continue a search using Normal Characters

See also
OfcFindNextFileW

◆ OfcFindNextFileW()

OFC_CORE_LIB OFC_BOOL OfcFindNextFileW ( OFC_HANDLE  hFindFile,
OFC_LPWIN32_FIND_DATAW  lpFindFileData,
OFC_BOOL more 
)

Continues a search from a previous call to OfcFindFirstFile

Parameters
hFindFileThe search handle returned from OfcFindFirstFile
lpFindFileDataA pointer to the OFC_WIN32_FIND_DATA structure.
See also
http://msdn2.microsoft.com/en-us/library/aa365247.aspx
Parameters
morePointer to where to return more indication. OFC_TRUE says more files are available. OFC_FALSE says this is the last one
Returns
OFC_TRUE if the call succeeded, OFC_FALSE otherwise

◆ OfcFlushFileBuffers()

OFC_CORE_LIB OFC_BOOL OfcFlushFileBuffers ( OFC_HANDLE  hFile)

Write all buffered data to the file and clear any buffer cache

Parameters
hFileA handle to the open file.
Returns
OFC_TRUE if the call succeeded, OFC_FALSE otherwise
Examples
test_file.c.

◆ OfcGetCurrentDirectoryA()

OFC_CORE_LIB OFC_DWORD OfcGetCurrentDirectoryA ( OFC_DWORD  nBufferLength,
OFC_LPSTR  lpBuffer 
)

◆ OfcGetCurrentDirectoryW()

OFC_CORE_LIB OFC_DWORD OfcGetCurrentDirectoryW ( OFC_DWORD  nBufferLength,
OFC_LPTSTR  lpBuffer 
)

Get the Current Directory

This will return the default directory for relative file paths

Parameters
nBufferLengthSize of buffer to return the current directory to
lpBufferBuffer to write the current directory to
Returns
Number of characters in the buffer (not including terminating char) or zero if it failed (See OfcGetLastError)

◆ OfcGetDiskFreeSpaceA()

OFC_CORE_LIB OFC_BOOL OfcGetDiskFreeSpaceA ( OFC_LPCSTR  lpRootPathName,
OFC_LPDWORD  lpSectorsPerCluster,
OFC_LPDWORD  lpBytesPerSector,
OFC_LPDWORD  lpNumberOfFreeClusters,
OFC_LPDWORD  lpTotalNumberOfClusters 
)

Get Disk Free Space Using Normal Characters

See also
OfcGetDiskFreeSpaceW

◆ OfcGetDiskFreeSpaceW()

OFC_CORE_LIB OFC_BOOL OfcGetDiskFreeSpaceW ( OFC_LPCTSTR  lpRootPathName,
OFC_LPDWORD  lpSectorsPerCluster,
OFC_LPDWORD  lpBytesPerSector,
OFC_LPDWORD  lpNumberOfFreeClusters,
OFC_LPDWORD  lpTotalNumberOfClusters 
)

Get the amount of free space for the disk

Parameters
lpRootPathNameThe path name to the disk or share
lpSectorsPerClusterPointer to where to return the number of sectors per cluster for the volume
lpBytesPerSectorPointer to where to return the number of bytes per sector for the volume
lpNumberOfFreeClustersPointer to where to return the number of free clusters
lpTotalNumberOfClustersPointer to where to return the total number of clusters
Returns
OFC_TRUE if success, OFC_FALSE otherwise

◆ OfcGetFileAttributesExA()

OFC_CORE_LIB OFC_BOOL OfcGetFileAttributesExA ( OFC_LPCSTR  lpFileName,
OFC_GET_FILEEX_INFO_LEVELS  fInfoLevelId,
OFC_LPVOID  lpFileInformation 
)

Retrieves File Attributes Using Normal Characters

See also
OfcGetFileAttriubtesExW

◆ OfcGetFileAttributesExW()

OFC_CORE_LIB OFC_BOOL OfcGetFileAttributesExW ( OFC_LPCTSTR  lpFileName,
OFC_GET_FILEEX_INFO_LEVELS  fInfoLevelId,
OFC_LPVOID  lpFileInformation 
)

Retrieves Attributes for a specified file or directory

Parameters
lpFileNameThe name of the file or directory
fInfoLevelIdThe information class to retrieve. Must be OfcGetFileExInfoStandard
lpFileInformationA pointer to the buffer that received the attribute info. Must be a pointer to a OFC_WIN32_FILE_ATTRIBUTE_DATA structure see http://msdn2.microsoft.com/en-us/library/aa365739.aspx
Returns
OFC_TRUE if the function succeeded, OFC_FALSE otherwise
Examples
test_file.c.

◆ OfcGetFileInformationByHandleEx()

OFC_CORE_LIB OFC_BOOL OfcGetFileInformationByHandleEx ( OFC_HANDLE  hFile,
OFC_FILE_INFO_BY_HANDLE_CLASS  FileInformationClass,
OFC_LPVOID  lpFileInformation,
OFC_DWORD  dwBufferSize 
)

Retrieves Attribute Info for a file by File Handle

Parameters
hFileHandle to the file
FileInformationClassValue that specifies the type of info to return
lpFileInformationPointer to buffer that receives the requested file informaiton OFC_FILE_BASIC_INFO OFC_FILE_STANDARD_INFO OFC_FILE_NAME_INFO OFC_FILE_STREAM_INFO OFC_FILE_COMPRESSION_INFO OFC_FILE_ATTRIBUTE_TAG_INFO OFC_FILE_ID_BOTH_DIR_INFO
dwBufferSizeSize of the lpFileInformation buffer
Returns
OFC_TRUE if the call succeeded, OFC_FALSE otherwise
Examples
test_file.c.

◆ OfcGetLastError()

OFC_CORE_LIB OFC_DWORD OfcGetLastError ( OFC_VOID  )

Get the last error encountered by the File Component of Open Files

Returns
Error Code
Examples
smbcp.c, smbfree.c, smbls.c, smbrm.c, and test_file.c.

◆ OfcGetLastFileError()

OFC_CORE_LIB OFC_UINT32 OfcGetLastFileError ( OFC_HANDLE  hHandle)

Get the last file error that occured in this file handler for this thread

Parameters
hHandleHandle of File
Returns
Last File Error

NOTE: Use OfcGetLastError instead.

◆ OfcGetLastFileNameErrorA()

OFC_CORE_LIB OFC_UINT32 OfcGetLastFileNameErrorA ( OFC_LPCSTR  lpFileName)

Get Last Error for a File Using Normal Characters

See also
OfcGetLastFileNameErrorW

◆ OfcGetLastFileNameErrorW()

OFC_CORE_LIB OFC_UINT32 OfcGetLastFileNameErrorW ( OFC_LPCTSTR  lpFileName)

Get the last file error that occured in the file handler for a specified file in this thread's context

Parameters
lpFileNameName of the file to map to a file handler
Returns
Last File Error

NOTE: Use OfcGetLastError instead.

◆ OfcGetOverlappedResult()

OFC_CORE_LIB OFC_BOOL OfcGetOverlappedResult ( OFC_HANDLE  hFile,
OFC_HANDLE  hOverlapped,
OFC_LPDWORD  lpNumberOfBytesTransferred,
OFC_BOOL  bWait 
)

Retrieves the results of an overlapped operation on the specified file

Parameters
hFileA handle to the file
hOverlappedHandle to the overlapped structure
lpNumberOfBytesTransferredNumber of bytes read or written during the operation
bWaitWhether this function should block until the operation completes. If this is false, and the operation is not complete, the call returns false.
Returns
OFC_TRUE if the function succeeds, OFC_FALSE otherwise
Examples
smbcp.c, and test_file.c.

◆ OfcGetVolumeInformationA()

OFC_CORE_LIB OFC_BOOL OfcGetVolumeInformationA ( OFC_LPCSTR  lpRootPathName,
OFC_LPSTR  lpVolumeNameBuffer,
OFC_DWORD  nVolumeNameSize,
OFC_LPDWORD  lpVolumeSerialNumber,
OFC_LPDWORD  lpMaximumComponentLength,
OFC_LPDWORD  lpFileSystemFlags,
OFC_LPSTR  lpFileSystemName,
OFC_DWORD  nFileSystemName 
)

Get Volume Information Using Normal Characters

See also
OfcGetVolumeInformationW

◆ OfcGetVolumeInformationW()

OFC_CORE_LIB OFC_BOOL OfcGetVolumeInformationW ( OFC_LPCTSTR  lpRootPathName,
OFC_LPTSTR  lpVolumeNameBuffer,
OFC_DWORD  nVolumeNameSize,
OFC_LPDWORD  lpVolumeSerialNumber,
OFC_LPDWORD  lpMaximumComponentLength,
OFC_LPDWORD  lpFileSystemFlags,
OFC_LPTSTR  lpFileSystemName,
OFC_DWORD  nFileSystemName 
)

Get Volume Information for the volume

Parameters
lpRootPathNamePath to the volume or share
lpVolumeNameBufferPointer to buffer where to store the Volume Name
nVolumeNameSizeSize of the Volume Name Buffer
lpVolumeSerialNumberPointer to where to store the volume serial number
lpMaximumComponentLengthPointer to where to store the max size of a file name path
lpFileSystemFlagsPointer to where to store the file system flags
lpFileSystemNamePointer to where to store the file system name (i.e. NTFS)
nFileSystemNameSize of the file system name buffer
Returns
OFC_TRUE if successful, OFC_FALSE otherwise

◆ OfcLockFileEx()

OFC_CORE_LIB OFC_BOOL OfcLockFileEx ( OFC_HANDLE  hFile,
OFC_DWORD  flags,
OFC_DWORD  length_low,
OFC_DWORD  length_high,
OFC_HANDLE  hOverlapped 
)

Lock a region of a file

Parameters
hFileHandle to file to unlock region in
flagsFlags for lock
length_lowLow order 32 bits of length of region
length_highHigh order 32 bits of length of region
hOverlappedHandle to the overlapped structure
Returns
OFC_TRUE if successful, OFC_FALSE otherwise

◆ OfcMoveFileA()

OFC_CORE_LIB OFC_BOOL OfcMoveFileA ( OFC_LPCSTR  lpExistingFileName,
OFC_LPCSTR  lpNewFileName 
)

Moves a file (i.e Rename) Using Normal Characters

See also
OfcMoveFileW

◆ OfcMoveFileW()

OFC_CORE_LIB OFC_BOOL OfcMoveFileW ( OFC_LPCTSTR  lpExistingFileName,
OFC_LPCTSTR  lpNewFileName 
)

Moves an existing file or directory

Parameters
lpExistingFileNameThe current name of the file or directory
lpNewFileNameThe new name for the file or directory
Returns
OFC_TRUE if success, OFC_FALSE otherwise

◆ OfcReadFile()

OFC_CORE_LIB OFC_BOOL OfcReadFile ( OFC_HANDLE  hFile,
OFC_LPVOID  lpBuffer,
OFC_DWORD  nNumberOfBytesToRead,
OFC_LPDWORD  lpNumberOfBytesRead,
OFC_HANDLE  hOverlapped 
)

Reads data from a file

Parameters
hFileA Handle to the file to be read
lpBufferA pointer to the buffer that receives the data read from a file
nNumberOfBytesToReadThe Maximum numer of bytes to be read
lpNumberOfBytesReadA pointer to a variable to receive the number of bytes read
hOverlappedHandle to the overlapped structure
Returns
OFC_FALSE if the function fails, OFC_TRUE otherwise
Examples
smbcp.c, and test_file.c.

◆ OfcRemoveDirectoryA()

OFC_CORE_LIB OFC_BOOL OfcRemoveDirectoryA ( OFC_LPCSTR  lpPathName)

Delete a Directory Using Normal Characters

See also
OfcRemoveDirectoryW

◆ OfcRemoveDirectoryW()

OFC_CORE_LIB OFC_BOOL OfcRemoveDirectoryW ( OFC_LPCTSTR  lpPathName)

Deletes a directory

Parameters
lpPathNameThe name of the file in UNC or SMB URL format
Returns
If success, returns OFC_TRUE, if failure returns OFC_FALSE

◆ OfcSetCurrentDirectoryA()

OFC_CORE_LIB OFC_BOOL OfcSetCurrentDirectoryA ( OFC_LPCSTR  lpPathName)

◆ OfcSetCurrentDirectoryW()

OFC_CORE_LIB OFC_BOOL OfcSetCurrentDirectoryW ( OFC_LPCTSTR  lpPathName)

Set the Current Directory

This will set the default directory for relative file paths

Parameters
lpPathNameA path that includes the server URL
Returns
Status. Non-zero if succeeds, zero if failed. (See OfcGetLasstError)

◆ OfcSetEndOfFile()

OFC_CORE_LIB OFC_BOOL OfcSetEndOfFile ( OFC_HANDLE  hFile)

Sets the physical file size for the specified file to the current position

Parameters
hFileHandle to the file
Returns
OFC_TRUE if success, OFC_FALSE otherwise
Examples
test_file.c.

◆ OfcSetFileAttributesA()

OFC_CORE_LIB OFC_BOOL OfcSetFileAttributesA ( OFC_LPCSTR  lpFileName,
OFC_DWORD  dwFileAttributes 
)

Set File Attributes Using Normal Characters

See also
OfcSetFileAttributesW

◆ OfcSetFileAttributesW()

OFC_CORE_LIB OFC_BOOL OfcSetFileAttributesW ( OFC_LPCTSTR  lpFileName,
OFC_DWORD  dwFileAttributes 
)

Sets the attributes for a file or directory

Parameters
lpFileNameName of the file
dwFileAttributesThe file attributes to set for the file
Returns
OFC_TRUE if success, OFC_FALSE otherwise

◆ OfcSetFileInformationByHandle()

OFC_CORE_LIB OFC_BOOL OfcSetFileInformationByHandle ( OFC_HANDLE  hFile,
OFC_FILE_INFO_BY_HANDLE_CLASS  FileInformationClass,
OFC_LPVOID  lpFileInformation,
OFC_DWORD  dwBufferSize 
)

Set the file information for the specified file

Parameters
hFileHandle to the file
FileInformationClassAn enumeration that specifies the type of information to be changed
lpFileInformationA pointer to the buffer that contains the information to be set OFC_FILE_BASIC_INFO, OFC_FILE_RENAME_INFO, OFC_FILE_DISPOSITION_INFO, OFC_FILE_ALLOCATION_INFO, OFC_FILE_END_OF_FILE_INFO, OFC_FILE_IO_PRIORITY_HINT_INFO
dwBufferSizeThe size of the lpFileInformation
Returns
OFC_TRUE if success, OFC_FALSE otherwise
Examples
test_file.c.

◆ OfcSetFilePointer()

OFC_CORE_LIB OFC_DWORD OfcSetFilePointer ( OFC_HANDLE  hFile,
OFC_LONG  lDistanceToMove,
OFC_PLONG  lpDistanceToMoveHigh,
OFC_DWORD  dwMoveMethod 
)

Moves the file pointer of the specified file

Parameters
hFileFile Handle
lDistanceToMoveThe lower order 32 bits of a signed value that specifies the number of bytes to move relative to the move method
lpDistanceToMoveHighpointer to the high order 32 bits. This may be NULL. If not NULL it also returns the high order 32 bits of the resulting pointer. (the function's return value returns the low order 32 bits)
dwMoveMethodThe starting point for the file pointer move (FILE_BEGIN, FILE_CURRENT, FILE_END)
Returns
OFC_INVALID_SET_FILE_POINTER if Failed, low order file pointer if success. Since OFC_INVALID_SET_FILE_POINTER may also be interpreted as a valid low order file pointer, care should be taken not to get false negatives.
Examples
test_file.c.

◆ OfcSetOverlappedOffset()

OFC_CORE_LIB OFC_VOID OfcSetOverlappedOffset ( OFC_HANDLE  hFile,
OFC_HANDLE  hOverlapped,
OFC_OFFT  offset 
)

Set the offset at which an overlapped I/O should occur

Since Overlapped I/O is platform specific, this abstraction is provided to communicate to the File handler the file offset to perform the I/O at

Parameters
hFileFile to set the offset for
hOverlappedThe handle to the overlapped context
offsetThe file offset to set
Examples
smbcp.c, and test_file.c.

◆ OfcTransactNamedPipe()

OFC_CORE_LIB OFC_BOOL OfcTransactNamedPipe ( OFC_HANDLE  hFile,
OFC_LPVOID  lpInBuffer,
OFC_DWORD  nInBufferSize,
OFC_LPVOID  lpOutBuffer,
OFC_DWORD  nOutBufferSize,
OFC_LPDWORD  lpBytesRead,
OFC_HANDLE  hOverlapped 
)

Perform a transaction on a named pipe

Parameters
hFileFile handle of named pipe
lpInBufferPointer to the buffer to send to the pipe
nInBufferSizeSize of the input buffer
lpOutBufferPointer to the buffer to receive the response
nOutBufferSizeSize of the output buffer
lpBytesReadPointer to where to return the number of bytes read
hOverlappedHandle to the overlapped context if this is asynchronous
Returns
OFC_TRUE if success, OFC_FALSE if failure. On failure, GetLastError will return the error code

◆ OfcUnlockFileEx()

OFC_CORE_LIB OFC_BOOL OfcUnlockFileEx ( OFC_HANDLE  hFile,
OFC_UINT32  length_low,
OFC_UINT32  length_high,
OFC_HANDLE  hOverlapped 
)

Unlock a region in a file

Parameters
hFileFile Handle to unlock
length_lowthe low order 32 bits of the length of the region
length_highthe high order 32 bits of the length of the region
hOverlappedThe overlapped structure which specifies the offset
Returns
OFC_TRUE if successful, OFC_FALSE otherwise

◆ OfcWriteFile()

OFC_CORE_LIB OFC_BOOL OfcWriteFile ( OFC_HANDLE  hFile,
OFC_LPCVOID  lpBuffer,
OFC_DWORD  nNumberOfBytesToWrite,
OFC_LPDWORD  lpNumberOfBytesWritten,
OFC_HANDLE  hOverlapped 
)

Writes Data to the specified file

Parameters
hFileHandle to the file
lpBufferPointer to buffer containing data to write
nNumberOfBytesToWriteThe number of bytes to write
lpNumberOfBytesWrittenA pointer to a long to contain number of bytes written
hOverlappedHandle to the overlapped structure for asynchronous I/O
Returns
OFC_TRUE if success, OFC_FALSE if failed
Examples
smbcp.c, and test_file.c.

Variable Documentation

◆ OfcLastError

OFC_DWORD OfcLastError
extern

File System Global Last Error