-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathshlwapi.ahk
44 lines (42 loc) · 1.33 KB
/
shlwapi.ahk
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
; wrapper for some shlwapi.dll functions
; requires updates.ahk
; v1.0 © Drugwash, 2017.06.19
;================================================================
PathGetArgs(strg)
;================================================================
{
Global
return DllCall("shlwapi\" A_ThisFunc AW, "Str", strg, "Str")
}
;================================================================
PathRemoveArgs(ByRef strg)
;================================================================
{
Global
DllCall("shlwapi\" A_ThisFunc AW, "Str", strg)
}
;================================================================
PathQuoteSpaces(ByRef strg)
;================================================================
{
Global
VarSetCapacity(strg2, 260*A_CharSize, 0)
DllCall("lstrcpy" AW, "Str", strg2, "Str", strg)
DllCall("shlwapi\" A_ThisFunc AW, "Str", strg2)
DllCall("lstrcpy" AW, "Str", strg, "Str", strg2)
VarSetCapacity(strg2, 0)
}
;================================================================
PathUnquoteSpaces(ByRef strg)
;================================================================
{
Global
DllCall("shlwapi\" A_ThisFunc AW, "Str", strg)
}
;================================================================
PathFindFileName(strg)
;================================================================
{
Global
return DllCall("shlwapi\" A_ThisFunc AW, "Str", strg, "Str")
}