00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00047 #ifndef WINSTL_INCL_WINSTL_H_FILE_CREATION_FUNCTIONS
00048 #define WINSTL_INCL_WINSTL_H_FILE_CREATION_FUNCTIONS
00049
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define WINSTL_VER_WINSTL_H_FILE_CREATION_FUNCTIONS_MAJOR 2
00052 # define WINSTL_VER_WINSTL_H_FILE_CREATION_FUNCTIONS_MINOR 0
00053 # define WINSTL_VER_WINSTL_H_FILE_CREATION_FUNCTIONS_REVISION 1
00054 # define WINSTL_VER_WINSTL_H_FILE_CREATION_FUNCTIONS_EDIT 13
00055 #endif
00056
00057
00058
00059
00060
00061 #ifndef WINSTL_INCL_WINSTL_H_WINSTL
00062 # include <winstl/winstl.h>
00063 #endif
00064
00065
00066
00067
00068
00069 #if !defined(_WINSTL_NO_NAMESPACE) && \
00070 !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00071 # if defined(_STLSOFT_NO_NAMESPACE)
00072
00073 namespace winstl
00074 {
00075 # else
00076
00077
00078 namespace stlsoft
00079 {
00080
00081 namespace winstl_project
00082 {
00083
00084 # endif
00085 #endif
00086
00087
00088
00089
00090
00095 STLSOFT_INLINE HANDLE winstl__open_file_read_shared_a(ws_char_a_t const* fileName, DWORD dwShareMode)
00096 {
00097 return STLSOFT_NS_GLOBAL(CreateFileA)(fileName, GENERIC_READ, dwShareMode, NULL, OPEN_ALWAYS, 0, NULL);
00098 }
00099
00104 STLSOFT_INLINE HANDLE winstl__open_file_read_shared_w(ws_char_w_t const* fileName, DWORD dwShareMode)
00105 {
00106 return STLSOFT_NS_GLOBAL(CreateFileW)(fileName, GENERIC_READ, dwShareMode, NULL, OPEN_ALWAYS, 0, NULL);
00107 }
00108
00113 STLSOFT_INLINE HANDLE winstl__open_file_exclusive_a(ws_char_a_t const* fileName)
00114 {
00115 return STLSOFT_NS_GLOBAL(CreateFileA)(fileName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, 0, NULL);
00116 }
00117
00122 STLSOFT_INLINE HANDLE winstl__open_file_exclusive_w(ws_char_w_t const* fileName)
00123 {
00124 return STLSOFT_NS_GLOBAL(CreateFileW)(fileName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, 0, NULL);
00125 }
00126
00127
00128
00129
00130
00131 #ifdef STLSOFT_DOCUMENTATION_SKIP_SECTION
00132 namespace winstl
00133 {
00134 #endif
00135
00136
00137
00138
00139
00140 #ifdef __cplusplus
00141
00146 inline HANDLE open_file_read_shared(ws_char_a_t const* fileName, DWORD dwShareMode)
00147 {
00148 return winstl__open_file_read_shared_a(fileName, dwShareMode);
00149 }
00154 inline HANDLE open_file_read_shared(ws_char_w_t const* fileName, DWORD dwShareMode)
00155 {
00156 return winstl__open_file_read_shared_w(fileName, dwShareMode);
00157 }
00158
00163 inline HANDLE open_file_exclusive(ws_char_a_t const* fileName)
00164 {
00165 return winstl__open_file_exclusive_a(fileName);
00166 }
00171 inline HANDLE open_file_exclusive(ws_char_w_t const* fileName)
00172 {
00173 return winstl__open_file_exclusive_w(fileName);
00174 }
00175
00176 #endif
00177
00178
00179
00180 #ifndef _WINSTL_NO_NAMESPACE
00181 # if defined(_STLSOFT_NO_NAMESPACE) || \
00182 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00183 }
00184 # else
00185 }
00186 }
00187 # endif
00188 #endif
00189
00190
00191
00192 #endif
00193
00194