there's probably an api call for this but i dont know it. i need to get the directoy location of where my app is executed from.
You can either use "GetCurrentDirectory" or "GetModuleFileName" (and parse the returned string afterwards).
If you need an example, just tell me, and I put a quick one together!
If you need an example, just tell me, and I put a quick one together!
m32lib from version 7 of the masm package has a function called GetAppPath which does exactly what you want.
Thomas
Thomas
The current directory may sometimes be different from the app directory... so, in that case, GetCurrentDirectory won't always do what is *expected*.
The only secure way I know is to call GetModuleFileName (well, maybe with GetCommandLine too... but we don't need the command line params there).
It does returns the path and the exe name (with extension)... you just have to put a NULL character after the last '\' of the string (the way m32lib's GetAppPath works).
Have a nice week-end !
The only secure way I know is to call GetModuleFileName (well, maybe with GetCommandLine too... but we don't need the command line params there).
It does returns the path and the exe name (with extension)... you just have to put a NULL character after the last '\' of the string (the way m32lib's GetAppPath works).
Have a nice week-end !
thanks guys! that info came in very handy.:alright: