summaryrefslogtreecommitdiff
path: root/src/ToolBox/superpmi/superpmi/filecache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolBox/superpmi/superpmi/filecache.h')
-rw-r--r--src/ToolBox/superpmi/superpmi/filecache.h87
1 files changed, 36 insertions, 51 deletions
diff --git a/src/ToolBox/superpmi/superpmi/filecache.h b/src/ToolBox/superpmi/superpmi/filecache.h
index 51df5edde9..876100ec6e 100644
--- a/src/ToolBox/superpmi/superpmi/filecache.h
+++ b/src/ToolBox/superpmi/superpmi/filecache.h
@@ -19,60 +19,45 @@
class FileCache
{
public:
-
-static HANDLE
-CreateFileA(
- _In_ LPCSTR lpFileName,
- _In_ DWORD dwDesiredAccess,
- _In_ DWORD dwShareMode,
- _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- _In_ DWORD dwCreationDisposition,
- _In_ DWORD dwFlagsAndAttributes,
- _In_opt_ HANDLE hTemplateFile
- );
-
-static HANDLE
-CreateFileW(
- _In_ LPCWSTR lpFileName,
- _In_ DWORD dwDesiredAccess,
- _In_ DWORD dwShareMode,
- _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- _In_ DWORD dwCreationDisposition,
- _In_ DWORD dwFlagsAndAttributes,
- _In_opt_ HANDLE hTemplateFile
- );
-
-static BOOL
-ReadFile(
- _In_ HANDLE hFile,
- _Out_writes_bytes_to_opt_(nNumberOfBytesToRead, *lpNumberOfBytesRead) __out_data_source(FILE) LPVOID lpBuffer,
- _In_ DWORD nNumberOfBytesToRead,
- _Out_opt_ LPDWORD lpNumberOfBytesRead,
- _Inout_opt_ LPOVERLAPPED lpOverlapped
- );
-
-static BOOL
-WriteFile(
- _In_ HANDLE hFile,
- _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer,
- _In_ DWORD nNumberOfBytesToWrite,
- _Out_opt_ LPDWORD lpNumberOfBytesWritten,
- _Inout_opt_ LPOVERLAPPED lpOverlapped
- );
-
-static BOOL
-CloseHandle(
- _In_ HANDLE hObject
- );
-
-static __int64 GetFilePos(HANDLE hFile);
+ static HANDLE CreateFileA(_In_ LPCSTR lpFileName,
+ _In_ DWORD dwDesiredAccess,
+ _In_ DWORD dwShareMode,
+ _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+ _In_ DWORD dwCreationDisposition,
+ _In_ DWORD dwFlagsAndAttributes,
+ _In_opt_ HANDLE hTemplateFile);
+
+ static HANDLE CreateFileW(_In_ LPCWSTR lpFileName,
+ _In_ DWORD dwDesiredAccess,
+ _In_ DWORD dwShareMode,
+ _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+ _In_ DWORD dwCreationDisposition,
+ _In_ DWORD dwFlagsAndAttributes,
+ _In_opt_ HANDLE hTemplateFile);
+
+ static BOOL ReadFile(_In_ HANDLE hFile,
+ _Out_writes_bytes_to_opt_(nNumberOfBytesToRead, *lpNumberOfBytesRead) __out_data_source(FILE)
+ LPVOID lpBuffer,
+ _In_ DWORD nNumberOfBytesToRead,
+ _Out_opt_ LPDWORD lpNumberOfBytesRead,
+ _Inout_opt_ LPOVERLAPPED lpOverlapped);
+
+ static BOOL WriteFile(_In_ HANDLE hFile,
+ _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer,
+ _In_ DWORD nNumberOfBytesToWrite,
+ _Out_opt_ LPDWORD lpNumberOfBytesWritten,
+ _Inout_opt_ LPOVERLAPPED lpOverlapped);
+
+ static BOOL CloseHandle(_In_ HANDLE hObject);
+
+ static __int64 GetFilePos(HANDLE hFile);
private:
- static HANDLE cachedHandle;
- static bool openAsCache;
- static BYTE *rawBuff;
+ static HANDLE cachedHandle;
+ static bool openAsCache;
+ static BYTE* rawBuff;
static unsigned int offset;
static unsigned int length;
- static __int64 fileoffset;
+ static __int64 fileoffset;
};
#endif