How to get the exe directory
Posted: Sun Jan 06, 2008 6:01 am
Here is a neat thing you can do if you ever get lost in your current directory. :roll:
Code: Select all
Define lpme.MODULEENTRY32
h=CreateToolhelp32Snapshot_($00000008,GetCurrentProcessId_())
lpme\dwSize=SizeOf(MODULEENTRY32)
Module32First_(h,@lpme)
For i=0 To 255
module.s+Chr(lpme\szModule[i])
Next i
For i=0 To 259
path.s+Chr(lpme\szExePath[i])
Next i
Debug module.s
Debug path.s