ok, here we go. this is my code: invoke GetCurrentDirectoryA,128,ADDR currentdir invoke lstrcpy,ADDR inipath,ADDR currentdir invoke lstrcat,ADDR inipath,ADDR ininame invoke GetShortPathNameA,ADDR inipath,ADDR inishort,64 invoke MessageBoxA,0,ADDR inishort,ADDR caption,MB_OK it all works apart from GetShortPathNameA fails. it compiles ok and everything but when i run it the message box is just blank. when i change it so the message box displays the normal (long) path name then its fine. however i want the short path name :( why is it failing? please help. skud
Posted on 2001-04-28 12:19:00 by skud
i have finally done it after god knows how long on icq. i have used this function alot but when i had just started to use TASM (not that im not a newb any more:) and i had forgotten how to use it. lol. anyway, here is the correct code. the problem was that i was trying to get the short path name of a path which included a file name. this caused it to fail. invoke GetCurrentDirectory,128,ADDR currentdir invoke lstrcpy,ADDR inipath,ADDR currentdir invoke GetShortPathName,ADDR inipath,ADDR inishort,64 invoke lstrcat,ADDR inishort,ADDR ininame invoke MessageBox,0,ADDR inishort,ADDR caption,MB_OK thanks alot disease_2000. This message was edited by skud, on 4/28/2001 1:55:21 PM
Posted on 2001-04-28 13:54:00 by skud