Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows System Dir ?
Message
 
To
03/05/2002 11:19:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00652411
Message ID:
00652448
Views:
19
>>Hello,
>>
>>How can I get the windows system directory accross all OS ?
>>
>>Xavier
>
>
>* WSH
>#define SystemFolder 1
>oFs = createobject('Scripting.FileSystemObject')
>oSysFolder = oFs.GetSpecialFolder(SystemFolder)
>? 'WSH :',oSysFolder.Path
>
>*WinAPI
>declare integer GetSystemDirectory in win32API ;
>  string @ lpBuffer, integer uSize
>lpBuffer=space(300)
>lnLen=GetSystemDirectory(@lpBuffer, 300)
>? 'WinAPI :'+left(lpBuffer,lnLen)
>
Cetin

Not to be picky, but the current maximum path length is 260 (including the null terminator). This impacts not only file functions, but certain ActiveX controls such as the CommonDialogs and TreeView.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform