how can i get the path of my running aplication ...like AppPath on Visual Basic?:confused:
Posted on 2002-12-03 09:55:48 by DrBios
I think the general accepted idea is:



invoke GetModuleFileName, 0, ADDR Buffer, 256
or eax, eax ; check that something went into the buffer!
jz error_no_chars_copied

add eax, offset Buffer

@@:
dec eax
cmp BYTE PTR [eax], "\"
jne @B

mov BYTE PTR [eax+1], 0


It gets asked a lot, so the search feature should have done it.
Posted on 2002-12-03 10:12:48 by JimmyClif
GetModuleFileName or GetCommandLine(?)... but you have to strip some
things. i would use the first as it is very easy to cut the actual filename away...

sorry, that was a little bit to slow
Posted on 2002-12-03 10:15:02 by mob
DrBios,
please save me some work and post in the correct forum next time.
Thanks.
Posted on 2002-12-03 10:19:13 by bazik
Check the GetAppPath function from the masm32 library (masm32.lib) and don't forget:
:)

Regards,

Vortex
Posted on 2002-12-04 08:40:39 by Vortex