I got files loading up properly. Dynamically allocating memory to store data in etc. But one part is not as nice as I would like it to be. The path parameter for CreatFile is a hard coded string. Not good if Someone want to install my program from another drive/directory. SearchPath and GetFullPath seem like the best canidates to help me find where the program is installed. It seems with either I should be able to get a path to a file at the top of my programs directory structure, and using what I know about my programs directory structure, construct a path to any file in the structure. Right idea for doing this? Any experiences? Just thought of another related question. How does this kind of task fit in with say.. a Quake or Half-Life maps directory, or another situation where the program might have to look for new files present in it's directories?
Posted on 2001-05-11 18:09:00 by asm_happy
i never used these APIs, but i had good result using GetModuleFileName(), using 0 has the module handle, and searchingt backward for the "\" then you got the directoy the main .exe was running
Posted on 2001-05-11 18:14:00 by vecna