Changeset 17 for trunk/include/helpers/dosh.h
- Timestamp:
- Dec 16, 2000, 10:09:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r15 r17 178 178 /* ****************************************************************** 179 179 * 180 * File helpers 181 * 182 ********************************************************************/ 183 184 PSZ doshGetExtension(const char *pcszFilename); 185 186 BOOL doshIsFileOnFAT(const char* pcszFileName); 187 188 APIRET doshIsValidFileName(const char* pcszFile, 189 BOOL fFullyQualified); 190 191 BOOL doshMakeRealName(PSZ pszTarget, PSZ pszSource, CHAR cReplace, BOOL fIsFAT); 192 193 ULONG doshQueryFileSize(HFILE hFile); 194 195 ULONG doshQueryPathSize(PSZ pszFile); 196 197 APIRET doshQueryPathAttr(const char* pcszFile, 198 PULONG pulAttr); 199 200 APIRET doshSetPathAttr(const char* pcszFile, 201 ULONG ulAttr); 202 203 APIRET doshReadTextFile(PSZ pszFile, 204 PSZ* ppszContent); 205 206 PSZ doshCreateBackupFileName(const char* pszExisting); 207 208 APIRET doshWriteTextFile(const char* pszFile, 209 const char* pszContent, 210 PULONG pulWritten, 211 PSZ pszBackup); 212 213 HFILE doshOpenLogFile(const char* pcszFilename); 214 215 APIRET doshWriteToLogFile(HFILE hfLog, const char* pcsz); 216 217 /* ****************************************************************** 218 * 219 * Directory helpers 220 * 221 ********************************************************************/ 222 223 BOOL doshQueryDirExist(PSZ pszDir); 224 225 APIRET doshCreatePath(PSZ pszPath, 226 BOOL fHidden); 227 228 APIRET doshQueryCurrentDir(PSZ pszBuf); 229 230 APIRET doshSetCurrentDir(const char *pcszDir); 231 232 #define DOSHDELDIR_RECURSE 0x0001 233 #define DOSHDELDIR_DELETEFILES 0x0002 234 235 APIRET doshDeleteDir(const char *pcszDir, 236 ULONG flFlags, 237 PULONG pulDirs, 238 PULONG pulFiles); 180 * Module handling helpers 181 * 182 ********************************************************************/ 183 184 /* 185 *@@ RESOLVEFUNCTION: 186 * one of these structures each define 187 * a single function import to doshResolveImports. 188 * 189 *@@added V0.9.3 (2000-04-25) [umoeller] 190 */ 191 192 typedef struct _RESOLVEFUNCTION 193 { 194 const char *pcszFunctionName; 195 PFN *ppFuncAddress; 196 } RESOLVEFUNCTION, *PRESOLVEFUNCTION; 197 198 APIRET doshResolveImports(PSZ pszModuleName, 199 HMODULE *phmod, 200 PRESOLVEFUNCTION paResolves, 201 ULONG cResolves); 239 202 240 203 /* ****************************************************************** … … 304 267 /* ****************************************************************** 305 268 * 269 * File helpers 270 * 271 ********************************************************************/ 272 273 PSZ doshGetExtension(const char *pcszFilename); 274 275 BOOL doshIsFileOnFAT(const char* pcszFileName); 276 277 APIRET doshIsValidFileName(const char* pcszFile, 278 BOOL fFullyQualified); 279 280 BOOL doshMakeRealName(PSZ pszTarget, PSZ pszSource, CHAR cReplace, BOOL fIsFAT); 281 282 ULONG doshQueryFileSize(HFILE hFile); 283 284 ULONG doshQueryPathSize(PSZ pszFile); 285 286 APIRET doshQueryPathAttr(const char* pcszFile, 287 PULONG pulAttr); 288 289 APIRET doshSetPathAttr(const char* pcszFile, 290 ULONG ulAttr); 291 292 APIRET doshReadTextFile(PSZ pszFile, 293 PSZ* ppszContent); 294 295 PSZ doshCreateBackupFileName(const char* pszExisting); 296 297 APIRET doshWriteTextFile(const char* pszFile, 298 const char* pszContent, 299 PULONG pulWritten, 300 PSZ pszBackup); 301 302 HFILE doshOpenLogFile(const char* pcszFilename); 303 304 APIRET doshWriteToLogFile(HFILE hfLog, const char* pcsz); 305 306 /* ****************************************************************** 307 * 308 * Directory helpers 309 * 310 ********************************************************************/ 311 312 BOOL doshQueryDirExist(PSZ pszDir); 313 314 APIRET doshCreatePath(PSZ pszPath, 315 BOOL fHidden); 316 317 APIRET doshQueryCurrentDir(PSZ pszBuf); 318 319 APIRET doshSetCurrentDir(const char *pcszDir); 320 321 #define DOSHDELDIR_RECURSE 0x0001 322 #define DOSHDELDIR_DELETEFILES 0x0002 323 324 APIRET doshDeleteDir(const char *pcszDir, 325 ULONG flFlags, 326 PULONG pulDirs, 327 PULONG pulFiles); 328 329 /* ****************************************************************** 330 * 306 331 * Process helpers 307 332 * … … 356 381 357 382 APIRET doshFreeEnvironment(PDOSENVIRONMENT pEnv); 358 359 /* ******************************************************************360 *361 * Module handling helpers362 *363 ********************************************************************/364 365 /*366 *@@ RESOLVEFUNCTION:367 * one of these structures each define368 * a single function import to doshResolveImports.369 *370 *@@added V0.9.3 (2000-04-25) [umoeller]371 */372 373 typedef struct _RESOLVEFUNCTION374 {375 const char *pcszFunctionName;376 PFN *ppFuncAddress;377 } RESOLVEFUNCTION, *PRESOLVEFUNCTION;378 379 APIRET doshResolveImports(PSZ pszModuleName,380 HMODULE *phmod,381 PRESOLVEFUNCTION paResolves,382 ULONG cResolves);383 383 384 384 /********************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.