Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange directories from sys(16) , curdir()
Message
From
13/04/2002 09:54:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/04/2002 09:17:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00644667
Message ID:
00644670
Views:
10
>Discovered quite mysterious situation in VFP7( don't remember in VFP6 ). When .exe is run from Wise InstallerMaster 8.14 doing some post install tasks then certain functions returning current directory or including it such as
>
>sys(5)+curdir()
>or
>sys(16)
>
>return sort of Dos path c:\outbou~3 instead of c:\outbound123
>When the same .exe is run from Windows Explorer the directory returned is okay.
>Any clues what's going on and how to overcome it?
>
>Thank you
>Michael

Michael,
What would it matter. In any case they're same dirs. But if you're desperate to correct it you could use winAPI :
DECLARE integer GetLongPathName IN WIN32API ;
	string @ lpszShortPath, string @ lpszLongPath, integer cchBuffer
DECLARE integer GetShortPathName IN WIN32API ;
  string @ lpszLongPath, string @ lpszShortPath, integer cchBuffer

lcDir = SYS(5)+CURDIR()
STORE SPACE(300) TO lpszShortPath, lpszLongPath
lnLen = GetShortPathName(lcDir,@lpszShortPath, 300)
? SUBSTR(lpszShortPath,1,lnLen)
lnLen = GetLongPathName(SUBSTR(lpszShortPath,1,lnLen),@lpszLongPath,300)
? SUBSTR(lpszLongPath,1,lnLen)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform