ReactOS 0.4.15-dev-7693-gd0e2924
atlpath.h
Go to the documentation of this file.
1// PROJECT: ReactOS ATL CPathT
2// LICENSE: Public Domain
3// PURPOSE: Provides compatibility to Microsoft ATL
4// PROGRAMMERS: Benedikt Freisen
5
6#ifndef __ATLPATH_H__
7#define __ATLPATH_H__
8
9#pragma once
10
11#include <atlcore.h>
12#include <atlstr.h>
13#include <shlwapi.h>
14
15namespace ATL
16{
17
18template<typename StringType>
19class CPathT
20{
21 // const
22 inline BOOL PathFileExistsX(LPCSTR pszPath) const { return PathFileExistsA(pszPath); }
23 inline BOOL PathFileExistsX(LPCWSTR pszPath) const { return PathFileExistsW(pszPath); }
24 inline LPCSTR PathFindExtensionX(LPCSTR pszPath) const { return PathFindExtensionA(pszPath); }
25 inline LPCWSTR PathFindExtensionX(LPCWSTR pszPath) const { return PathFindExtensionW(pszPath); }
26 inline LPCSTR PathFindFileNameX(LPCSTR pszPath) const { return PathFindFileNameA(pszPath); }
27 inline LPCWSTR PathFindFileNameX(LPCWSTR pszPath) const { return PathFindFileNameW(pszPath); }
28 inline int PathGetDriveNumberX(LPCSTR pszPath) const { return PathGetDriveNumberA(pszPath); }
29 inline int PathGetDriveNumberX(LPCWSTR pszPath) const { return PathGetDriveNumberW(pszPath); }
30 inline BOOL PathIsDirectoryX(LPCSTR pszPath) const { return PathIsDirectoryA(pszPath); }
31 inline BOOL PathIsDirectoryX(LPCWSTR pszPath) const { return PathIsDirectoryW(pszPath); }
32 inline BOOL PathIsFileSpecX(LPCSTR pszPath) const { return PathIsFileSpecA(pszPath); }
33 inline BOOL PathIsFileSpecX(LPCWSTR pszPath) const { return PathIsFileSpecW(pszPath); }
34 inline BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix) { return PathIsPrefixA(pszPath, pszPrefix); }
35 inline BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix) { return PathIsPrefixW(pszPath, pszPrefix); }
36 inline BOOL PathIsRelativeX(LPCSTR pszPath) const { return PathIsRelativeA(pszPath); }
37 inline BOOL PathIsRelativeX(LPCWSTR pszPath) const { return PathIsRelativeW(pszPath); }
38 inline BOOL PathIsRootX(LPCSTR pszPath) const { return PathIsRootA(pszPath); }
39 inline BOOL PathIsRootX(LPCWSTR pszPath) const { return PathIsRootW(pszPath); }
40 inline BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther) const { return PathIsSameRootA(pszPath, pszOther); }
41 inline BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther) const { return PathIsSameRootW(pszPath, pszOther); }
42 inline BOOL PathIsUNCX(LPCSTR pszPath) { return PathIsUNCA(pszPath); }
43 inline BOOL PathIsUNCX(LPCWSTR pszPath) { return PathIsUNCW(pszPath); }
44 inline BOOL PathIsUNCServerX(LPCSTR pszPath) { return PathIsUNCServerA(pszPath); }
45 inline BOOL PathIsUNCServerX(LPCWSTR pszPath) { return PathIsUNCServerW(pszPath); }
46 inline BOOL PathIsUNCServerShareX(LPCSTR pszPath) { return PathIsUNCServerShareA(pszPath); }
47 inline BOOL PathIsUNCServerShareX(LPCWSTR pszPath) { return PathIsUNCServerShareW(pszPath); }
48 inline BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec) const { return PathMatchSpecA(pszPath, pszSpec); }
49 inline BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec) const { return PathMatchSpecW(pszPath, pszSpec); }
50 inline LPCSTR PathSkipRootX(LPCSTR pszPath) const { return PathSkipRootA(pszPath); }
51 inline LPCWSTR PathSkipRootX(LPCWSTR pszPath) const { return PathSkipRootW(pszPath); }
52
53 // non-const
54 inline void PathAddBackslashX(LPSTR pszPath) { PathAddBackslashA(pszPath); }
55 inline void PathAddBackslashX(LPWSTR pszPath) { PathAddBackslashW(pszPath); }
56 inline BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathAddExtensionA(pszPath, pszExt); }
57 inline BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathAddExtensionW(pszPath, pszExt); }
58 inline BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore) { return PathAppendA(pszPath, pszMore); }
59 inline BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore) { return PathAppendW(pszPath, pszMore); }
60 inline void PathBuildRootX(LPSTR pszRoot, int iDrive) { PathBuildRootA(pszRoot, iDrive); }
61 inline void PathBuildRootX(LPWSTR pszRoot, int iDrive) { PathBuildRootW(pszRoot, iDrive); }
62 inline void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc) { PathCanonicalizeA(pszDst, pszSrc); }
63 inline void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc) { PathCanonicalizeW(pszDst, pszSrc); }
64 inline void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore) { PathCombineA(pszPathOut, pszPathIn, pszMore); }
65 inline void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore) { PathCombineW(pszPathOut, pszPathIn, pszMore); }
66 inline CPathT<StringType> PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath) { return PathCommonPrefixA(pszFile1, pszFile2, pszPath); }
67 inline CPathT<StringType> PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath) { return PathCommonPrefixW(pszFile1, pszFile2, pszPath); }
68 inline BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx) { return PathCompactPathA(hDC, pszPath, dx); }
69 inline BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx) { return PathCompactPathW(hDC, pszPath, dx); }
70 inline BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExA(pszOut, pszSrc, cchMax, dwFlags); }
71 inline BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExW(pszOut, pszSrc, cchMax, dwFlags); }
72 inline BOOL PathMakePrettyX(LPSTR pszPath) { return PathMakePrettyA(pszPath); }
73 inline BOOL PathMakePrettyX(LPWSTR pszPath) { return PathMakePrettyW(pszPath); }
74 inline void PathQuoteSpacesX(LPSTR pszPath) { PathQuoteSpacesA(pszPath); }
75 inline void PathQuoteSpacesX(LPWSTR pszPath) { PathQuoteSpacesW(pszPath); }
76 inline BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToA(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
77 inline BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToW(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
78 inline void PathRemoveArgsX(LPSTR pszPath) { PathRemoveArgsA(pszPath); }
79 inline void PathRemoveArgsX(LPWSTR pszPath) { PathRemoveArgsW(pszPath); }
80 inline void PathRemoveBackslashX(LPSTR pszPath) { PathRemoveBackslashA(pszPath); }
81 inline void PathRemoveBackslashX(LPWSTR pszPath) { PathRemoveBackslashW(pszPath); }
82 inline void PathRemoveBlanksX(LPSTR pszPath) { PathRemoveBlanksA(pszPath); }
83 inline void PathRemoveBlanksX(LPWSTR pszPath) { PathRemoveBlanksW(pszPath); }
84 inline void PathRemoveExtensionX(LPSTR pszPath) { PathRemoveExtensionA(pszPath); }
85 inline void PathRemoveExtensionX(LPWSTR pszPath) { PathRemoveExtensionW(pszPath); }
86 inline BOOL PathRemoveFileSpecX(LPSTR pszPath) { return PathRemoveFileSpecA(pszPath); }
87 inline BOOL PathRemoveFileSpecX(LPWSTR pszPath) { return PathRemoveFileSpecW(pszPath); }
88 inline BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathRenameExtensionA(pszPath, pszExt); }
89 inline BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathRenameExtensionW(pszPath, pszExt); }
90 inline void PathStripPathX(LPSTR pszPath) { PathStripPathA(pszPath); }
91 inline void PathStripPathX(LPWSTR pszPath) { PathStripPathW(pszPath); }
92 inline BOOL PathStripToRootX(LPSTR pszPath) { return PathStripToRootA(pszPath); }
93 inline BOOL PathStripToRootX(LPWSTR pszPath) { return PathStripToRootW(pszPath); }
94 inline void PathUnquoteSpacesX(LPSTR pszPath) { PathUnquoteSpacesA(pszPath); }
95 inline void PathUnquoteSpacesX(LPWSTR pszPath) { PathUnquoteSpacesW(pszPath); }
96
97public:
98 typedef typename StringType::PCXSTR PCXSTR;
99 typedef typename StringType::PXSTR PXSTR;
100 typedef typename StringType::XCHAR XCHAR;
101
102 StringType m_strPath;
103
104 CPathT(PCXSTR pszPath)
105 {
106 m_strPath = StringType(pszPath);
107 }
108
110 {
111 m_strPath = path.m_strPath;
112 }
113
114 CPathT() noexcept
115 {
116 // do nothing, m_strPath initializes itself
117 }
118
120 {
121 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
123 m_strPath.ReleaseBuffer();
124 }
125
127 {
128 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
129 BOOL result = PathAddExtensionX(str, pszExtension);
130 m_strPath.ReleaseBuffer();
131 return result;
132 }
133
135 {
136 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
137 BOOL result = PathAppendX(str, pszMore);
138 m_strPath.ReleaseBuffer();
139 return result;
140 }
141
142 void BuildRoot(int iDrive)
143 {
144 PXSTR str = m_strPath.GetBuffer(4);
145 PathBuildRootX(str, iDrive);
146 m_strPath.ReleaseBuffer();
147 }
148
150 {
151 StringType strTemp;
152 PXSTR str = strTemp.GetBuffer(MAX_PATH);
154 strTemp.ReleaseBuffer();
155 m_strPath = strTemp;
156 }
157
159 {
160 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
161 PathCombineX(str, pszDir, pszFile);
162 m_strPath.ReleaseBuffer();
163 }
164
166 {
167 StringType result;
168 result.SetString(m_strPath, PathCommonPrefixX(m_strPath, pszOther, NULL));
169 return result;
170 }
171
173 {
174 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
175 BOOL result = PathCompactPathX(hDC, str, nWidth);
176 m_strPath.ReleaseBuffer();
177 return result;
178 }
179
181 {
182 StringType strTemp;
183 PXSTR str = strTemp.GetBuffer(nMaxChars);
185 strTemp.ReleaseBuffer();
186 m_strPath = strTemp;
187 return result;
188 }
189
191 {
193 }
194
195 int FindExtension() const
196 {
198 if (*extension == '\0')
199 return -1;
200
202 return (int)(extension - str);
203 }
204
205 int FindFileName() const
206 {
208 if (*filename == '\0')
209 return -1;
210
212 return (int)(filename - str);
213 }
214
215 int GetDriveNumber() const
216 {
218 }
219
220 StringType GetExtension() const
221 {
222 return StringType(PathFindExtensionX(m_strPath));
223 }
224
226 {
228 }
229
231 {
233 }
234
235 BOOL IsPrefix(PCXSTR pszPrefix) const
236 {
237 return PathIsPrefixX(m_strPath);
238 }
239
241 {
243 }
244
245 BOOL IsRoot() const
246 {
247 return PathIsRootX(m_strPath);
248 }
249
250 BOOL IsSameRoot(PCXSTR pszOther) const
251 {
252 return PathIsSameRootX(m_strPath, pszOther);
253 }
254
255 BOOL IsUNC() const
256 {
257 return PathIsUNCX(m_strPath);
258 }
259
261 {
263 }
264
266 {
268 }
269
271 {
272 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
274 m_strPath.ReleaseBuffer();
275 return result;
276 }
277
278 BOOL MatchSpec(PCXSTR pszSpec) const
279 {
280 return PathMatchSpecX(m_strPath, pszSpec);
281 }
282
284 {
285 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
287 m_strPath.ReleaseBuffer();
288 }
289
290 BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
291 {
292 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
293 BOOL result = PathRelativePathToX(str, pszFrom, dwAttrFrom, pszTo, dwAttrTo);
294 m_strPath.ReleaseBuffer();
295 return result;
296 }
297
299 {
300 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
302 m_strPath.ReleaseBuffer();
303 }
304
306 {
307 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
309 m_strPath.ReleaseBuffer();
310 }
311
313 {
314 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
316 m_strPath.ReleaseBuffer();
317 }
318
320 {
321 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
323 m_strPath.ReleaseBuffer();
324 }
325
327 {
328 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
330 m_strPath.ReleaseBuffer();
331 return result;
332 }
333
335 {
336 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
337 BOOL result = PathRenameExtensionX(str, pszExtension);
338 m_strPath.ReleaseBuffer();
339 return result;
340 }
341
342 int SkipRoot() const
343 {
345 return (int)(PathSkipRootX(m_strPath) - str);
346 }
347
349 {
350 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
352 m_strPath.ReleaseBuffer();
353 }
354
356 {
357 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
359 m_strPath.ReleaseBuffer();
360 return result;
361 }
362
364 {
365 PXSTR str = m_strPath.GetBuffer(MAX_PATH);
367 m_strPath.ReleaseBuffer();
368 }
369
370 operator const StringType&() const noexcept
371 {
372 return m_strPath;
373 }
374
375 operator PCXSTR() const noexcept
376 {
377 return m_strPath;
378 }
379
380 operator StringType&() noexcept
381 {
382 return m_strPath;
383 }
384
386 {
387 Append(pszMore);
388 return *this;
389 }
390
391};
392
396
397} // namespace ATL
398
399#endif
static HDC hDC
Definition: 3dtext.c:33
UINT cchMax
StringType GetExtension() const
Definition: atlpath.h:220
BOOL IsRelative() const
Definition: atlpath.h:240
void AddBackslash()
Definition: atlpath.h:119
BOOL PathIsUNCX(LPCWSTR pszPath)
Definition: atlpath.h:43
void Canonicalize()
Definition: atlpath.h:149
BOOL IsRoot() const
Definition: atlpath.h:245
BOOL PathMakePrettyX(LPWSTR pszPath)
Definition: atlpath.h:73
void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc)
Definition: atlpath.h:63
void PathStripPathX(LPSTR pszPath)
Definition: atlpath.h:90
int GetDriveNumber() const
Definition: atlpath.h:215
void PathRemoveArgsX(LPWSTR pszPath)
Definition: atlpath.h:79
BOOL AddExtension(PCXSTR pszExtension)
Definition: atlpath.h:126
void RemoveBlanks()
Definition: atlpath.h:312
BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:88
BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther) const
Definition: atlpath.h:41
void Combine(PCXSTR pszDir, PCXSTR pszFile)
Definition: atlpath.h:158
BOOL IsUNCServerShare() const
Definition: atlpath.h:265
CPathT< StringType > CommonPrefix(PCXSTR pszOther)
Definition: atlpath.h:165
void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore)
Definition: atlpath.h:65
LPCWSTR PathFindExtensionX(LPCWSTR pszPath) const
Definition: atlpath.h:25
BOOL CompactPath(HDC hDC, UINT nWidth)
Definition: atlpath.h:172
BOOL PathIsUNCServerShareX(LPCSTR pszPath)
Definition: atlpath.h:46
void PathQuoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:74
int SkipRoot() const
Definition: atlpath.h:342
BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:76
int FindFileName() const
Definition: atlpath.h:205
void UnquoteSpaces()
Definition: atlpath.h:363
BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix)
Definition: atlpath.h:35
BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx)
Definition: atlpath.h:68
LPCSTR PathSkipRootX(LPCSTR pszPath) const
Definition: atlpath.h:50
void BuildRoot(int iDrive)
Definition: atlpath.h:142
BOOL RenameExtension(PCXSTR pszExtension)
Definition: atlpath.h:334
BOOL PathIsDirectoryX(LPCSTR pszPath) const
Definition: atlpath.h:30
BOOL PathStripToRootX(LPSTR pszPath)
Definition: atlpath.h:92
BOOL PathIsUNCServerX(LPCWSTR pszPath)
Definition: atlpath.h:45
BOOL Append(PCXSTR pszMore)
Definition: atlpath.h:134
LPCWSTR PathSkipRootX(LPCWSTR pszPath) const
Definition: atlpath.h:51
void QuoteSpaces()
Definition: atlpath.h:283
void PathAddBackslashX(LPSTR pszPath)
Definition: atlpath.h:54
StringType m_strPath
Definition: atlpath.h:102
BOOL PathStripToRootX(LPWSTR pszPath)
Definition: atlpath.h:93
BOOL FileExists() const
Definition: atlpath.h:190
BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec) const
Definition: atlpath.h:49
void PathBuildRootX(LPWSTR pszRoot, int iDrive)
Definition: atlpath.h:61
void PathRemoveExtensionX(LPWSTR pszPath)
Definition: atlpath.h:85
BOOL PathIsRootX(LPCWSTR pszPath) const
Definition: atlpath.h:39
BOOL MakePretty()
Definition: atlpath.h:270
StringType::XCHAR XCHAR
Definition: atlpath.h:100
BOOL PathIsUNCServerShareX(LPCWSTR pszPath)
Definition: atlpath.h:47
CPathT(PCXSTR pszPath)
Definition: atlpath.h:104
BOOL PathIsRootX(LPCSTR pszPath) const
Definition: atlpath.h:38
BOOL CompactPathEx(UINT nMaxChars, DWORD dwFlags=0)
Definition: atlpath.h:180
BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:57
void RemoveArgs()
Definition: atlpath.h:298
BOOL PathRemoveFileSpecX(LPWSTR pszPath)
Definition: atlpath.h:87
BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec) const
Definition: atlpath.h:48
void StripPath()
Definition: atlpath.h:348
BOOL PathFileExistsX(LPCSTR pszPath) const
Definition: atlpath.h:22
void PathStripPathX(LPWSTR pszPath)
Definition: atlpath.h:91
BOOL IsUNCServer() const
Definition: atlpath.h:260
BOOL MatchSpec(PCXSTR pszSpec) const
Definition: atlpath.h:278
BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix)
Definition: atlpath.h:34
BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:77
BOOL IsFileSpec() const
Definition: atlpath.h:230
BOOL StripToRoot()
Definition: atlpath.h:355
int PathGetDriveNumberX(LPCSTR pszPath) const
Definition: atlpath.h:28
void PathBuildRootX(LPSTR pszRoot, int iDrive)
Definition: atlpath.h:60
BOOL PathIsRelativeX(LPCSTR pszPath) const
Definition: atlpath.h:36
BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:71
void PathRemoveBackslashX(LPWSTR pszPath)
Definition: atlpath.h:81
BOOL PathMakePrettyX(LPSTR pszPath)
Definition: atlpath.h:72
BOOL PathIsFileSpecX(LPCWSTR pszPath) const
Definition: atlpath.h:33
void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc)
Definition: atlpath.h:62
StringType::PXSTR PXSTR
Definition: atlpath.h:99
LPCSTR PathFindFileNameX(LPCSTR pszPath) const
Definition: atlpath.h:26
void PathRemoveBackslashX(LPSTR pszPath)
Definition: atlpath.h:80
BOOL PathIsUNCX(LPCSTR pszPath)
Definition: atlpath.h:42
void PathUnquoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:95
BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:70
BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:56
LPCSTR PathFindExtensionX(LPCSTR pszPath) const
Definition: atlpath.h:24
void PathUnquoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:94
BOOL PathIsRelativeX(LPCWSTR pszPath) const
Definition: atlpath.h:37
void PathQuoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:75
BOOL IsPrefix(PCXSTR pszPrefix) const
Definition: atlpath.h:235
BOOL IsUNC() const
Definition: atlpath.h:255
BOOL PathIsFileSpecX(LPCSTR pszPath) const
Definition: atlpath.h:32
int PathGetDriveNumberX(LPCWSTR pszPath) const
Definition: atlpath.h:29
BOOL IsDirectory() const
Definition: atlpath.h:225
CPathT(const CPathT< StringType > &path)
Definition: atlpath.h:109
BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:290
BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:89
BOOL PathRemoveFileSpecX(LPSTR pszPath)
Definition: atlpath.h:86
BOOL PathFileExistsX(LPCWSTR pszPath) const
Definition: atlpath.h:23
int FindExtension() const
Definition: atlpath.h:195
StringType::PCXSTR PCXSTR
Definition: atlpath.h:98
void PathAddBackslashX(LPWSTR pszPath)
Definition: atlpath.h:55
CPathT() noexcept
Definition: atlpath.h:114
void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore)
Definition: atlpath.h:64
BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore)
Definition: atlpath.h:59
void RemoveBackslash()
Definition: atlpath.h:305
void PathRemoveBlanksX(LPSTR pszPath)
Definition: atlpath.h:82
BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore)
Definition: atlpath.h:58
void PathRemoveArgsX(LPSTR pszPath)
Definition: atlpath.h:78
void RemoveExtension()
Definition: atlpath.h:319
BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx)
Definition: atlpath.h:69
CPathT< StringType > PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath)
Definition: atlpath.h:66
BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther) const
Definition: atlpath.h:40
void PathRemoveBlanksX(LPWSTR pszPath)
Definition: atlpath.h:83
BOOL IsSameRoot(PCXSTR pszOther) const
Definition: atlpath.h:250
BOOL PathIsUNCServerX(LPCSTR pszPath)
Definition: atlpath.h:44
CPathT< StringType > & operator+=(PCXSTR pszMore)
Definition: atlpath.h:385
BOOL PathIsDirectoryX(LPCWSTR pszPath) const
Definition: atlpath.h:31
void PathRemoveExtensionX(LPSTR pszPath)
Definition: atlpath.h:84
CPathT< StringType > PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath)
Definition: atlpath.h:67
LPCWSTR PathFindFileNameX(LPCWSTR pszPath) const
Definition: atlpath.h:27
BOOL RemoveFileSpec()
Definition: atlpath.h:326
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
void WINAPI PathStripPathW(LPWSTR lpszPath)
Definition: path.c:694
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
Definition: path.c:779
void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
Definition: path.c:806
VOID WINAPI PathUnquoteSpacesA(LPSTR lpszPath)
Definition: path.c:1012
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
Definition: path.c:2243
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
Definition: path.c:1698
void WINAPI PathStripPathA(LPSTR lpszPath)
Definition: path.c:677
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
Definition: path.c:373
VOID WINAPI PathQuoteSpacesA(LPSTR lpszPath)
Definition: path.c:955
BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFrom, LPCSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3546
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
Definition: path.c:329
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:553
LPWSTR WINAPI PathSkipRootW(LPCWSTR lpszPath)
Definition: path.c:3278
BOOL WINAPI PathIsPrefixA(LPCSTR lpszPrefix, LPCSTR lpszPath)
Definition: path.c:2162
int WINAPI PathCommonPrefixW(LPCWSTR lpszFile1, LPCWSTR lpszFile2, LPWSTR achPath)
Definition: path.c:2806
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
void WINAPI PathRemoveArgsA(LPSTR lpszPath)
Definition: path.c:756
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1435
VOID WINAPI PathRemoveBlanksA(LPSTR lpszPath)
Definition: path.c:894
BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1460
BOOL WINAPI PathIsRelativeA(LPCSTR lpszPath)
Definition: path.c:1563
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
Definition: path.c:538
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
Definition: path.c:586
BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
Definition: path.c:2323
BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrFrom, LPCWSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3572
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
Definition: path.c:733
BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
Definition: path.c:2700
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
Definition: path.c:2870
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
Definition: path.c:823
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
Definition: path.c:1964
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
Definition: path.c:348
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
Definition: path.c:1755
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
Definition: path.c:1642
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
Definition: path.c:1602
VOID WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
Definition: path.c:978
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1777
BOOL WINAPI PathIsUNCServerA(LPCSTR lpszPath)
Definition: path.c:2301
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
Definition: path.c:1034
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
Definition: path.c:2891
BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
Definition: path.c:1935
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2266
BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
Definition: path.c:2024
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
Definition: path.c:2668
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:422
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2378
BOOL WINAPI PathIsFileSpecA(LPCSTR lpszPath)
Definition: path.c:2112
BOOL WINAPI PathIsUNCServerShareA(LPCSTR lpszPath)
Definition: path.c:2351
BOOL WINAPI PathStripToRootA(LPSTR lpszPath)
Definition: path.c:716
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
Definition: path.c:2133
int WINAPI PathCommonPrefixA(LPCSTR lpszFile1, LPCSTR lpszFile2, LPSTR achPath)
Definition: path.c:2751
LPSTR WINAPI PathSkipRootA(LPCSTR lpszPath)
Definition: path.c:3247
BOOL WINAPI PathIsPrefixW(LPCWSTR lpszPrefix, LPCWSTR lpszPath)
Definition: path.c:2177
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
Definition: path.c:867
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1723
VOID WINAPI PathRemoveBlanksW(LPWSTR lpszPath)
Definition: path.c:920
BOOL WINAPI PathIsSameRootA(LPCSTR lpszPath1, LPCSTR lpszPath2)
Definition: path.c:2003
LPSTR WINAPI PathRemoveBackslashA(LPSTR lpszPath)
Definition: path.c:847
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
Definition: path.c:1579
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint64EXT * result
Definition: glext.h:11304
const char * filename
Definition: ioapi.h:137
GLint dx
Definition: linetemp.h:97
static HDC
Definition: imagelist.c:92
Definition: rosdlgs.h:6
CPathT< CStringA > CPathA
Definition: atlpath.h:394
CPathT< CStringW > CPathW
Definition: atlpath.h:395
CPathT< CString > CPath
Definition: atlpath.h:393
unsigned int UINT
Definition: ndis.h:50
#define PathAddExtensionA
Definition: pathcch.h:304
#define PathCanonicalizeA
Definition: pathcch.h:312
#define PathAddExtensionW
Definition: pathcch.h:305
#define PathCombineA
Definition: pathcch.h:316
#define PathAppendA
Definition: pathcch.h:308
#define PathCanonicalizeW
Definition: pathcch.h:313
#define PathAddBackslashA
Definition: pathcch.h:300
#define PathCombineW
Definition: pathcch.h:317
#define PathRenameExtensionA
Definition: pathcch.h:320
#define PathRenameExtensionW
Definition: pathcch.h:321
#define PathAddBackslashW
Definition: pathcch.h:301
#define PathAppendW
Definition: pathcch.h:309
const WCHAR * str
_In_ LPCSTR pszDir
Definition: shellapi.h:581
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define const
Definition: zconf.h:233