|
|
1.1 root 1:
2: //==========================================================================//
3: // Exported Functions //
4: //==========================================================================//
5:
6: #define FILE_ERROR_MESSAGE_SIZE 256
7:
8:
9: VOID FileErrorMessageBox(HWND hWnd,
10: LPTSTR lpszFileName,
11: DWORD ErrorCode) ;
12:
13:
14: BOOL FileRead (HANDLE hFile,
15: LPMEMORY lpMemory,
16: DWORD nAmtToRead) ;
17:
18: BOOL FileWrite (HANDLE hFile,
19: LPMEMORY lpMemory,
20: DWORD nAmtToWrite) ;
21:
22:
23: #define FileSeekBegin(hFile, lAmtToMove) \
24: SetFilePointer (hFile, lAmtToMove, NULL, FILE_BEGIN)
25:
26: #define FileSeekEnd(hFile, lAmtToMove) \
27: SetFilePointer (hFile, lAmtToMove, NULL, FILE_END)
28:
29: #define FileSeekCurrent(hFile, lAmtToMove) \
30: SetFilePointer (hFile, lAmtToMove, NULL, FILE_CURRENT)
31:
32: #define FileTell(hFile) \
33: SetFilePointer (hFile, 0, NULL, FILE_CURRENT)
34:
35: #define FileHandleOpen(lpszFilePath) \
36: (HANDLE) CreateFile (lpszFilePath, \
37: GENERIC_READ | GENERIC_WRITE, \
38: 0, \
39: NULL, OPEN_EXISTING, 0, NULL)
40:
41: #define FileHandleCreate(lpszFilePath) \
42: (HANDLE) CreateFile (lpszFilePath, \
43: GENERIC_READ | GENERIC_WRITE, \
44: FILE_SHARE_READ, \
45: NULL, CREATE_ALWAYS, \
46: FILE_ATTRIBUTE_NORMAL, NULL)
47:
48: int FileHandleSeekCurrent (HANDLE hFile,
49: int iAmtToMove,
50: LPTSTR lpszFilePath) ;
51:
52:
53: int FileHandleSeekStart (HANDLE hFile,
54: int iAmtToMove,
55: LPTSTR lpszFilePath) ;
56:
57:
58: BOOL FileHandleWrite (HANDLE hFile,
59: LPMEMORY lpBuffer,
60: int cbWrite,
61: LPTSTR lpszFilePath) ;
62:
63:
64: LPMEMORY FileMap (HANDLE hFile, HANDLE *phMapHandle) ;
65:
66:
67: BOOL FileUnMap (LPVOID pBase, HANDLE hMapHandle) ;
68:
69:
70: void FileDriveDirectory (LPTSTR lpszFileSpec,
71: LPTSTR lpszDirectory) ;
72:
73:
74: void FileNameExtension (LPTSTR lpszSpec,
75: LPTSTR lpszFileNameExtension) ;
76:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.