1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | #ifndef _WIN_PATH_APIS_WRAPPER_ |
6 | #define _WIN_PATH_APIS_WRAPPER_ |
7 | class SString; |
8 | |
9 | HMODULE |
10 | LoadLibraryExWrapper( |
11 | _In_ LPCWSTR lpLibFileName, |
12 | _Reserved_ HANDLE hFile = NULL, |
13 | _In_ DWORD dwFlags = 0 |
14 | ); |
15 | |
16 | HANDLE |
17 | CreateFileWrapper( |
18 | _In_ LPCWSTR lpFileName, |
19 | _In_ DWORD dwDesiredAccess, |
20 | _In_ DWORD dwShareMode, |
21 | _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, |
22 | _In_ DWORD dwCreationDisposition, |
23 | _In_ DWORD dwFlagsAndAttributes, |
24 | _In_opt_ HANDLE hTemplateFile |
25 | ); |
26 | |
27 | BOOL |
28 | SetFileAttributesWrapper( |
29 | _In_ LPCWSTR lpFileName, |
30 | _In_ DWORD dwFileAttributes |
31 | ); |
32 | |
33 | DWORD |
34 | GetFileAttributesWrapper( |
35 | _In_ LPCWSTR lpFileName |
36 | ); |
37 | |
38 | BOOL |
39 | GetFileAttributesExWrapper( |
40 | _In_ LPCWSTR lpFileName, |
41 | _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId, |
42 | _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation |
43 | ); |
44 | BOOL |
45 | DeleteFileWrapper( |
46 | _In_ LPCWSTR lpFileName |
47 | ); |
48 | |
49 | HANDLE |
50 | FindFirstFileExWrapper( |
51 | _In_ LPCWSTR lpFileName, |
52 | _In_ FINDEX_INFO_LEVELS fInfoLevelId, |
53 | _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData, |
54 | _In_ FINDEX_SEARCH_OPS fSearchOp, |
55 | _Reserved_ LPVOID lpSearchFilter, |
56 | _In_ DWORD dwAdditionalFlags |
57 | ); |
58 | |
59 | BOOL |
60 | CopyFileWrapper( |
61 | _In_ LPCWSTR lpExistingFileName, |
62 | _In_ LPCWSTR lpNewFileName, |
63 | _In_ BOOL bFailIfExists |
64 | ); |
65 | |
66 | #ifndef FEATURE_PAL |
67 | BOOL |
68 | CopyFileExWrapper( |
69 | _In_ LPCWSTR lpExistingFileName, |
70 | _In_ LPCWSTR lpNewFileName, |
71 | _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine, |
72 | _In_opt_ LPVOID lpData, |
73 | _When_(pbCancel != NULL, _Pre_satisfies_(*pbCancel == FALSE)) |
74 | _Inout_opt_ LPBOOL pbCancel, |
75 | _In_ DWORD dwCopyFlags |
76 | ); |
77 | #endif //FEATURE_PAL |
78 | |
79 | BOOL |
80 | MoveFileExWrapper( |
81 | _In_ LPCWSTR lpExistingFileName, |
82 | _In_opt_ LPCWSTR lpNewFileName, |
83 | _In_ DWORD dwFlags |
84 | ); |
85 | |
86 | BOOL |
87 | CreateDirectoryWrapper( |
88 | _In_ LPCWSTR lpPathName, |
89 | _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes |
90 | ); |
91 | |
92 | BOOL |
93 | RemoveDirectoryWrapper( |
94 | _In_ LPCWSTR lpPathName |
95 | ); |
96 | |
97 | BOOL |
98 | CreateHardLinkWrapper( |
99 | _In_ LPCWSTR lpFileName, |
100 | _In_ LPCWSTR lpExistingFileName, |
101 | _Reserved_ LPSECURITY_ATTRIBUTES lpSecurityAttributes |
102 | ); |
103 | |
104 | DWORD |
105 | SearchPathWrapper( |
106 | _In_opt_ LPCWSTR lpPath, |
107 | _In_ LPCWSTR lpFileName, |
108 | _In_opt_ LPCWSTR lpExtension, |
109 | _In_ BOOL getPath, |
110 | SString& lpBuffer, |
111 | _Out_opt_ LPWSTR * lpFilePart |
112 | ); |
113 | |
114 | |
115 | DWORD |
116 | GetShortPathNameWrapper( |
117 | _In_ LPCWSTR lpszLongPath, |
118 | SString& lpszShortPath |
119 | ); |
120 | |
121 | DWORD |
122 | GetLongPathNameWrapper( |
123 | _In_ LPCWSTR lpszShortPath, |
124 | SString& lpszLongPath |
125 | ); |
126 | |
127 | UINT WINAPI GetTempFileNameWrapper( |
128 | _In_ LPCTSTR lpPathName, |
129 | _In_ LPCTSTR lpPrefixString, |
130 | _In_ UINT uUnique, |
131 | SString& lpTempFileName |
132 | ); |
133 | |
134 | DWORD WINAPI GetTempPathWrapper( |
135 | SString& lpBuffer |
136 | ); |
137 | |
138 | DWORD WINAPI GetCurrentDirectoryWrapper( |
139 | SString& lpBuffer |
140 | ); |
141 | |
142 | DWORD |
143 | GetModuleFileNameWrapper( |
144 | _In_opt_ HMODULE hModule, |
145 | SString& buffer |
146 | ); |
147 | |
148 | DWORD WINAPI GetEnvironmentVariableWrapper( |
149 | _In_opt_ LPCTSTR lpName, |
150 | _Out_opt_ SString& lpBuffer |
151 | ); |
152 | |
153 | BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer); |
154 | |
155 | #endif //_WIN_PATH_APIS_WRAPPER_ |
156 | |
157 | |