scsl  0.1.1
Shimmering Clarity Standard Library
WinHelpers.h
1 //
2 // Created by kyle on 2023-10-10.
3 //
4 
5 #ifndef SCSL_WINHELPERS_H
6 #define SCSL_WINHELPERS_H
7 
8 #if defined(__WIN64__) || defined(__WIN32__) || defined(WIN32)
9 
10 #include <Windows.h>
11 #include <winbase.h>
12 #include <fileapi.h>
13 #include <strsafe.h>
14 
15 namespace scsl {
16 namespace Windows {
17 
18 
19 int DisplayWinError(LPTSTR lpszFunction, HANDLE handle);
20 
21 BOOL SetPrivilege(
22  HANDLE hToken, // access token handle
23  LPCTSTR lpszPrivilege, // name of privilege to enable/disable
24  BOOL bEnablePrivilege // to enable or disable privilege
25 );
26 
27 HANDLE CreateFileWindows(const char *path);
28 
29 int CreateFixedSizeFile(const char *path, size_t size);
30 
31 
32 
33 
34 } // namespace Windows
35 } // namespace scsl
36 
37 #endif // Windows-only guards.
38 
39 #endif //SCSL_WINHELPERS_H
scsl is the top-level namespace containing all the code in this library.
Definition: scsl.h:37