Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setup sys(2023)
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00785617
Message ID:
00785621
Views:
55
#DEFINE MAX_PATH   260

DECLARE INTEGER GetTempPath IN kernel32;
	INTEGER nBufferLength, STRING @lpBuffer

DECLARE INTEGER GetLongPathName IN kernel32;
	STRING lpszShortPath, STRING @lpszLongPath, INTEGER cchBuffer

? GetLongTempPath()

FUNCTION GetLongTempPath
	LOCAL cPath, cLongPath, nBufsize
	cPath = Repli(Chr(0),MAX_PATH)
	cLongPath = Repli(Chr(0),MAX_PATH*2)
	nBufsize = GetTempPath(Len(cPath), @cPath)
	cPath = LEFT(cPath, nBufsize)
	= GetLongPathName(cPath, @cLongPath, Len(cLongPath))
RETURN SUBSTR(cLongPath, 1,AT(Chr(0),cLongPath)-1)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform