Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows System Dir ?
Message
From
03/05/2002 11:43:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00652411
Message ID:
00652454
Views:
23
>>>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,
While writing it was but thought I would need to explain why 260 :)
Actually I'm after a new API - 'MastersAlreadyReplied' :)
PS: You've never been picky you know. Each time you contribute I learn a new
thing.
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