Autor Beitrag
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 30.07.04 20:40 
Ich weiß nicht ob es von Interesse ist, aber ich stand erst heute vor folgendem kleinen Problem --

Ich wollte mit einer Datei arbeiten, die entweder einen relativen oder absoluten Pfad haben kann. Wenn es ein relativer Pfad ist, soll der Pfad des Bearbeitungstools als Basis herangezogen werden. Dabei entsteht allerdings u.U. eine Konstruktion wie
ausblenden Quelltext
1:
c:\Ein Ordner\data\..\Dateiname.txt					

Es funktioniert zwar, sieht aber nicht besonders schön aus, denn eigentlich geht es durch die beiden Punkte einen Ordner nach oben, so dass der Pfad eigentlich nur:
ausblenden Quelltext
1:
c:\Ein Ordner\Dateiname.txt					

lautet. Durch einen Zufall bin ich auf ein paar nützliche Funktionen gestoßen (s. PSDK). Zwei davon (PathIsRelative, PathCanonicalize) habe ich für die folgende Funktion gebraucht:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
const
  shlwapi = 'shlwapi.dll';

function PathIsRelative(pszPath: PAnsiChar): bool; stdcall;
  external shlwapi name 'PathIsRelativeA';
function PathCanonicalize(lpszDest, lpszSrc: PAnsiChar): bool;
  stdcallexternal shlwapi name 'PathCanonicalizeA';


function MakeAPrettyPath(const Path1, Path2: string): string;
var
  buf : array[0..MAX_PATH]of char;
begin
  // Puffer leeren
  ZeroMemory(@buf,sizeof(buf));

  // der 2. Pfad ist relativ, also sollen Pfad1 und Pfad2
  // mit Hilfe von "PathCanonicalize" zusammengesetzt werden
  if(PathIsRelative(pchar(Path2))) then
  begin
    if(not PathCanonicalize(buf,pchar(Path1 + Path2))) then

  // im Fehlerfall werden die beiden Angaben dann eben
  // doch zusammengefügt, ´s geht dann halt nicht anders. :o(
      lstrcpy(buf,pchar(Path1 + Path2));
  end
  // der 2. Pfad ist ein absoluter Pfad, also wird auch
  // nur er benutzt
  else lstrcpy(buf,pchar(Path2));

  SetString(Result,buf,lstrlen(buf));
end;


Zugegeben, es ist ein etwas spezieller Fall, aber so brauchte ich eben nicht selbst mit Strings hantieren. Und laut PSDK laufen beide Funktionen ab Windows 98 und 2000. Und für 95 und NT4 muss lediglich der IE4 installiert werden.

"Path1" wäre also der Ordner meines erwähnten Tools, "Path2" wäre die gewünschte, zu bearbeitende Datei. Und die kann eben entweder einen relativen oder auch einen absoluten Pfad enthalten. Bei einem absoluten Pfad spielt der Ordner meines Tools keine Rolle und wird von der Funktion auch ignoriert. Und bei einem relativen Pfad kommt es zu dieser ... ich sage mal: optischen Konvertierung des Pfades
ausblenden Delphi-Quelltext
1:
2:
3:
ShowMessage(
  MakeAPrettyPath('c:\Ein Ordner\data','..\Dateiname.txt')
);



Auch die anderen "Path*"-Funktionen kann ich nur empfehlen. Als kleinen Bonus zeige ich noch schnell, wie man mit einem ausgelesenen Icon aus der Registry umgehen kann. ;) Ich meine damit solche Angaben, die den Dateinamen der Symboldatei und den Index enthalten:
ausblenden Quelltext
1:
c:\Meine Symbole\EineFetteIconLib.dll,123					

Normalerweise könnte man jetzt mit "copy" und "pos" arbeiten. Aber wozu?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
// mal angenommen, das wäre jetzt aus der Registry
// ausgelesen worden
IconLib := 'c:\Meine Symbole\EineFettIconLib.dll,123';

// zuerst den Index des Symbols ermitteln, ...
Index := PathParseIconLocation(pchar(IconLib));

// ... & dann diesen Anhang entfernen, damit nur der
// Dateiname übrig bleibt
PathRemoveArgs(pchar(IconLib));

:stupid:

Ach ja, die Deklarationen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
function PathParseIconLocation(pszIconFile: PAnsiChar): integer;
  stdcallexternal shlwapi name 'PathParseIconLocationA';
procedure PathRemoveArgs(pszPath: PAnsiChar); stdcall;
  external shlwapi name 'PathRemoveArgsA';

So, das muss reichen. :mrgreen:


PS: Natürlich gibt es bereits ein paar Funktionen mit ähnlichen Aufgaben, die von Delphi zur Verfügung gestellt werden. Genannt seien "ExpandFileName" und "ExtractRelativePath". Aber ich finde die o.g. Funktionen (und die anderen "Path*"-Funktionen, die ich hier nicht vorgestellt habe, dennoch für nonVCL- und Konsolenprogramme nützlich, in denen man ja zumeist auf bestimmte Borland-Units verzichten will um die Programme klein zu halten.


Zuletzt bearbeitet von MathiasSimmack am Di 03.08.04 17:43, insgesamt 1-mal bearbeitet
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 31.07.04 00:00 
2 Fragen:

1. Hast du einen (PSDK)-Link für die Funktionsliste?
2. Hast du eine Unit mit den Deklarationen (Imports)?

Sieht vielversprechend aus.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 31.07.04 08:19 
1. Der Link für die Adresszeile im PSDK lautet:
ms-help://MS.PSDK.1033/shellcc/platform/shell/reference/shlwapi/path/path.htm

2. Na ja, ich habe die Funktionen (es sind wahrscheinlich nicht mal alle, da muss ich noch mal gucken :oops:) aus der "shlwapi.h" kopiert und in meine "MSysUtils.pas" geschrieben. Die wird beim nächsten Update von Luckies Win32-API-Tutorials dabei sein. Aber ich könnte sie alternativ in die "Open Source Units"-Sparte posten.
Amiga-Fan
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Mo 02.08.04 20:59 
hm hätte ich von sowas eher gewußt hätte ich vielleicht die benutzt. Aber damals habe ich diese Verzeichnisfunktionen "von Hand" nachgebildet. Naja ist auch nicht allzu schwer...
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 03.08.04 17:47 
Anmerken möchte ich noch mal, obwohl es schon im ursprünglichen Beitrag stand, dass mein Fokus auf nonVCL und Konsole lag. Und da verzichte ich meist auf die SysUtils.

Abgesehen davon hat "PathCanonicalize" gegenüber "ExpandFileName" den Vorteil, dass man den Ursprungspfad selbst angeben kann. Bei "ExpandFileName" wird immer der aktuelle Ordner (= das Arbeitsverzeichnis benutzt).

Aber egal. Die eigentliche Frage wäre: Soll ich die Unit, bzw. die "Path*"-Funktionen, hier posten (passend zum FAQ-Beitrag), oder soll ich sie in die "Open Source Units"-Sparte stellen?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 03.08.04 19:19 
Würde sie passend zum Beitrag gleich hier mit anfügen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 03.08.04 20:15 
Na, warum nicht. Hier die wichtigsten Funktionen
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
unit PathUtils;

interface


uses
  Windows;

const
  // Return flags for PathGetCharType
  GCT_INVALID             = $0000;
  GCT_LFNCHAR             = $0001;
  GCT_SHORTCHAR           = $0002;
  GCT_WILD                = $0004;
  GCT_SEPARATOR           = $0008;

  function PathAddBackslash(lpszPath: PAnsiChar): PAnsiChar; stdcall;
  function PathAddExtension(lpszPath, lpszExtension: PAnsiChar): bool; stdcall;
  function PathAppend(pszPath, pszMore: PAnsiChar): bool; stdcall;
  function PathBuildRoot(pszRoot: PAnsiChar; iDrive: integer): PAnsiChar;
    stdcall;
  function PathCanonicalize(lpszDest, lpszSrc: PAnsiChar): bool; stdcall;
  function PathCombine(lpszDest, lpszDir, lpszFile: PAnsiChar): PAnsiChar;
    stdcall;
  function PathCompactPath(dc: HDC; pszPath: PAnsiChar; dx: UINT): bool;
    stdcall;
  function PathCompactPathEx(pszOut, pszSrc: PAnsiChar; cchMax: UINT;
    dwFlags: dword): bool; stdcall;
  function PathCommonPrefix(pszFile1, pszFile2, achPath: PAnsiChar): integer;
    stdcall;
  function PathFileExists(pszPath: PAnsiChar): bool; stdcall;
  function PathFindExtension(pszPath: PAnsiChar): PAnsiChar; stdcall;
  function PathFindFileName(pszPath: PAnsiChar): PAnsiChar; stdcall;
  function PathFindNextComponent(pszPath: PAnsiChar): PAnsiChar; stdcall;
  function PathFindOnPath(pszPath, ppszOtherDirs: PAnsiChar): bool; stdcall;
  function PathGetArgs(pszPath: PAnsiChar): PAnsiChar; stdcall;
  function PathFindSuffixArray(pszPath: PAnsiChar;
    const apszSuffix: PAnsiChar; iArraySize: integer): PAnsiChar; stdcall;
  function PathIsLFNFileSpec(lpName: PAnsiChar): bool; stdcall;
  function PathGetCharType(ch: UCHAR): UINT; stdcall;
  function PathGetDriveNumber(pszPath: PAnsiChar): integer; stdcall;
  function PathIsDirectory(pszPath: PAnsiChar): bool; stdcall;
  function PathIsDirectoryEmpty(pszPath: PAnsiChar): bool; stdcall;
  function PathIsFileSpec(pszPath: PAnsiChar): bool; stdcall;
  function PathIsPrefix(pszPrefix, pszPath: PAnsiChar): bool; stdcall;
  function PathIsRelative(pszPath: PAnsiChar): bool; stdcall;
  function PathIsRoot(pszPath: PAnsiChar): bool; stdcall;
  function PathIsSameRoot(pszPath1, pszPath2: PAnsiChar): bool; stdcall;
  function PathIsUNC(pszPath: PAnsiChar): bool; stdcall;
  function PathIsNetworkPath(pszPath: PAnsiChar): bool; stdcall;
  function PathIsUNCServer(pszPath: PAnsiChar): bool; stdcall;
  function PathIsUNCServerShare(pszPath: PAnsiChar): bool; stdcall;
  function PathIsContentType(pszPath, pszContentType: PAnsiChar): bool;
    stdcall;
  function PathIsURL(pszPath: PAnsiChar): bool; stdcall;
  function PathMakePretty(pszPath: PAnsiChar): bool; stdcall;
  function PathMatchSpec(pszFile, pszSpec: PAnsiChar): bool; stdcall;
  function PathParseIconLocation(pszIconFile: PAnsiChar): integer; stdcall;
  procedure PathQuoteSpaces(pszPath: PAnsiChar); stdcall;
  function PathRelativePathTo(pszPath, pszFrom: PAnsiChar;
    dwAttrFrom: dword; pszTo: PAnsiChar; dwAttrTo: dword): bool; stdcall;
  procedure PathRemoveArgs(pszPath: PAnsiChar); stdcall;
  function PathRemoveBackslash(pszPath: PAnsiChar): PAnsiChar; stdcall;
  procedure PathRemoveBlanks(pszPath: PAnsiChar); stdcall;
  procedure PathRemoveExtension(pszPath: PAnsiChar); stdcall;
  function PathRemoveFileSpec(pszPath: PAnsiChar): bool; stdcall;
  function PathRenameExtension(pszPath, pszExt: PAnsiChar): bool; stdcall;
  function PathSearchAndQualify(pszPath, pszBuf: PAnsiChar; cchBuf: UINT):
    bool; stdcall;
  procedure PathSetDlgItemPath(dlg: HWND; id: integer; pszPath: PAnsiChar);
    stdcall;
  function PathSkipRoot(pszPath: PAnsiChar): PAnsiChar; stdcall;
  procedure PathStripPath(pszPath: PAnsiChar); stdcall;
  function PathStripToRoot(pszPath: PAnsiChar): bool; stdcall;
  procedure PathUnquoteSpaces(pszPath: PAnsiChar); stdcall;
  function PathMakeSystemFolder(pszPath: PAnsiChar): bool; stdcall;
  function PathUnmakeSystemFolder(pszPath: PAnsiChar): bool; stdcall;
  function PathIsSystemFolder(pszPath: PAnsiChar; dwAttrb: dword): bool;
    stdcall;
  procedure PathUndecorate(pszPath: PAnsiChar); stdcall;
  function PathUnExpandEnvStrings(pszPath, pszBuf: PAnsiChar; cchBuf: UINT):
    bool; stdcall;


implementation


//
// Shell helpers
//
const
  shlwapi = 'shlwapi.dll';

function PathAddBackslash; external shlwapi name 'PathAddBackslashA';
function PathAddExtension; external shlwapi name 'PathAddExtensionA';
function PathAppend; external shlwapi name 'PathAppendA';
function PathBuildRoot; external shlwapi name 'PathBuildRootA';
function PathCanonicalize; external shlwapi name 'PathCanonicalizeA';
function PathCombine; external shlwapi name 'PathCombineA';
function PathCompactPath; external shlwapi name 'PathCompactPathA';
function PathCompactPathEx; external shlwapi name 'PathCompactPathExA';
function PathCommonPrefix; external shlwapi name 'PathCommonPrefixA';
function PathFileExists; external shlwapi name 'PathFileExistsA';
function PathFindExtension; external shlwapi name 'PathFindExtensionA';
function PathFindFileName; external shlwapi name 'PathFindFileNameA';
function PathFindNextComponent; external shlwapi name 'PathFindNextComponentA';
function PathFindOnPath; external shlwapi name 'PathFindOnPathA';
function PathGetArgs; external shlwapi name 'PathGetArgsA';
function PathFindSuffixArray; external shlwapi name 'PathFindSuffixArrayA';
function PathIsLFNFileSpec; external shlwapi name 'PathIsLFNFileSpecA';
function PathGetCharType; external shlwapi name 'PathGetCharTypeA';
function PathGetDriveNumber; external shlwapi name 'PathGetDriveNumberA';
function PathIsDirectory; external shlwapi name 'PathIsDirectoryA';
function PathIsDirectoryEmpty; external shlwapi name 'PathIsDirectoryEmptyA';
function PathIsFileSpec; external shlwapi name 'PathIsFileSpecA';
function PathIsPrefix; external shlwapi name 'PathIsPrefixA';
function PathIsRelative; external shlwapi name 'PathIsRelativeA';
function PathIsRoot; external shlwapi name 'PathIsRootA';
function PathIsSameRoot; external shlwapi name 'PathIsSameRootA';
function PathIsUNC; external shlwapi name 'PathIsUNCA';
function PathIsNetworkPath; external shlwapi name 'PathIsNetworkPathA';
function PathIsUNCServer; external shlwapi name 'PathIsUNCServerA';
function PathIsUNCServerShare; external shlwapi name 'PathIsUNCServerShareA';
function PathIsContentType; external shlwapi name 'PathIsContentTypeA';
function PathIsURL; external shlwapi name 'PathIsURLA';
function PathMakePretty; external shlwapi name 'PathMakePrettyA';
function PathMatchSpec; external shlwapi name 'PathMatchSpecA';
function PathParseIconLocation; external shlwapi name 'PathParseIconLocationA';
procedure PathQuoteSpaces; external shlwapi name 'PathQuoteSpacesA';
function PathRelativePathTo; external shlwapi name 'PathRelativePathToA';
procedure PathRemoveArgs; external shlwapi name 'PathRemoveArgsA';
function PathRemoveBackslash; external shlwapi name 'PathRemoveBackslashA';
procedure PathRemoveBlanks; external shlwapi name 'PathRemoveBlanksA';
procedure PathRemoveExtension; external shlwapi name 'PathRemoveExtensionA';
function PathRemoveFileSpec; external shlwapi name 'PathRemoveFileSpecA';
function PathRenameExtension; external shlwapi name 'PathRenameExtensionA';
function PathSearchAndQualify; external shlwapi name 'PathSearchAndQualifyA';
procedure PathSetDlgItemPath; external shlwapi name 'PathSetDlgItemPathA';
function PathSkipRoot; external shlwapi name 'PathSkipRootA';
procedure PathStripPath; external shlwapi name 'PathStripPathA';
function PathStripToRoot; external shlwapi name 'PathStripToRootA';
procedure PathUnquoteSpaces; external shlwapi name 'PathUnquoteSpacesA';
function PathMakeSystemFolder; external shlwapi name 'PathMakeSystemFolderA';
function PathUnmakeSystemFolder; external shlwapi name 'PathUnmakeSystemFolderA';
function PathIsSystemFolder; external shlwapi name 'PathIsSystemFolderA';
procedure PathUndecorate; external shlwapi name 'PathUndecorateA';
function PathUnExpandEnvStrings; external shlwapi name 'PathUnExpandEnvStringsA';

end.

Wer Wert auf die Unicode-Varianten legt, der kopiert die ganze Litanei mit dem üblichen W (speziell beim Import) als Suffix, und "PWideChar" anstelle von "PAnsiChar".

Zwecks Bedeutung und Erklärung möchte ich noch mal auf das PSDK hinweisen:
ms-help://MS.PSDK.1033/shellcc/platform/shell/reference/shlwapi/path/path.htm

bzw. online im MSDN
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 07.08.04 22:57 
Hab mir mal die Zeit genommen und in der Unit noch die AnsiChar und WideChar deklarationen ergänzt, bzw. die Std-Deklarationen. Ergebnis sieht so aus:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
Unit PathUtils;

Interface

Uses
    Windows;

Const
    // Return flags for PathGetCharType
    GCT_INVALID = $0000;
    GCT_LFNCHAR = $0001;
    GCT_SHORTCHAR = $0002;
    GCT_WILD = $0004;
    GCT_SEPARATOR = $0008;

Function PathAddBackslash(lpszPath: PChar): PChar; stdcall;
Function PathAddBackslashA(lpszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathAddBackslashW(lpszPath: PWideChar): PWideChar; stdcall;

Function PathAddExtension(lpszPath, lpszExtension: PChar): BOOL; stdcall;
Function PathAddExtensionA(lpszPath, lpszExtension: PAnsiChar): BOOL; stdcall;
Function PathAddExtensionW(lpszPath, lpszExtension: PWideChar): BOOL; stdcall;

Function PathAppend(pszPath, pszMore: PChar): BOOL; stdcall;
Function PathAppendA(pszPath, pszMore: PAnsiChar): BOOL; stdcall;
Function PathAppendW(pszPath, pszMore: PWideChar): BOOL; stdcall;

Function PathBuildRoot(pszRoot: PChar; iDrive: Integer): PChar; stdcall;
Function PathBuildRootA(pszRoot: PAnsiChar; iDrive: Integer): PAnsiChar; stdcall;
Function PathBuildRootW(pszRoot: PWideChar; iDrive: Integer): PWideChar; stdcall;

Function PathCanonicalize(lpszDest, lpszSrc: PChar): BOOL; stdcall;
Function PathCanonicalizeA(lpszDest, lpszSrc: PAnsiChar): BOOL; stdcall;
Function PathCanonicalizeW(lpszDest, lpszSrc: PWideChar): BOOL; stdcall;

Function PathCombine(lpszDest, lpszDir, lpszFile: PChar): PChar; stdcall;
Function PathCombineA(lpszDest, lpszDir, lpszFile: PAnsiChar): PAnsiChar; stdcall;
Function PathCombineW(lpszDest, lpszDir, lpszFile: PWideChar): PWideChar; stdcall;

Function PathCommonPrefix(pszFile1, pszFile2, achPath: PChar): Integer; stdcall;
Function PathCommonPrefixA(pszFile1, pszFile2, achPath: PAnsiChar): Integer; stdcall;
Function PathCommonPrefixW(pszFile1, pszFile2, achPath: PWideChar): Integer; stdcall;

Function PathCompactPath(DC: HDC; pszPath: PChar; dx: UINT): BOOL; stdcall;
Function PathCompactPathA(DC: HDC; pszPath: PAnsiChar; dx: UINT): BOOL; stdcall;
Function PathCompactPathW(DC: HDC; pszPath: PWideChar; dx: UINT): BOOL; stdcall;

Function PathCompactPathEx(pszOut, pszSrc: PChar; cchMax: UINT; dwFlags: DWORD): BOOL; stdcall;
Function PathCompactPathExA(pszOut, pszSrc: PAnsiChar; cchMax: UINT; dwFlags: DWORD): BOOL; stdcall;
Function PathCompactPathExW(pszOut, pszSrc: PWideChar; cchMax: UINT; dwFlags: DWORD): BOOL; stdcall;

Function PathFileExists(pszPath: PChar): BOOL; stdcall;
Function PathFileExistsA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathFileExistsW(pszPath: PWideChar): BOOL; stdcall;

Function PathFindExtension(pszPath: PChar): PChar; stdcall;
Function PathFindExtensionA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathFindExtensionW(pszPath: PWideChar): PWideChar; stdcall;

Function PathFindFileName(pszPath: PChar): PChar; stdcall;
Function PathFindFileNameA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathFindFileNameW(pszPath: PWideChar): PWideChar; stdcall;

Function PathFindNextComponent(pszPath: PChar): PChar; stdcall;
Function PathFindNextComponentA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathFindNextComponentW(pszPath: PWideChar): PWideChar; stdcall;

Function PathFindOnPath(pszPath, ppszOtherDirs: PChar): BOOL; stdcall;
Function PathFindOnPathA(pszPath, ppszOtherDirs: PAnsiChar): BOOL; stdcall;
Function PathFindOnPathW(pszPath, ppszOtherDirs: PWideChar): BOOL; stdcall;

Function PathFindSuffixArray(pszPath: PChar; Const apszSuffix: PChar; iArraySize: Integer): PChar; stdcall;
Function PathFindSuffixArrayA(pszPath: PAnsiChar; Const apszSuffix: PAnsiChar; iArraySize: Integer): PAnsiChar; stdcall;
Function PathFindSuffixArrayW(pszPath: PWideChar; Const apszSuffix: PWideChar; iArraySize: Integer): PWideChar; stdcall;

Function PathGetArgs(pszPath: PChar): PChar; stdcall;
Function PathGetArgsA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathGetArgsW(pszPath: PWideChar): PWideChar; stdcall;

Function PathGetCharType(Ch: UCHAR): UINT; stdcall;
Function PathGetCharTypeA(Ch: UCHAR): UINT; stdcall;
Function PathGetCharTypeW(Ch: UCHAR): UINT; stdcall;

Function PathGetDriveNumber(pszPath: PChar): Integer; stdcall;
Function PathGetDriveNumberA(pszPath: PAnsiChar): Integer; stdcall;
Function PathGetDriveNumberW(pszPath: PWideChar): Integer; stdcall;

Function PathIsContentType(pszPath, pszContentType: PChar): BOOL; stdcall;
Function PathIsContentTypeA(pszPath, pszContentType: PAnsiChar): BOOL; stdcall;
Function PathIsContentTypeW(pszPath, pszContentType: PWideChar): BOOL; stdcall;

Function PathIsDirectory(pszPath: PChar): BOOL; stdcall;
Function PathIsDirectoryA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsDirectoryW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsDirectoryEmpty(pszPath: PChar): BOOL; stdcall;
Function PathIsDirectoryEmptyA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsDirectoryEmptyW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsFileSpec(pszPath: PChar): BOOL; stdcall;
Function PathIsFileSpecA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsFileSpecW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsLFNFileSpec(lpName: PChar): BOOL; stdcall;
Function PathIsLFNFileSpecA(lpName: PAnsiChar): BOOL; stdcall;
Function PathIsLFNFileSpecW(lpName: PWideChar): BOOL; stdcall;

Function PathIsNetworkPath(pszPath: PChar): BOOL; stdcall;
Function PathIsNetworkPathA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsNetworkPathW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsPrefix(pszPrefix, pszPath: PChar): BOOL; stdcall;
Function PathIsPrefixA(pszPrefix, pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsPrefixW(pszPrefix, pszPath: PWideChar): BOOL; stdcall;

Function PathIsRelative(pszPath: PChar): BOOL; stdcall;
Function PathIsRelativeA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsRelativeW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsRoot(pszPath: PChar): BOOL; stdcall;
Function PathIsRootA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsRootW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsSameRoot(pszPath1, pszPath2: PChar): BOOL; stdcall;
Function PathIsSameRootA(pszPath1, pszPath2: PAnsiChar): BOOL; stdcall;
Function PathIsSameRootW(pszPath1, pszPath2: PWideChar): BOOL; stdcall;

Function PathIsSystemFolder(pszPath: PChar; dwAttrb: DWORD): BOOL; stdcall;
Function PathIsSystemFolderA(pszPath: PAnsiChar; dwAttrb: DWORD): BOOL; stdcall;
Function PathIsSystemFolderW(pszPath: PWideChar; dwAttrb: DWORD): BOOL; stdcall;

Function PathIsUNC(pszPath: PChar): BOOL; stdcall;
Function PathIsUNCA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsUNCW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsUNCServer(pszPath: PChar): BOOL; stdcall;
Function PathIsUNCServerA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsUNCServerW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsUNCServerShare(pszPath: PChar): BOOL; stdcall;
Function PathIsUNCServerShareA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsUNCServerShareW(pszPath: PWideChar): BOOL; stdcall;

Function PathIsURL(pszPath: PChar): BOOL; stdcall;
Function PathIsURLA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathIsURLW(pszPath: PWideChar): BOOL; stdcall;

Function PathMakePretty(pszPath: PChar): BOOL; stdcall;
Function PathMakePrettyA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathMakePrettyW(pszPath: PWideChar): BOOL; stdcall;

Function PathMakeSystemFolder(pszPath: PChar): BOOL; stdcall;
Function PathMakeSystemFolderA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathMakeSystemFolderW(pszPath: PWideChar): BOOL; stdcall;

Function PathMatchSpec(pszFile, pszSpec: PChar): BOOL; stdcall;
Function PathMatchSpecA(pszFile, pszSpec: PAnsiChar): BOOL; stdcall;
Function PathMatchSpecW(pszFile, pszSpec: PWideChar): BOOL; stdcall;

Function PathParseIconLocation(pszIconFile: PChar): Integer; stdcall;
Function PathParseIconLocationA(pszIconFile: PAnsiChar): Integer; stdcall;
Function PathParseIconLocationW(pszIconFile: PWideChar): Integer; stdcall;

Function PathRelativePathTo(pszPath, pszFrom: PChar; dwAttrFrom: DWORD; pszTo: PChar; dwAttrTo: DWORD): BOOL; stdcall;
Function PathRelativePathToA(pszPath, pszFrom: PAnsiChar; dwAttrFrom: DWORD; pszTo: PAnsiChar; dwAttrTo: DWORD): BOOL; stdcall;
Function PathRelativePathToW(pszPath, pszFrom: PWideChar; dwAttrFrom: DWORD; pszTo: PWideChar; dwAttrTo: DWORD): BOOL; stdcall;

Function PathRemoveBackslash(pszPath: PChar): PChar; stdcall;
Function PathRemoveBackslashA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathRemoveBackslashW(pszPath: PWideChar): PWideChar; stdcall;

Function PathRemoveFileSpec(pszPath: PChar): BOOL; stdcall;
Function PathRemoveFileSpecA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathRemoveFileSpecW(pszPath: PWideChar): BOOL; stdcall;

Function PathRenameExtension(pszPath, pszExt: PChar): BOOL; stdcall;
Function PathRenameExtensionA(pszPath, pszExt: PAnsiChar): BOOL; stdcall;
Function PathRenameExtensionW(pszPath, pszExt: PWideChar): BOOL; stdcall;

Function PathSearchAndQualify(pszPath, pszBuf: PChar; cchBuf: UINT): BOOL; stdcall;
Function PathSearchAndQualifyA(pszPath, pszBuf: PAnsiChar; cchBuf: UINT): BOOL; stdcall;
Function PathSearchAndQualifyW(pszPath, pszBuf: PWideChar; cchBuf: UINT): BOOL; stdcall;

Function PathSkipRoot(pszPath: PChar): PChar; stdcall;
Function PathSkipRootA(pszPath: PAnsiChar): PAnsiChar; stdcall;
Function PathSkipRootW(pszPath: PWideChar): PWideChar; stdcall;

Function PathStripToRoot(pszPath: PChar): BOOL; stdcall;
Function PathStripToRootA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathStripToRootW(pszPath: PWideChar): BOOL; stdcall;

Function PathUnExpandEnvStrings(pszPath, pszBuf: PChar; cchBuf: UINT): BOOL; stdcall;
Function PathUnExpandEnvStringsA(pszPath, pszBuf: PAnsiChar; cchBuf: UINT): BOOL; stdcall;
Function PathUnExpandEnvStringsW(pszPath, pszBuf: PWideChar; cchBuf: UINT): BOOL; stdcall;

Function PathUnmakeSystemFolder(pszPath: PChar): BOOL; stdcall;
Function PathUnmakeSystemFolderA(pszPath: PAnsiChar): BOOL; stdcall;
Function PathUnmakeSystemFolderW(pszPath: PWideChar): BOOL; stdcall;

Procedure PathQuoteSpaces(pszPath: PChar); stdcall;
Procedure PathQuoteSpacesA(pszPath: PAnsiChar); stdcall;
Procedure PathQuoteSpacesW(pszPath: PWideChar); stdcall;

Procedure PathRemoveArgs(pszPath: PChar); stdcall;
Procedure PathRemoveArgsA(pszPath: PAnsiChar); stdcall;
Procedure PathRemoveArgsW(pszPath: PWideChar); stdcall;

Procedure PathRemoveBlanks(pszPath: PChar); stdcall;
Procedure PathRemoveBlanksA(pszPath: PAnsiChar); stdcall;
Procedure PathRemoveBlanksW(pszPath: PWideChar); stdcall;

Procedure PathRemoveExtension(pszPath: PChar); stdcall;
Procedure PathRemoveExtensionA(pszPath: PAnsiChar); stdcall;
Procedure PathRemoveExtensionW(pszPath: PWideChar); stdcall;

Procedure PathSetDlgItemPath(Dlg: HWND; ID: Integer; pszPath: PChar); stdcall;
Procedure PathSetDlgItemPathA(Dlg: HWND; ID: Integer; pszPath: PAnsiChar); stdcall;
Procedure PathSetDlgItemPathW(Dlg: HWND; ID: Integer; pszPath: PWideChar); stdcall;

Procedure PathStripPath(pszPath: PChar); stdcall;
Procedure PathStripPathA(pszPath: PAnsiChar); stdcall;
Procedure PathStripPathW(pszPath: PWideChar); stdcall;

Procedure PathUndecorate(pszPath: PChar); stdcall;
Procedure PathUndecorateA(pszPath: PAnsiChar); stdcall;
Procedure PathUndecorateW(pszPath: PWideChar); stdcall;

Procedure PathUnquoteSpaces(pszPath: PChar); stdcall;
Procedure PathUnquoteSpacesA(pszPath: PAnsiChar); stdcall;
Procedure PathUnquoteSpacesW(pszPath: PWideChar); stdcall;

Implementation

//
// Shell helpers
//

Const
    shlwapi = 'shlwapi.dll';

Function PathAddBackslash; External shlwapi Name 'PathAddBackslashA';
Function PathAddBackslashA; External shlwapi Name 'PathAddBackslashA';
Function PathAddBackslashW; External shlwapi Name 'PathAddBackslashW';

Function PathAddExtension; External shlwapi Name 'PathAddExtensionA';
Function PathAddExtensionA; External shlwapi Name 'PathAddExtensionA';
Function PathAddExtensionW; External shlwapi Name 'PathAddExtensionW';

Function PathAppend; External shlwapi Name 'PathAppendA';
Function PathAppendA; External shlwapi Name 'PathAppendA';
Function PathAppendW; External shlwapi Name 'PathAppendW';

Function PathBuildRoot; External shlwapi Name 'PathBuildRootA';
Function PathBuildRootA; External shlwapi Name 'PathBuildRootA';
Function PathBuildRootW; External shlwapi Name 'PathBuildRootW';

Function PathCanonicalize; External shlwapi Name 'PathCanonicalizeA';
Function PathCanonicalizeA; External shlwapi Name 'PathCanonicalizeA';
Function PathCanonicalizeW; External shlwapi Name 'PathCanonicalizeW';

Function PathCombine; External shlwapi Name 'PathCombineA';
Function PathCombineA; External shlwapi Name 'PathCombineA';
Function PathCombineW; External shlwapi Name 'PathCombineW';

Function PathCommonPrefix; External shlwapi Name 'PathCommonPrefixA';
Function PathCommonPrefixA; External shlwapi Name 'PathCommonPrefixA';
Function PathCommonPrefixW; External shlwapi Name 'PathCommonPrefixW';

Function PathCompactPath; External shlwapi Name 'PathCompactPathA';
Function PathCompactPathA; External shlwapi Name 'PathCompactPathA';
Function PathCompactPathW; External shlwapi Name 'PathCompactPathW';

Function PathCompactPathEx; External shlwapi Name 'PathCompactPathExA';
Function PathCompactPathExA; External shlwapi Name 'PathCompactPathExA';
Function PathCompactPathExW; External shlwapi Name 'PathCompactPathExW';

Function PathFileExists; External shlwapi Name 'PathFileExistsA';
Function PathFileExistsA; External shlwapi Name 'PathFileExistsA';
Function PathFileExistsW; External shlwapi Name 'PathFileExistsW';

Function PathFindExtension; External shlwapi Name 'PathFindExtensionA';
Function PathFindExtensionA; External shlwapi Name 'PathFindExtensionA';
Function PathFindExtensionW; External shlwapi Name 'PathFindExtensionW';

Function PathFindFileName; External shlwapi Name 'PathFindFileNameA';
Function PathFindFileNameA; External shlwapi Name 'PathFindFileNameA';
Function PathFindFileNameW; External shlwapi Name 'PathFindFileNameW';

Function PathFindNextComponent; External shlwapi Name 'PathFindNextComponentA';
Function PathFindNextComponentA; External shlwapi Name 'PathFindNextComponentA';
Function PathFindNextComponentW; External shlwapi Name 'PathFindNextComponentW';

Function PathFindOnPath; External shlwapi Name 'PathFindOnPathA';
Function PathFindOnPathA; External shlwapi Name 'PathFindOnPathA';
Function PathFindOnPathW; External shlwapi Name 'PathFindOnPathW';

Function PathFindSuffixArray; External shlwapi Name 'PathFindSuffixArrayA';
Function PathFindSuffixArrayA; External shlwapi Name 'PathFindSuffixArrayA';
Function PathFindSuffixArrayW; External shlwapi Name 'PathFindSuffixArrayW';

Function PathGetArgs; External shlwapi Name 'PathGetArgsA';
Function PathGetArgsA; External shlwapi Name 'PathGetArgsA';
Function PathGetArgsW; External shlwapi Name 'PathGetArgsW';

Function PathGetCharType; External shlwapi Name 'PathGetCharTypeA';
Function PathGetCharTypeA; External shlwapi Name 'PathGetCharTypeA';
Function PathGetCharTypeW; External shlwapi Name 'PathGetCharTypeW';

Function PathGetDriveNumber; External shlwapi Name 'PathGetDriveNumberA';
Function PathGetDriveNumberA; External shlwapi Name 'PathGetDriveNumberA';
Function PathGetDriveNumberW; External shlwapi Name 'PathGetDriveNumberW';

Function PathIsContentType; External shlwapi Name 'PathIsContentTypeA';
Function PathIsContentTypeA; External shlwapi Name 'PathIsContentTypeA';
Function PathIsContentTypeW; External shlwapi Name 'PathIsContentTypeW';

Function PathIsDirectory; External shlwapi Name 'PathIsDirectoryA';
Function PathIsDirectoryA; External shlwapi Name 'PathIsDirectoryA';
Function PathIsDirectoryW; External shlwapi Name 'PathIsDirectoryW';

Function PathIsDirectoryEmpty; External shlwapi Name 'PathIsDirectoryEmptyA';
Function PathIsDirectoryEmptyA; External shlwapi Name 'PathIsDirectoryEmptyA';
Function PathIsDirectoryEmptyW; External shlwapi Name 'PathIsDirectoryEmptyW';

Function PathIsFileSpec; External shlwapi Name 'PathIsFileSpecA';
Function PathIsFileSpecA; External shlwapi Name 'PathIsFileSpecA';
Function PathIsFileSpecW; External shlwapi Name 'PathIsFileSpecW';

Function PathIsLFNFileSpec; External shlwapi Name 'PathIsLFNFileSpecA';
Function PathIsLFNFileSpecA; External shlwapi Name 'PathIsLFNFileSpecA';
Function PathIsLFNFileSpecW; External shlwapi Name 'PathIsLFNFileSpecW';

Function PathIsNetworkPath; External shlwapi Name 'PathIsNetworkPathA';
Function PathIsNetworkPathA; External shlwapi Name 'PathIsNetworkPathA';
Function PathIsNetworkPathW; External shlwapi Name 'PathIsNetworkPathW';

Function PathIsPrefix; External shlwapi Name 'PathIsPrefixA';
Function PathIsPrefixA; External shlwapi Name 'PathIsPrefixA';
Function PathIsPrefixW; External shlwapi Name 'PathIsPrefixW';

Function PathIsRelative; External shlwapi Name 'PathIsRelativeA';
Function PathIsRelativeA; External shlwapi Name 'PathIsRelativeA';
Function PathIsRelativeW; External shlwapi Name 'PathIsRelativeW';

Function PathIsRoot; External shlwapi Name 'PathIsRootA';
Function PathIsRootA; External shlwapi Name 'PathIsRootA';
Function PathIsRootW; External shlwapi Name 'PathIsRootW';

Function PathIsSameRoot; External shlwapi Name 'PathIsSameRootA';
Function PathIsSameRootA; External shlwapi Name 'PathIsSameRootA';
Function PathIsSameRootW; External shlwapi Name 'PathIsSameRootW';

Function PathIsSystemFolder; External shlwapi Name 'PathIsSystemFolderA';
Function PathIsSystemFolderA; External shlwapi Name 'PathIsSystemFolderA';
Function PathIsSystemFolderW; External shlwapi Name 'PathIsSystemFolderW';

Function PathIsUNC; External shlwapi Name 'PathIsUNCA';
Function PathIsUNCA; External shlwapi Name 'PathIsUNCA';
Function PathIsUNCW; External shlwapi Name 'PathIsUNCW';

Function PathIsUNCServer; External shlwapi Name 'PathIsUNCServerA';
Function PathIsUNCServerA; External shlwapi Name 'PathIsUNCServerA';
Function PathIsUNCServerW; External shlwapi Name 'PathIsUNCServerW';

Function PathIsUNCServerShare; External shlwapi Name 'PathIsUNCServerShareA';
Function PathIsUNCServerShareA; External shlwapi Name 'PathIsUNCServerShareA';
Function PathIsUNCServerShareW; External shlwapi Name 'PathIsUNCServerShareW';

Function PathIsURL; External shlwapi Name 'PathIsURLA';
Function PathIsURLA; External shlwapi Name 'PathIsURLA';
Function PathIsURLW; External shlwapi Name 'PathIsURLW';

Function PathMakePretty; External shlwapi Name 'PathMakePrettyA';
Function PathMakePrettyA; External shlwapi Name 'PathMakePrettyA';
Function PathMakePrettyW; External shlwapi Name 'PathMakePrettyW';

Function PathMakeSystemFolder; External shlwapi Name 'PathMakeSystemFolderA';
Function PathMakeSystemFolderA; External shlwapi Name 'PathMakeSystemFolderA';
Function PathMakeSystemFolderW; External shlwapi Name 'PathMakeSystemFolderW';

Function PathMatchSpec; External shlwapi Name 'PathMatchSpecA';
Function PathMatchSpecA; External shlwapi Name 'PathMatchSpecA';
Function PathMatchSpecW; External shlwapi Name 'PathMatchSpecW';

Function PathParseIconLocation; External shlwapi Name 'PathParseIconLocationA';
Function PathParseIconLocationA; External shlwapi Name 'PathParseIconLocationA';
Function PathParseIconLocationW; External shlwapi Name 'PathParseIconLocationW';

Function PathRelativePathTo; External shlwapi Name 'PathRelativePathToA';
Function PathRelativePathToA; External shlwapi Name 'PathRelativePathToA';
Function PathRelativePathToW; External shlwapi Name 'PathRelativePathToW';

Function PathRemoveBackslash; External shlwapi Name 'PathRemoveBackslashA';
Function PathRemoveBackslashA; External shlwapi Name 'PathRemoveBackslashA';
Function PathRemoveBackslashW; External shlwapi Name 'PathRemoveBackslashW';

Function PathRemoveFileSpec; External shlwapi Name 'PathRemoveFileSpecA';
Function PathRemoveFileSpecA; External shlwapi Name 'PathRemoveFileSpecA';
Function PathRemoveFileSpecW; External shlwapi Name 'PathRemoveFileSpecW';

Function PathRenameExtension; External shlwapi Name 'PathRenameExtensionA';
Function PathRenameExtensionA; External shlwapi Name 'PathRenameExtensionA';
Function PathRenameExtensionW; External shlwapi Name 'PathRenameExtensionW';

Function PathSearchAndQualify; External shlwapi Name 'PathSearchAndQualifyA';
Function PathSearchAndQualifyA; External shlwapi Name 'PathSearchAndQualifyA';
Function PathSearchAndQualifyW; External shlwapi Name 'PathSearchAndQualifyW';

Function PathSkipRoot; External shlwapi Name 'PathSkipRootA';
Function PathSkipRootA; External shlwapi Name 'PathSkipRootA';
Function PathSkipRootW; External shlwapi Name 'PathSkipRootW';

Function PathStripToRoot; External shlwapi Name 'PathStripToRootA';
Function PathStripToRootA; External shlwapi Name 'PathStripToRootA';
Function PathStripToRootW; External shlwapi Name 'PathStripToRootW';

Function PathUnExpandEnvStrings; External shlwapi Name 'PathUnExpandEnvStringsA';
Function PathUnExpandEnvStringsA; External shlwapi Name 'PathUnExpandEnvStringsA';
Function PathUnExpandEnvStringsW; External shlwapi Name 'PathUnExpandEnvStringsW';

Function PathUnmakeSystemFolder; External shlwapi Name 'PathUnmakeSystemFolderA';
Function PathUnmakeSystemFolderA; External shlwapi Name 'PathUnmakeSystemFolderA';
Function PathUnmakeSystemFolderW; External shlwapi Name 'PathUnmakeSystemFolderW';

Procedure PathQuoteSpaces; External shlwapi Name 'PathQuoteSpacesA';
Procedure PathQuoteSpacesA; External shlwapi Name 'PathQuoteSpacesA';
Procedure PathQuoteSpacesW; External shlwapi Name 'PathQuoteSpacesW';

Procedure PathRemoveArgs; External shlwapi Name 'PathRemoveArgsA';
Procedure PathRemoveArgsA; External shlwapi Name 'PathRemoveArgsA';
Procedure PathRemoveArgsW; External shlwapi Name 'PathRemoveArgsW';

Procedure PathRemoveBlanks; External shlwapi Name 'PathRemoveBlanksA';
Procedure PathRemoveBlanksA; External shlwapi Name 'PathRemoveBlanksA';
Procedure PathRemoveBlanksW; External shlwapi Name 'PathRemoveBlanksW';

Procedure PathRemoveExtension; External shlwapi Name 'PathRemoveExtensionA';
Procedure PathRemoveExtensionA; External shlwapi Name 'PathRemoveExtensionA';
Procedure PathRemoveExtensionW; External shlwapi Name 'PathRemoveExtensionW';

Procedure PathSetDlgItemPath; External shlwapi Name 'PathSetDlgItemPathA';
Procedure PathSetDlgItemPathA; External shlwapi Name 'PathSetDlgItemPathA';
Procedure PathSetDlgItemPathW; External shlwapi Name 'PathSetDlgItemPathW';

Procedure PathStripPath; External shlwapi Name 'PathStripPathA';
Procedure PathStripPathA; External shlwapi Name 'PathStripPathA';
Procedure PathStripPathW; External shlwapi Name 'PathStripPathW';

Procedure PathUndecorate; External shlwapi Name 'PathUndecorateA';
Procedure PathUndecorateA; External shlwapi Name 'PathUndecorateA';
Procedure PathUndecorateW; External shlwapi Name 'PathUndecorateW';

Procedure PathUnquoteSpaces; External shlwapi Name 'PathUnquoteSpacesA';
Procedure PathUnquoteSpacesA; External shlwapi Name 'PathUnquoteSpacesA';
Procedure PathUnquoteSpacesW; External shlwapi Name 'PathUnquoteSpacesW';

End.


Ansonsten hat sich nix geändert.

Achso: Hatte Probleme beim Übersetzen der weiteren Funktionen (insbesondere der Url-Funktionen), die im PSDK noch erwähnt werden. Kannst du mir da nochmal helfen?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.