diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-24 12:28:27 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-27 11:14:21 -0500 |
commit | eb53852d7ae6838e54525eb57df1d8ce8a722f9b (patch) | |
tree | 7fa05bd6df1bce2e20d87c5fbacc1c658dc000aa /src/libs/dutil/WixToolset.DUtil/inc/pathutil.h | |
parent | 6ee12a64cb75097a238e60d4fd0ea542e8312214 (diff) | |
download | wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.tar.gz wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.tar.bz2 wix-eb53852d7ae6838e54525eb57df1d8ce8a722f9b.zip |
Add longPathAware to Burn manifest to support long paths.
Fixes 3455
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/pathutil.h')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/pathutil.h | 67 |
1 files changed, 59 insertions, 8 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h b/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h index 971ef887..de46b95d 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/pathutil.h | |||
@@ -159,19 +159,31 @@ DAPI_(HRESULT) PathRelativeToModule( | |||
159 | /******************************************************************* | 159 | /******************************************************************* |
160 | PathCreateTempFile | 160 | PathCreateTempFile |
161 | 161 | ||
162 | Note: if wzDirectory is null, ::GetTempPath() will be used instead. | 162 | Note: if wzDirectory is null, ::GetTempPath2() will be used instead. |
163 | if wzFileNameTemplate is null, GetTempFileName() will be used instead. | 163 | if wzFileNameTemplate is null, GetTempFileName() will be used instead. |
164 | *******************************************************************/ | 164 | *******************************************************************/ |
165 | DAPI_(HRESULT) PathCreateTempFile( | 165 | DAPI_(HRESULT) PathCreateTempFile( |
166 | __in_opt LPCWSTR wzDirectory, | 166 | __in_opt LPCWSTR wzDirectory, |
167 | __in_opt __format_string LPCWSTR wzFileNameTemplate, | 167 | __in_opt __format_string LPCWSTR wzFileNameTemplate, |
168 | __in DWORD dwUniqueCount, | 168 | __in DWORD dwUniqueCount, |
169 | __in_z LPCWSTR wzPrefix, | ||
169 | __in DWORD dwFileAttributes, | 170 | __in DWORD dwFileAttributes, |
170 | __out_opt LPWSTR* psczTempFile, | 171 | __out_opt LPWSTR* psczTempFile, |
171 | __out_opt HANDLE* phTempFile | 172 | __out_opt HANDLE* phTempFile |
172 | ); | 173 | ); |
173 | 174 | ||
174 | /******************************************************************* | 175 | /******************************************************************* |
176 | PathGetTempFileName - wrapper around ::GetTempFileName. | ||
177 | If the wzPathName is too long, it will use its own algorithm. | ||
178 | *******************************************************************/ | ||
179 | DAPI_(HRESULT) PathGetTempFileName( | ||
180 | __in LPCWSTR wzPathName, | ||
181 | __in LPCWSTR wzPrefixString, | ||
182 | __in UINT uUnique, | ||
183 | __out LPWSTR* psczTempFileName | ||
184 | ); | ||
185 | |||
186 | /******************************************************************* | ||
175 | PathCreateTimeBasedTempFile - creates an empty temp file based on current | 187 | PathCreateTimeBasedTempFile - creates an empty temp file based on current |
176 | system time | 188 | system time |
177 | ********************************************************************/ | 189 | ********************************************************************/ |
@@ -187,7 +199,7 @@ DAPI_(HRESULT) PathCreateTimeBasedTempFile( | |||
187 | /******************************************************************* | 199 | /******************************************************************* |
188 | PathCreateTempDirectory | 200 | PathCreateTempDirectory |
189 | 201 | ||
190 | Note: if wzDirectory is null, ::GetTempPath() will be used instead. | 202 | Note: if wzDirectory is null, ::GetTempPath2() will be used instead. |
191 | *******************************************************************/ | 203 | *******************************************************************/ |
192 | DAPI_(HRESULT) PathCreateTempDirectory( | 204 | DAPI_(HRESULT) PathCreateTempDirectory( |
193 | __in_opt LPCWSTR wzDirectory, | 205 | __in_opt LPCWSTR wzDirectory, |
@@ -201,7 +213,24 @@ DAPI_(HRESULT) PathCreateTempDirectory( | |||
201 | that is backslash terminated. | 213 | that is backslash terminated. |
202 | *******************************************************************/ | 214 | *******************************************************************/ |
203 | DAPI_(HRESULT) PathGetTempPath( | 215 | DAPI_(HRESULT) PathGetTempPath( |
204 | __out_z LPWSTR* psczTempPath | 216 | __out_z LPWSTR* psczTempPath, |
217 | __out_opt SIZE_T* pcch | ||
218 | ); | ||
219 | |||
220 | /******************************************************************* | ||
221 | PathGetSystemDirectory - returns the path to the system folder | ||
222 | that is backslash terminated. | ||
223 | *******************************************************************/ | ||
224 | DAPI_(HRESULT) PathGetSystemDirectory( | ||
225 | __out_z LPWSTR* psczSystemPath | ||
226 | ); | ||
227 | |||
228 | /******************************************************************* | ||
229 | PathGetSystemWow64Directory - returns the path to the system WoW 64 folder | ||
230 | that is backslash terminated. | ||
231 | *******************************************************************/ | ||
232 | DAPI_(HRESULT) PathGetSystemWow64Directory( | ||
233 | __out_z LPWSTR* psczSystemPath | ||
205 | ); | 234 | ); |
206 | 235 | ||
207 | /******************************************************************* | 236 | /******************************************************************* |
@@ -223,12 +252,11 @@ DAPI_(HRESULT) PathGetSystemTempPaths( | |||
223 | ); | 252 | ); |
224 | 253 | ||
225 | /******************************************************************* | 254 | /******************************************************************* |
226 | PathGetKnownFolder - returns the path to a well-known shell folder | 255 | PathGetVolumePathName - wrapper for ::GetVolumePathNameW. |
227 | |||
228 | *******************************************************************/ | 256 | *******************************************************************/ |
229 | DAPI_(HRESULT) PathGetKnownFolder( | 257 | DAPI_(HRESULT) PathGetVolumePathName( |
230 | __in int csidl, | 258 | __in_z LPCWSTR wzFileName, |
231 | __out LPWSTR* psczKnownFolder | 259 | __out_z LPWSTR* psczVolumePathName |
232 | ); | 260 | ); |
233 | 261 | ||
234 | /******************************************************************* | 262 | /******************************************************************* |
@@ -340,6 +368,20 @@ DAPI_(HRESULT) PathGetHierarchyArray( | |||
340 | __inout LPUINT pcPathArray | 368 | __inout LPUINT pcPathArray |
341 | ); | 369 | ); |
342 | 370 | ||
371 | /******************************************************************** | ||
372 | Path2FunctionAllowFallback - allow functions only available in newer versions of Windows. | ||
373 | Typically used for unit testing. | ||
374 | |||
375 | *********************************************************************/ | ||
376 | void DAPI Path2FunctionAllowFallback(); | ||
377 | |||
378 | /******************************************************************** | ||
379 | Path2FunctionForceFallback - ignore functions only available in newer versions of Windows. | ||
380 | Typically used for unit testing. | ||
381 | |||
382 | *********************************************************************/ | ||
383 | void DAPI Path2FunctionForceFallback(); | ||
384 | |||
343 | /******************************************************************* | 385 | /******************************************************************* |
344 | PathCanonicalizePath - wrapper around PathCanonicalizeW. | 386 | PathCanonicalizePath - wrapper around PathCanonicalizeW. |
345 | *******************************************************************/ | 387 | *******************************************************************/ |
@@ -349,6 +391,15 @@ DAPI_(HRESULT) PathCanonicalizePath( | |||
349 | ); | 391 | ); |
350 | 392 | ||
351 | /******************************************************************* | 393 | /******************************************************************* |
394 | PathAllocCanonicalizePath - wrapper around PathAllocCanonicalize. | ||
395 | *******************************************************************/ | ||
396 | DAPI_(HRESULT) PathAllocCanonicalizePath( | ||
397 | __in_z LPCWSTR wzPath, | ||
398 | __in DWORD dwFlags, | ||
399 | __deref_out_z LPWSTR* psczCanonicalized | ||
400 | ); | ||
401 | |||
402 | /******************************************************************* | ||
352 | PathCanonicalizeForComparison - canonicalizes the path based on the given flags. | 403 | PathCanonicalizeForComparison - canonicalizes the path based on the given flags. |
353 | . and .. directories are collapsed. | 404 | . and .. directories are collapsed. |
354 | All / are replaced with \. | 405 | All / are replaced with \. |