ReactOS  0.4.15-dev-1201-gb2cf5a4
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 // WARNING: Untested code
10 
11 #pragma once
12 
13 #include <atlcore.h>
14 #include <atlstr.h>
15 #include <shlwapi.h>
16 
17 namespace ATL
18 {
19 
20 template<typename StringType>
21 class CPathT
22 {
23  // const
24  inline BOOL PathFileExistsX(LPCSTR pszPath) { return PathFileExistsA(pszPath); }
25  inline BOOL PathFileExistsX(LPCWSTR pszPath) { return PathFileExistsW(pszPath); }
26  inline int PathFindExtensionX(LPCSTR pszPath) { return PathFindExtensionA(pszPath); }
27  inline int PathFindExtensionX(LPCWSTR pszPath) { return PathFindExtensionW(pszPath); }
28  inline int PathFindFileNameX(LPCSTR pszPath) { return PathFindFileNameA(pszPath); }
29  inline int PathFindFileNameX(LPCWSTR pszPath) { return PathFindFileNameW(pszPath); }
30  inline int PathGetDriveNumberX(LPCSTR pszPath) { return PathGetDriveNumberA(pszPath); }
31  inline int PathGetDriveNumberX(LPCWSTR pszPath) { return PathGetDriveNumberW(pszPath); }
32  inline BOOL PathIsDirectoryX(LPCSTR pszPath) { return PathIsDirectoryA(pszPath); }
33  inline BOOL PathIsDirectoryX(LPCWSTR pszPath) { return PathIsDirectoryW(pszPath); }
34  inline BOOL PathIsFileSpecX(LPCSTR pszPath) { return PathIsFileSpecA(pszPath); }
35  inline BOOL PathIsFileSpecX(LPCWSTR pszPath) { return PathIsFileSpecW(pszPath); }
36  inline BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix) { return PathIsPrefixA(pszPath, pszPrefix); }
37  inline BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix) { return PathIsPrefixW(pszPath, pszPrefix); }
38  inline BOOL PathIsRelativeX(LPCSTR pszPath) { return PathIsRelativeA(pszPath); }
39  inline BOOL PathIsRelativeX(LPCWSTR pszPath) { return PathIsRelativeW(pszPath); }
40  inline BOOL PathIsRootX(LPCSTR pszPath) { return PathIsRootA(pszPath); }
41  inline BOOL PathIsRootX(LPCWSTR pszPath) { return PathIsRootW(pszPath); }
42  inline BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther) { return PathIsSameRootA(pszPath, pszOther); }
43  inline BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther) { return PathIsSameRootW(pszPath, pszOther); }
44  inline BOOL PathIsUNCX(LPCSTR pszPath) { return PathIsUNCA(pszPath); }
45  inline BOOL PathIsUNCX(LPCWSTR pszPath) { return PathIsUNCW(pszPath); }
46  inline BOOL PathIsUNCServerX(LPCSTR pszPath) { return PathIsUNCServerA(pszPath); }
47  inline BOOL PathIsUNCServerX(LPCWSTR pszPath) { return PathIsUNCServerW(pszPath); }
48  inline BOOL PathIsUNCServerShareX(LPCSTR pszPath) { return PathIsUNCServerShareA(pszPath); }
49  inline BOOL PathIsUNCServerShareX(LPCWSTR pszPath) { return PathIsUNCServerShareW(pszPath); }
50  inline BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec) { return PathMatchSpecA(pszPath, pszSpec); }
51  inline BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec) { return PathMatchSpecW(pszPath, pszSpec); }
52  inline int PathSkipRootX(LPCSTR pszPath) { return PathSkipRootA(pszPath); }
53  inline int PathSkipRootX(LPCWSTR pszPath) { return PathSkipRootW(pszPath); }
54 
55  // non-const
56  inline void PathAddBackslashX(LPSTR pszPath) { PathAddBackslashA(pszPath); }
57  inline void PathAddBackslashX(LPWSTR pszPath) { PathAddBackslashW(pszPath); }
58  inline BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathAddExtensionA(pszPath, pszExt); }
59  inline BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathAddExtensionW(pszPath, pszExt); }
60  inline BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore) { return PathAppendA(pszPath, pszMore); }
61  inline BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore) { return PathAppendW(pszPath, pszMore); }
62  inline void PathBuildRootX(LPSTR pszRoot, int iDrive) { PathBuildRootA(pszRoot, iDrive); }
63  inline void PathBuildRootX(LPWSTR pszRoot, int iDrive) { PathBuildRootW(pszRoot, iDrive); }
64  inline void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc) { PathCanonicalizeA(pszDst, pszSrc); }
65  inline void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc) { PathCanonicalizeW(pszDst, pszSrc); }
66  inline void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore) { PathCombineA(pszPathOut, pszPathIn, pszMore); }
67  inline void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore) { PathCombineW(pszPathOut, pszPathIn, pszMore); }
68  inline CPathT<StringType> PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath) { return PathCommonPrefixA(pszFile1, pszFile2, pszPath); }
69  inline CPathT<StringType> PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath) { return PathCommonPrefixW(pszFile1, pszFile2, pszPath); }
70  inline BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx) { return PathCompactPathA(hDC, pszPath, dx); }
71  inline BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx) { return PathCompactPathW(hDC, pszPath, dx); }
72  inline BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExA(pszOut, pszSrc, cchMax, dwFlags); }
73  inline BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags) { return PathCompactPathExW(pszOut, pszSrc, cchMax, dwFlags); }
74  inline BOOL PathMakePrettyX(LPSTR pszPath) { return PathMakePrettyA(pszPath); }
75  inline BOOL PathMakePrettyX(LPWSTR pszPath) { return PathMakePrettyW(pszPath); }
76  inline void PathQuoteSpacesX(LPSTR pszPath) { PathQuoteSpacesA(pszPath); }
77  inline void PathQuoteSpacesX(LPWSTR pszPath) { PathQuoteSpacesW(pszPath); }
78  inline BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToA(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
79  inline BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo) { return PathRelativePathToW(pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo); }
80  inline void PathRemoveArgsX(LPSTR pszPath) { PathRemoveArgsA(pszPath); }
81  inline void PathRemoveArgsX(LPWSTR pszPath) { PathRemoveArgsW(pszPath); }
82  inline void PathRemoveBackslashX(LPSTR pszPath) { PathRemoveBackslashA(pszPath); }
83  inline void PathRemoveBackslashX(LPWSTR pszPath) { PathRemoveBackslashW(pszPath); }
84  inline void PathRemoveBlanksX(LPSTR pszPath) { PathRemoveBlanksA(pszPath); }
85  inline void PathRemoveBlanksX(LPWSTR pszPath) { PathRemoveBlanksW(pszPath); }
86  inline void PathRemoveExtensionX(LPSTR pszPath) { PathRemoveExtensionA(pszPath); }
87  inline void PathRemoveExtensionX(LPWSTR pszPath) { PathRemoveExtensionW(pszPath); }
88  inline BOOL PathRemoveFileSpecX(LPSTR pszPath) { return PathRemoveFileSpecA(pszPath); }
89  inline BOOL PathRemoveFileSpecX(LPWSTR pszPath) { return PathRemoveFileSpecW(pszPath); }
90  inline BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt) { return PathRenameExtensionA(pszPath, pszExt); }
91  inline BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt) { return PathRenameExtensionW(pszPath, pszExt); }
92  inline void PathStripPathX(LPSTR pszPath) { PathStripPathA(pszPath); }
93  inline void PathStripPathX(LPWSTR pszPath) { PathStripPathW(pszPath); }
94  inline BOOL PathStripToRootX(LPSTR pszPath) { return PathStripToRootA(pszPath); }
95  inline BOOL PathStripToRootX(LPWSTR pszPath) { return PathStripToRootW(pszPath); }
96  inline void PathUnquoteSpacesX(LPSTR pszPath) { PathUnquoteSpacesA(pszPath); }
97  inline void PathUnquoteSpacesX(LPWSTR pszPath) { PathUnquoteSpacesW(pszPath); }
98 
99 public:
100  typedef typename StringType::PCXSTR PCXSTR;
101  typedef typename StringType::PXSTR PXSTR;
102  typedef typename StringType::XCHAR XCHAR;
103 
104  StringType m_strPath;
105 
106  CPathT(PCXSTR pszPath)
107  {
108  m_strPath = StringType(pszPath);
109  }
110 
112  {
113  m_strPath = path.m_strPath;
114  }
115 
116  CPathT() throw()
117  {
118  // do nothing, m_strPath initializes itself
119  }
120 
122  {
123  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
125  m_strPath.ReleaseBuffer();
126  }
127 
128  BOOL AddExtension(PCXSTR pszExtension)
129  {
130  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
131  BOOL result = PathAddExtensionX(str, pszExtension);
132  m_strPath.ReleaseBuffer();
133  return result;
134  }
135 
136  BOOL Append(PCXSTR pszMore)
137  {
138  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
139  BOOL result = PathAppendX(str, pszMore);
140  m_strPath.ReleaseBuffer();
141  return result;
142  }
143 
144  void BuildRoot(int iDrive)
145  {
146  PXSTR str = m_strPath.GetBuffer(4);
147  PathBuildRootX(str, iDrive);
148  m_strPath.ReleaseBuffer();
149  }
150 
152  {
153  StringType strTemp;
154  PXSTR str = strTemp.GetBuffer(MAX_PATH);
156  strTemp.ReleaseBuffer();
157  m_strPath = strTemp;
158  }
159 
160  void Combine(PCXSTR pszDir, PCXSTR pszFile)
161  {
162  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
163  PathCombineX(str, pszDir, pszFile);
164  m_strPath.ReleaseBuffer();
165  }
166 
168  {
169  StringType result;
170  result.SetString(m_strPath, PathCommonPrefixX(m_strPath, pszOther, NULL));
171  return result;
172  }
173 
175  {
176  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
177  BOOL result = PathCompactPathX(hDC, str, nWidth);
178  m_strPath.ReleaseBuffer();
179  return result;
180  }
181 
183  {
184  StringType strTemp;
185  PXSTR str = strTemp.GetBuffer(nMaxChars);
187  strTemp.ReleaseBuffer();
188  m_strPath = strTemp;
189  return result;
190  }
191 
192  BOOL FileExists() const
193  {
194  return PathFileExistsX(m_strPath);
195  }
196 
197  int FindExtension() const
198  {
200  }
201 
202  int FindFileName() const
203  {
205  }
206 
207  int GetDriveNumber() const
208  {
210  }
211 
212  StringType GetExtension() const
213  {
214  return StringType(PathFindExtensionX(m_strPath));
215  }
216 
218  {
219  return PathIsDirectoryX(m_strPath);
220  }
221 
222  BOOL IsFileSpec() const
223  {
224  return PathIsFileSpecX(m_strPath);
225  }
226 
227  BOOL IsPrefix(PCXSTR pszPrefix) const
228  {
229  return PathIsPrefixX(m_strPath);
230  }
231 
232  BOOL IsRelative() const
233  {
234  return PathIsRelativeX(m_strPath);
235  }
236 
237  BOOL IsRoot() const
238  {
239  return PathIsRootX(m_strPath);
240  }
241 
242  BOOL IsSameRoot(PCXSTR pszOther) const
243  {
244  return PathIsSameRootX(m_strPath, pszOther);
245  }
246 
247  BOOL IsUNC() const
248  {
249  return PathIsUNCX(m_strPath);
250  }
251 
253  {
254  return PathIsUNCServerX(m_strPath);
255  }
256 
258  {
260  }
261 
263  {
264  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
266  m_strPath.ReleaseBuffer();
267  return result;
268  }
269 
270  BOOL MatchSpec(PCXSTR pszSpec) const
271  {
272  return PathMatchSpecX(m_strPath, pszSpec);
273  }
274 
275  void QuoteSpaces()
276  {
277  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
279  m_strPath.ReleaseBuffer();
280  }
281 
282  BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
283  {
284  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
285  BOOL result = PathRelativePathToX(str, pszFrom, dwAttrFrom, pszTo, dwAttrTo);
286  m_strPath.ReleaseBuffer();
287  return result;
288  }
289 
290  void RemoveArgs()
291  {
292  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
294  m_strPath.ReleaseBuffer();
295  }
296 
298  {
299  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
301  m_strPath.ReleaseBuffer();
302  }
303 
305  {
306  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
308  m_strPath.ReleaseBuffer();
309  }
310 
312  {
313  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
315  m_strPath.ReleaseBuffer();
316  }
317 
319  {
320  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
322  m_strPath.ReleaseBuffer();
323  return result;
324  }
325 
327  {
328  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
329  BOOL result = PathRenameExtensionX(str, pszExtension);
330  m_strPath.ReleaseBuffer();
331  return result;
332  }
333 
334  int SkipRoot() const
335  {
336  return PathSkipRootX(m_strPath);
337  }
338 
339  void StripPath()
340  {
341  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
343  m_strPath.ReleaseBuffer();
344  }
345 
347  {
348  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
350  m_strPath.ReleaseBuffer();
351  return result;
352  }
353 
355  {
356  PXSTR str = m_strPath.GetBuffer(MAX_PATH);
358  m_strPath.ReleaseBuffer();
359  }
360 
361  operator const StringType&() const throw()
362  {
363  return m_strPath;
364  }
365 
366  operator PCXSTR() const throw()
367  {
368  return m_strPath;
369  }
370 
371  operator StringType&() throw()
372  {
373  return m_strPath;
374  }
375 
377  {
378  m_strPath += pszMore;
379  }
380 
381 };
382 
386 
387 } // namespace ATL
388 
389 #endif
BOOL WINAPI PathIsUNCServerShareA(LPCSTR lpszPath)
Definition: path.c:2330
int PathFindExtensionX(LPCWSTR pszPath)
Definition: atlpath.h:27
void PathRemoveArgsX(LPWSTR pszPath)
Definition: atlpath.h:81
BOOL PathIsUNCServerX(LPCSTR pszPath)
Definition: atlpath.h:46
CPathT< StringType > CommonPrefix(PCXSTR pszOther)
Definition: atlpath.h:167
CPathT< CStringW > CPathW
Definition: atlpath.h:385
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
Definition: path.c:2647
BOOL PathIsFileSpecX(LPCSTR pszPath)
Definition: atlpath.h:34
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1702
void PathBuildRootX(LPWSTR pszRoot, int iDrive)
Definition: atlpath.h:63
BOOL PathFileExistsX(LPCWSTR pszPath)
Definition: atlpath.h:25
void PathQuoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:76
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:624
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
Definition: path.c:1677
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
Definition: path.c:1558
void RemoveBlanks()
Definition: atlpath.h:304
BOOL PathRemoveFileSpecX(LPSTR pszPath)
Definition: atlpath.h:88
BOOL PathRelativePathToX(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:78
BOOL PathIsRelativeX(LPCWSTR pszPath)
Definition: atlpath.h:39
VOID WINAPI PathQuoteSpacesA(LPSTR lpszPath)
Definition: path.c:950
int PathSkipRootX(LPCSTR pszPath)
Definition: atlpath.h:52
void PathRemoveBlanksX(LPSTR pszPath)
Definition: atlpath.h:84
BOOL PathIsRootX(LPCSTR pszPath)
Definition: atlpath.h:40
BOOL PathAddExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:58
void WINAPI PathStripPathW(LPWSTR lpszPath)
Definition: path.c:689
int FindExtension() const
Definition: atlpath.h:197
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
Definition: path.c:774
BOOL PathCompactPathX(HDC hDC, LPSTR pszPath, UINT dx)
Definition: atlpath.h:70
void PathUnquoteSpacesX(LPSTR pszPath)
Definition: atlpath.h:96
int WINAPI PathCommonPrefixW(LPCWSTR lpszFile1, LPCWSTR lpszFile2, LPWSTR achPath)
Definition: path.c:2785
BOOL PathRemoveFileSpecX(LPWSTR pszPath)
Definition: atlpath.h:89
int GetDriveNumber() const
Definition: atlpath.h:207
BOOL WINAPI PathCanonicalizeW(LPWSTR lpszBuf, LPCWSTR lpszPath)
Definition: path.c:2425
BOOL IsDirectory() const
Definition: atlpath.h:217
int PathSkipRootX(LPCWSTR pszPath)
Definition: atlpath.h:53
VOID WINAPI PathRemoveBlanksA(LPSTR lpszPath)
Definition: path.c:889
BOOL MakePretty()
Definition: atlpath.h:262
BOOL FileExists() const
Definition: atlpath.h:192
BOOL CompactPath(HDC hDC, UINT nWidth)
Definition: atlpath.h:174
BOOL PathIsRelativeX(LPCSTR pszPath)
Definition: atlpath.h:38
BOOL WINAPI PathAppendA(LPSTR lpszPath, LPCSTR lpszAppend)
Definition: path.c:101
static HDC
Definition: imagelist.c:92
#define XCHAR
Definition: CString.cpp:150
void StripPath()
Definition: atlpath.h:339
int PathFindExtensionX(LPCSTR pszPath)
Definition: atlpath.h:26
void PathCanonicalizeX(LPWSTR pszDst, LPCWSTR pszSrc)
Definition: atlpath.h:65
BOOL Append(PCXSTR pszMore)
Definition: atlpath.h:136
BOOL CompactPathEx(UINT nMaxChars, DWORD dwFlags=0)
Definition: atlpath.h:182
BOOL WINAPI PathIsPrefixA(LPCSTR lpszPrefix, LPCSTR lpszPath)
Definition: path.c:2141
BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrFrom, LPCWSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3551
void PathAddBackslashX(LPWSTR pszPath)
Definition: atlpath.h:57
BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFrom, LPCSTR lpszTo, DWORD dwAttrTo)
Definition: path.c:3525
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
Definition: path.c:1734
BOOL WINAPI PathIsSameRootA(LPCSTR lpszPath1, LPCSTR lpszPath2)
Definition: path.c:1982
BOOL PathRelativePathToX(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:79
VOID WINAPI PathRemoveBlanksW(LPWSTR lpszPath)
Definition: path.c:915
BOOL WINAPI PathRenameExtensionW(LPWSTR lpszPath, LPCWSTR lpszExt)
Definition: path.c:3163
BOOL PathFileExistsX(LPCSTR pszPath)
Definition: atlpath.h:24
char * LPSTR
Definition: xmlstorage.h:182
void PathStripPathX(LPWSTR pszPath)
Definition: atlpath.h:93
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
Definition: path.c:581
int WINAPI PathCommonPrefixA(LPCSTR lpszFile1, LPCSTR lpszFile2, LPSTR achPath)
Definition: path.c:2730
int PathGetDriveNumberX(LPCWSTR pszPath)
Definition: atlpath.h:31
void AddBackslash()
Definition: atlpath.h:121
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
LPSTR WINAPI PathAddBackslashA(LPSTR lpszPath)
Definition: path.c:258
StringType m_strPath
Definition: atlpath.h:104
BOOL WINAPI PathAddExtensionW(LPWSTR lpszPath, LPCWSTR lpszExtension)
Definition: path.c:2617
CPathT< CString > CPath
Definition: atlpath.h:383
void BuildRoot(int iDrive)
Definition: atlpath.h:144
BOOL PathIsSameRootX(LPCWSTR pszPath, LPCWSTR pszOther)
Definition: atlpath.h:43
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
Definition: path.c:324
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
Definition: path.c:728
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
Definition: path.c:818
BOOL PathIsUNCServerX(LPCWSTR pszPath)
Definition: atlpath.h:47
BOOL IsUNCServerShare() const
Definition: atlpath.h:257
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
Definition: path.c:289
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
Definition: path.c:2357
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
Definition: path.c:2870
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
Definition: path.c:2112
const WCHAR * str
CPathT(const CPathT< StringType > &path)
Definition: atlpath.h:111
void PathRemoveExtensionX(LPSTR pszPath)
Definition: atlpath.h:86
BOOL IsPrefix(PCXSTR pszPrefix) const
Definition: atlpath.h:227
smooth NULL
Definition: ftsmooth.c:416
CPathT< StringType > PathCommonPrefixX(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath)
Definition: atlpath.h:69
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:389
BOOL PathRenameExtensionX(LPSTR pszPath, LPCSTR pszExt)
Definition: atlpath.h:90
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1756
BOOL IsSameRoot(PCXSTR pszOther) const
Definition: atlpath.h:242
void PathRemoveExtensionX(LPWSTR pszPath)
Definition: atlpath.h:87
const char * LPCSTR
Definition: xmlstorage.h:183
BOOL PathIsUNCServerShareX(LPCWSTR pszPath)
Definition: atlpath.h:49
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:442
LPSTR WINAPI PathSkipRootA(LPCSTR lpszPath)
Definition: path.c:3226
void PathCombineX(LPWSTR pszPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore)
Definition: atlpath.h:67
BOOL PathIsRootX(LPCWSTR pszPath)
Definition: atlpath.h:41
BOOL WINAPI PathStripToRootA(LPSTR lpszPath)
Definition: path.c:711
BOOL PathMatchSpecX(LPCSTR pszPath, LPCSTR pszSpec)
Definition: atlpath.h:50
BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1414
BOOL PathMakePrettyX(LPWSTR pszPath)
Definition: atlpath.h:75
BOOL WINAPI PathIsUNCServerA(LPCSTR lpszPath)
Definition: path.c:2280
BOOL WINAPI PathIsFileSpecA(LPCSTR lpszPath)
Definition: path.c:2091
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
Definition: path.c:1621
void PathBuildRootX(LPSTR pszRoot, int iDrive)
Definition: atlpath.h:62
Definition: rosdlgs.h:5
BOOL IsFileSpec() const
Definition: atlpath.h:222
BOOL WINAPI PathRenameExtensionA(LPSTR lpszPath, LPCSTR lpszExt)
Definition: path.c:3143
BOOL RemoveFileSpec()
Definition: atlpath.h:318
BOOL PathIsUNCX(LPCSTR pszPath)
Definition: atlpath.h:44
void PathQuoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:77
int FindFileName() const
Definition: atlpath.h:202
_In_ LPCSTR pszDir
Definition: shellapi.h:582
#define MAX_PATH
Definition: compat.h:34
StringType::PCXSTR PCXSTR
Definition: atlpath.h:100
BOOL PathCompactPathX(HDC hDC, LPWSTR pszPath, UINT dx)
Definition: atlpath.h:71
int SkipRoot() const
Definition: atlpath.h:334
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL PathIsUNCX(LPCWSTR pszPath)
Definition: atlpath.h:45
BOOL PathMakePrettyX(LPSTR pszPath)
Definition: atlpath.h:74
int PathFindFileNameX(LPCWSTR pszPath)
Definition: atlpath.h:29
LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
Definition: path.c:154
BOOL WINAPI PathIsPrefixW(LPCWSTR lpszPrefix, LPCWSTR lpszPath)
Definition: path.c:2156
BOOL IsRoot() const
Definition: atlpath.h:237
UINT cchMax
LPWSTR WINAPI PathSkipRootW(LPCWSTR lpszPath)
Definition: path.c:3257
BOOL PathCompactPathExX(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:72
void WINAPI PathStripPathA(LPSTR lpszPath)
Definition: path.c:672
CPathT< CStringA > CPathA
Definition: atlpath.h:384
BOOL PathAppendX(LPWSTR pszPath, LPCWSTR pszMore)
Definition: atlpath.h:61
BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
Definition: path.c:2679
BOOL PathStripToRootX(LPSTR pszPath)
Definition: atlpath.h:94
BOOL RenameExtension(PCXSTR pszExtension)
Definition: atlpath.h:326
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
CPathT< StringType > & operator+=(PCXSTR pszMore)
Definition: atlpath.h:376
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
Definition: path.c:533
BOOL PathCompactPathExX(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags)
Definition: atlpath.h:73
BOOL PathIsDirectoryX(LPCWSTR pszPath)
Definition: atlpath.h:33
BOOL RelativePathTo(PCXSTR pszFrom, DWORD dwAttrFrom, PCXSTR pszTo, DWORD dwAttrTo)
Definition: atlpath.h:282
BOOL PathIsPrefixX(LPCWSTR pszPath, LPCWSTR pszPrefix)
Definition: atlpath.h:37
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
Definition: path.c:862
BOOL PathStripToRootX(LPWSTR pszPath)
Definition: atlpath.h:95
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
Definition: path.c:1581
void PathRemoveBackslashX(LPSTR pszPath)
Definition: atlpath.h:82
BOOL WINAPI PathIsRelativeA(LPCSTR lpszPath)
Definition: path.c:1542
static HDC hDC
Definition: 3dtext.c:33
BOOL PathIsSameRootX(LPCSTR pszPath, LPCSTR pszOther)
Definition: atlpath.h:42
void PathUnquoteSpacesX(LPWSTR pszPath)
Definition: atlpath.h:97
void WINAPI PathRemoveArgsA(LPSTR lpszPath)
Definition: path.c:751
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:417
CPathT(PCXSTR pszPath)
Definition: atlpath.h:106
VOID WINAPI PathUnquoteSpacesA(LPSTR lpszPath)
Definition: path.c:1007
BOOL PathAddExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:59
BOOL IsUNCServer() const
Definition: atlpath.h:252
BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath, UINT cchMax, DWORD dwFlags)
Definition: path.c:1439
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
Definition: path.c:1029
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
Definition: path.c:2849
BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
Definition: path.c:2302
BOOL PathMatchSpecX(LPCWSTR pszPath, LPCWSTR pszSpec)
Definition: atlpath.h:51
StringType GetExtension() const
Definition: atlpath.h:212
BOOL StripToRoot()
Definition: atlpath.h:346
GLint dx
Definition: linetemp.h:97
void UnquoteSpaces()
Definition: atlpath.h:354
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:548
BOOL WINAPI PathCanonicalizeA(LPSTR lpszBuf, LPCSTR lpszPath)
Definition: path.c:2392
BOOL PathIsPrefixX(LPCSTR pszPath, LPCSTR pszPrefix)
Definition: atlpath.h:36
int PathFindFileNameX(LPCSTR pszPath)
Definition: atlpath.h:28
StringType::XCHAR XCHAR
Definition: atlpath.h:102
void Canonicalize()
Definition: atlpath.h:151
void PathCanonicalizeX(LPSTR pszDst, LPCSTR pszSrc)
Definition: atlpath.h:64
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
Definition: path.c:1943
CPathT< StringType > PathCommonPrefixX(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR pszPath)
Definition: atlpath.h:68
BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
Definition: path.c:2003
void PathRemoveBackslashX(LPWSTR pszPath)
Definition: atlpath.h:83
void PathRemoveArgsX(LPSTR pszPath)
Definition: atlpath.h:80
void Combine(PCXSTR pszDir, PCXSTR pszFile)
Definition: atlpath.h:160
StringType::PXSTR PXSTR
Definition: atlpath.h:101
BOOL IsUNC() const
Definition: atlpath.h:247
int PathGetDriveNumberX(LPCSTR pszPath)
Definition: atlpath.h:30
void RemoveExtension()
Definition: atlpath.h:311
BOOL PathIsFileSpecX(LPCWSTR pszPath)
Definition: atlpath.h:35
VOID WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
Definition: path.c:973
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
Definition: path.c:368
BOOL PathIsDirectoryX(LPCSTR pszPath)
Definition: atlpath.h:32
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2245
WCHAR * LPWSTR
Definition: xmlstorage.h:184
void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
Definition: path.c:801
LPSTR WINAPI PathRemoveBackslashA(LPSTR lpszPath)
Definition: path.c:842
LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
Definition: path.c:189
void PathCombineX(LPSTR pszPathOut, LPCSTR pszPathIn, LPCSTR pszMore)
Definition: atlpath.h:66
void PathRemoveBlanksX(LPWSTR pszPath)
Definition: atlpath.h:85
BOOL PathIsUNCServerShareX(LPCSTR pszPath)
Definition: atlpath.h:48
GLuint64EXT * result
Definition: glext.h:11304
BOOL IsRelative() const
Definition: atlpath.h:232
BOOL AddExtension(PCXSTR pszExtension)
Definition: atlpath.h:128
BOOL PathRenameExtensionX(LPWSTR pszPath, LPCWSTR pszExt)
Definition: atlpath.h:91
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
Definition: path.c:2222
BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
Definition: path.c:1914
void PathAddBackslashX(LPSTR pszPath)
Definition: atlpath.h:56
BOOL PathAppendX(LPSTR pszPath, LPCSTR pszMore)
Definition: atlpath.h:60
void PathStripPathX(LPSTR pszPath)
Definition: atlpath.h:92
BOOL WINAPI PathAddExtensionA(LPSTR lpszPath, LPCSTR lpszExtension)
Definition: path.c:2594
void QuoteSpaces()
Definition: atlpath.h:275
void RemoveBackslash()
Definition: atlpath.h:297
BOOL MatchSpec(PCXSTR pszSpec) const
Definition: atlpath.h:270
void RemoveArgs()
Definition: atlpath.h:290
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
Definition: path.c:343