FileFuncTest.nsi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. ;_____________________________________________________________________________
  2. ;
  3. ; File Functions Test
  4. ;_____________________________________________________________________________
  5. ;
  6. ; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
  7. Name "File Functions Test"
  8. OutFile "FileFuncTest.exe"
  9. Caption "$(^Name)"
  10. ShowInstDetails show
  11. XPStyle on
  12. RequestExecutionLevel user
  13. Var FUNCTION
  14. Var OUT1
  15. Var OUT2
  16. Var OUT3
  17. Var OUT4
  18. Var OUT5
  19. Var OUT6
  20. Var OUT7
  21. !include "FileFunc.nsh"
  22. !include "LogicLib.nsh"
  23. ;############### INSTALL ###############
  24. !define StackVerificationStart `!insertmacro StackVerificationStart`
  25. !macro StackVerificationStart _FUNCTION
  26. StrCpy $FUNCTION ${_FUNCTION}
  27. Call StackVerificationStart
  28. !macroend
  29. !define StackVerificationEnd `!insertmacro StackVerificationEnd`
  30. !macro StackVerificationEnd
  31. Call StackVerificationEnd
  32. !macroend
  33. Function StackVerificationStart
  34. StrCpy $0 !0
  35. StrCpy $1 !1
  36. StrCpy $2 !2
  37. StrCpy $3 !3
  38. StrCpy $4 !4
  39. StrCpy $5 !5
  40. StrCpy $6 !6
  41. StrCpy $7 !7
  42. StrCpy $8 !8
  43. StrCpy $9 !9
  44. StrCpy $R0 !R0
  45. StrCpy $R1 !R1
  46. StrCpy $R2 !R2
  47. StrCpy $R3 !R3
  48. StrCpy $R4 !R4
  49. StrCpy $R5 !R5
  50. StrCpy $R6 !R6
  51. StrCpy $R7 !R7
  52. StrCpy $R8 !R8
  53. StrCpy $R9 !R9
  54. FunctionEnd
  55. Function StackVerificationEnd
  56. IfErrors +3
  57. DetailPrint 'PASSED $FUNCTION no errors'
  58. goto +2
  59. DetailPrint 'FAILED $FUNCTION error'
  60. StrCmp $0 '!0' 0 error
  61. StrCmp $1 '!1' 0 error
  62. StrCmp $2 '!2' 0 error
  63. StrCmp $3 '!3' 0 error
  64. StrCmp $4 '!4' 0 error
  65. StrCmp $5 '!5' 0 error
  66. StrCmp $6 '!6' 0 error
  67. StrCmp $7 '!7' 0 error
  68. StrCmp $8 '!8' 0 error
  69. StrCmp $9 '!9' 0 error
  70. StrCmp $R0 '!R0' 0 error
  71. StrCmp $R1 '!R1' 0 error
  72. StrCmp $R2 '!R2' 0 error
  73. StrCmp $R3 '!R3' 0 error
  74. StrCmp $R4 '!R4' 0 error
  75. StrCmp $R5 '!R5' 0 error
  76. StrCmp $R6 '!R6' 0 error
  77. StrCmp $R7 '!R7' 0 error
  78. StrCmp $R8 '!R8' 0 error
  79. StrCmp $R9 '!R9' 0 error
  80. DetailPrint 'PASSED $FUNCTION stack'
  81. goto end
  82. error:
  83. DetailPrint 'FAILED $FUNCTION stack'
  84. ; MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2
  85. ; quit
  86. end:
  87. FunctionEnd
  88. Section Locate
  89. ${StackVerificationStart} Locate
  90. ${Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'LocateCallback'
  91. ${StackVerificationEnd}
  92. SectionEnd
  93. Function LocateCallback
  94. ; MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
  95. ; StrCpy $0 StopLocate
  96. Push $0
  97. FunctionEnd
  98. Section GetSize
  99. ${StackVerificationStart} GetSize
  100. ${GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
  101. ${StackVerificationEnd}
  102. SectionEnd
  103. Section DriveSpace
  104. ${StackVerificationStart} DriveSpace
  105. ${DriveSpace} 'C:\' '/D=F /S=M' $OUT1
  106. ${StackVerificationEnd}
  107. SectionEnd
  108. Section GetDrives
  109. ${StackVerificationStart} GetDrives
  110. ${GetDrives} 'FDD+CDROM' 'GetDrivesCallback'
  111. ${StackVerificationEnd}
  112. SectionEnd
  113. Function GetDrivesCallback
  114. ; MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
  115. ; StrCpy $0 StopGetDrives
  116. Push $0
  117. FunctionEnd
  118. Section GetTime
  119. ${StackVerificationStart} GetTime
  120. ${GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
  121. ${StackVerificationEnd}
  122. SectionEnd
  123. Section GetFileAttributes
  124. ${StackVerificationStart} GetFileAttributes
  125. ${GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
  126. ${StackVerificationEnd}
  127. SectionEnd
  128. Section GetFileVersion
  129. ${StackVerificationStart} GetFileVersion
  130. ${GetFileVersion} '$WINDIR\explorer.exe' $OUT1
  131. ${StackVerificationEnd}
  132. SectionEnd
  133. Section GetExeName
  134. ${StackVerificationStart} GetExeName
  135. ${GetExeName} $OUT1
  136. ${StackVerificationEnd}
  137. SectionEnd
  138. Section GetExePath
  139. ${StackVerificationStart} GetExePath
  140. ${GetExePath} $OUT1
  141. ${StackVerificationEnd}
  142. SectionEnd
  143. Section GetParameters
  144. ${StackVerificationStart} GetParameters
  145. # basic stuff
  146. StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe"'
  147. ${GetParameters} $OUT1
  148. StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe" test'
  149. ${GetParameters} $OUT2
  150. StrCpy $CMDLINE '"$PROGRAMFILES\Something\Hello.exe" "test"'
  151. ${GetParameters} $OUT3
  152. StrCpy $CMDLINE 'C:\Hello.exe'
  153. ${GetParameters} $OUT4
  154. StrCpy $CMDLINE 'C:\Hello.exe test'
  155. ${GetParameters} $OUT5
  156. StrCpy $CMDLINE 'C:\Hello.exe "test"'
  157. ${GetParameters} $OUT6
  158. StrCpy $CMDLINE 'C:\Hello.exe test test '
  159. ${GetParameters} $OUT7
  160. ${If} $OUT1 != ""
  161. ${OrIf} $OUT2 != "test"
  162. ${OrIf} $OUT3 != '"test"'
  163. ${OrIf} $OUT4 != ""
  164. ${OrIf} $OUT5 != "test"
  165. ${OrIf} $OUT6 != '"test"'
  166. ${OrIf} $OUT7 != 'test test'
  167. SetErrors
  168. ${EndIf}
  169. # some corner cases
  170. StrCpy $CMDLINE ''
  171. ${GetParameters} $OUT1
  172. StrCpy $CMDLINE '"'
  173. ${GetParameters} $OUT2
  174. StrCpy $CMDLINE '""'
  175. ${GetParameters} $OUT3
  176. StrCpy $CMDLINE '"" test'
  177. ${GetParameters} $OUT4
  178. StrCpy $CMDLINE ' test'
  179. ${GetParameters} $OUT5
  180. StrCpy $CMDLINE ' test' # left over bug(?) from old GetParameters
  181. # it starts looking for ' ' from the third char
  182. ${GetParameters} $OUT6
  183. StrCpy $CMDLINE ' '
  184. ${GetParameters} $OUT7
  185. ${If} $OUT1 != ""
  186. ${OrIf} $OUT2 != ""
  187. ${OrIf} $OUT3 != ""
  188. ${OrIf} $OUT4 != ""
  189. ${OrIf} $OUT5 != ""
  190. ${OrIf} $OUT6 != ""
  191. ${OrIf} $OUT7 != ""
  192. SetErrors
  193. ${EndIf}
  194. ${StackVerificationEnd}
  195. SectionEnd
  196. Section GetOptions
  197. ${StackVerificationStart} GetOptions
  198. ${GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  199. StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  200. ${GetOptions} '-TMP=temp.tmp -INSTDIR="C:/Program Files/Common Files" -SILENT=yes' '-INSTDIR=' $OUT1
  201. StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  202. ${GetOptions} "/INSTDIR='C:/Program Files/Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
  203. StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  204. StrCpy $OUT1 '/INSTDIR=`C:/Program Files/Common Files` /SILENT=yes'
  205. ${GetOptions} '$OUT1' '/INSTDIR=' $OUT1
  206. StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  207. ${GetOptions} '/SILENT=yes /INSTDIR=C:\Program Files\Common Files' '/INSTDIR=' $OUT1
  208. StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  209. ${GetOptions} "/INSTDIR=common directory: 'C:\Program Files\Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
  210. StrCmp $OUT1 "common directory: 'C:\Program Files\Common Files'" 0 error
  211. ${GetOptions} '/INSTDIR=WxxxW /SILENT=yes' '/INSTDIR=' $OUT1
  212. StrCmp $OUT1 'WxxxW' 0 error
  213. ${GetOptions} "/Prm='/D=True' /D=1" '/D=' $OUT1
  214. StrCmp $OUT1 "1" 0 error
  215. ${GetOptions} "/D=1 /Prm='/D=True'" '/Prm=' $OUT1
  216. StrCmp $OUT1 "/D=True" 0 error
  217. ${GetOptions} `/D=1 /Prm='/D="True" /S="/Temp"'` '/Prm=' $OUT1
  218. StrCmp $OUT1 '/D="True" /S="/Temp"' 0 error
  219. ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR=' $OUT1
  220. StrCmp $OUT1 '"C:/Program Files/Common Files"' 0 error
  221. ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR*=' $OUT1
  222. IfErrors 0 error
  223. StrCmp $OUT1 '' 0 error
  224. ${GetOptions} `/INSTDIR="C:/Program Files/Common Files" /SILENT=yes` '' $OUT1
  225. IfErrors 0 error
  226. StrCmp $OUT1 '' 0 error
  227. ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
  228. IfErrors error
  229. StrCmp $OUT1 '' 0 error
  230. goto +2
  231. error:
  232. SetErrors
  233. ${StackVerificationEnd}
  234. SectionEnd
  235. Section GetOptionsS
  236. ${StackVerificationStart} GetOptionsS
  237. ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  238. IfErrors error
  239. StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  240. ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/Instdir=' $OUT1
  241. IfErrors 0 error
  242. StrCmp $OUT1 '' 0 error
  243. ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
  244. IfErrors error
  245. StrCmp $OUT1 '' 0 error
  246. goto +2
  247. error:
  248. SetErrors
  249. ${StackVerificationEnd}
  250. SectionEnd
  251. Section GetRoot
  252. ${StackVerificationStart} GetRoot
  253. ${GetRoot} 'C:\Program Files\NSIS' $OUT1
  254. StrCmp $OUT1 'C:' 0 error
  255. ${GetRoot} '\\SuperPimp\NSIS\Source\exehead\Ui.c' $OUT1
  256. StrCmp $OUT1 '\\SuperPimp\NSIS' 0 error
  257. ${GetRoot} '\\Program Files\NSIS' $OUT1
  258. StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  259. ${GetRoot} '\\Program Files\NSIS\' $OUT1
  260. StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  261. ${GetRoot} '\\Program Files\NSIS\Source\exehead\Ui.c' $OUT1
  262. StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  263. ${GetRoot} '\Program Files\NSIS' $OUT1
  264. StrCmp $OUT1 '' 0 error
  265. goto +2
  266. error:
  267. SetErrors
  268. ${StackVerificationEnd}
  269. SectionEnd
  270. Section GetParent
  271. ${StackVerificationStart} GetParent
  272. ${GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  273. StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  274. ${GetParent} 'C:\Program Files\Winamp\plugins' $OUT1
  275. StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  276. ${GetParent} 'C:\Program Files\Winamp\plugins\' $OUT1
  277. StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  278. ${GetParent} 'C:\' $OUT1
  279. StrCmp $OUT1 '' 0 error
  280. goto +2
  281. error:
  282. SetErrors
  283. ${StackVerificationEnd}
  284. SectionEnd
  285. Section GetFileName
  286. ${StackVerificationStart} GetFileName
  287. ${GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  288. StrCmp $OUT1 'uninstwa.exe' 0 error
  289. ${GetFileName} 'uninstwa.exe' $OUT1
  290. StrCmp $OUT1 'uninstwa.exe' 0 error
  291. ${GetFileName} 'C:\Program Files\Winamp\plugins' $OUT1
  292. StrCmp $OUT1 'plugins' 0 error
  293. ${GetFileName} 'C:\Program Files\Winamp\plugins\' $OUT1
  294. StrCmp $OUT1 'plugins' 0 error
  295. goto +2
  296. error:
  297. SetErrors
  298. ${StackVerificationEnd}
  299. SectionEnd
  300. Section GetBaseName
  301. ${StackVerificationStart} GetBaseName
  302. ${GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  303. StrCmp $OUT1 'uninstwa' 0 error
  304. ${GetBaseName} 'uninstwa.exe' $OUT1
  305. StrCmp $OUT1 'uninstwa' 0 error
  306. ${GetBaseName} 'C:\Program Files\Winamp\plugins' $OUT1
  307. StrCmp $OUT1 'plugins' 0 error
  308. ${GetBaseName} 'C:\Program Files\Winamp\plugins\' $OUT1
  309. StrCmp $OUT1 '' 0 error
  310. goto +2
  311. error:
  312. SetErrors
  313. ${StackVerificationEnd}
  314. SectionEnd
  315. Section GetFileExt
  316. ${StackVerificationStart} GetFileExt
  317. ${GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  318. StrCmp $OUT1 'exe' 0 error
  319. ${GetFileExt} 'uninstwa.exe' $OUT1
  320. StrCmp $OUT1 'exe' 0 error
  321. ${GetFileExt} 'C:\Program Files\Winamp\plugins' $OUT1
  322. StrCmp $OUT1 '' 0 error
  323. ${GetFileExt} 'C:\Program Files\Winamp\plugins\' $OUT1
  324. StrCmp $OUT1 '' 0 error
  325. goto +2
  326. error:
  327. SetErrors
  328. ${StackVerificationEnd}
  329. SectionEnd
  330. Section BannerTrimPath
  331. ${StackVerificationStart} BannerTrimPath
  332. ${BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
  333. StrCmp $OUT1 'C:\Server\...\Terminal\license.htm' 0 error
  334. ${BannerTrimPath} 'C:\12\3456\789' '3A' $OUT1
  335. StrCmp $OUT1 '' 0 error
  336. ${BannerTrimPath} 'C:\12\3456\789' '4A' $OUT1
  337. StrCmp $OUT1 'C...' 0 error
  338. ${BannerTrimPath} 'C:\12\3456\789' '11A' $OUT1
  339. StrCmp $OUT1 'C:\12\...' 0 error
  340. ${BannerTrimPath} 'C:\12\3456\789' '13A' $OUT1
  341. StrCmp $OUT1 'C:\12\...\789' 0 error
  342. ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
  343. StrCmp $OUT1 'C:\12\3456\789' 0 error
  344. ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
  345. StrCmp $OUT1 'C:\12\3456\789' 0 error
  346. ${BannerTrimPath} 'C:\12\3456\789' '11B' $OUT1
  347. StrCmp $OUT1 'C:\12\...' 0 error
  348. ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
  349. StrCmp $OUT1 'C:...' 0 error
  350. ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
  351. StrCmp $OUT1 'C:...' 0 error
  352. ${BannerTrimPath} 'C:\12\3456\789' '11C' $OUT1
  353. StrCmp $OUT1 'C:\12\34...' 0 error
  354. ${BannerTrimPath} 'C:\12\3456\789' '9D' $OUT1
  355. StrCmp $OUT1 'C:\12\...' 0 error
  356. ${BannerTrimPath} 'C:\12\3456\789' '10D' $OUT1
  357. StrCmp $OUT1 'C:\...\789' 0 error
  358. ${BannerTrimPath} 'C:\12\3456\789' '11D' $OUT1
  359. StrCmp $OUT1 'C:\1...\789' 0 error
  360. ${BannerTrimPath} '123456789' '5D' $OUT1
  361. StrCmp $OUT1 '12...' 0 error
  362. goto +2
  363. error:
  364. SetErrors
  365. ${StackVerificationEnd}
  366. SectionEnd
  367. Section DirState
  368. ${StackVerificationStart} DirState
  369. ${DirState} '$TEMP' $OUT1
  370. ${StackVerificationEnd}
  371. SectionEnd
  372. Section RefreshShellIcons
  373. ${StackVerificationStart} RefreshShellIcons
  374. ${RefreshShellIcons}
  375. ${StackVerificationEnd}
  376. SectionEnd
  377. Section WriteUninstaller
  378. goto +2
  379. WriteUninstaller '$EXEDIR\un.FileFuncTest.exe'
  380. SectionEnd
  381. ;############### UNINSTALL ###############
  382. Section un.Uninstall
  383. ${Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'un.LocateCallback'
  384. ${GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
  385. ${DriveSpace} 'C:\' '/D=F /S=M' $OUT1
  386. ${GetDrives} 'FDD+CDROM' 'un.GetDrivesCallback'
  387. ${GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
  388. ${GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
  389. ${GetFileVersion} '$WINDIR\explorer.exe' $OUT1
  390. ${GetExeName} $OUT1
  391. ${GetExePath} $OUT1
  392. ${GetParameters} $OUT1
  393. ${GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  394. ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  395. ${GetRoot} 'C:\Program Files\NSIS' $OUT1
  396. ${GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  397. ${GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  398. ${GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  399. ${GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  400. ${BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
  401. ${DirState} '$TEMP' $OUT1
  402. ${RefreshShellIcons}
  403. SectionEnd
  404. Function un.LocateCallback
  405. Push $0
  406. FunctionEnd
  407. Function un.GetDrivesCallback
  408. Push $0
  409. FunctionEnd