Here you go:
Declare Function APIGetWindowsDirectory$() As String
Declare Function GetWindowsDirectory Lib "kernel32" Alias
"GetWindowsDirectoryA"
(lpBuffer As String, ByVal nSize As Integer) As
Integer
'----------------------------------------------------------------------
'APIGetWindowsSystemDirectory
'----------------------------------------------------------------------
Function APIGetWindowsSystemDirector$() As String
Dim szDir As String,
nReturnLength As Integer
OnError GoTo ErrorOccured
szDir = String$(100, " ")
nReturnLength = GetWindowsDirectory(szDir, 100)
szDir = LTrim$(RTrim$(szDir)) + "\"
APIGetWindowsSystemDirector$ = szDir
Exit Function
'-------------------------
ErrorOccured:
Note ERR_ERRORMSG & lf & Error$()
End Function
HTH,
Peter
------------------------------------------------------------------------------------------------
Peter Horsb�ll M�ller, GIS Udviklingskonsulent / GIS-Developer
Kampsax A/S - GIS Software & Solutions
Rugaardsvej 55, 5000 Odense, DK
tel: +45 6313 5013, dir:+45 6313 5008, fax: +45 6313 5090
mailto:[EMAIL PROTECTED]
www.kampsax-gis.dk and www.kampsax.dk
Authorized MapInfo Partner & Distributor in Denmark and Norway.
------------------------------------------------------------------------------------------------
Se mere om Dansk MapInfo Brugerkonference p�
http://www.kampsax-gis.dk/Default.asp?ID=296
Klik ind p� http://www.kortal.dk og se det hele lidt fra oven!
Check http://www.kortal.dk and have a look at Denmark from above!
----- Videresendt af Peter M�ller/Kampsax - 04-09-2002 07:39 -----
Jeff Spirek
<jeff.spirek@ng Til:
"'[EMAIL PROTECTED]'"
is.com.au> <[EMAIL PROTECTED]>
cc:
04-09-2002 Vedr.: MI-L Location of Windows Systems
directories through MapBasic
07:02
Hi Listers
Does anyone know the correct code to extract the location of the
windows/systems directory using the API Function GetSystemDirectory .
Regards
Jeff Spirek
NGIS Australia
47 Burswood Road
BURSWOOD WA 6100
Ph (08) 9355 2444
Fax (08) 9355 2722
http://www.ngis.com.au
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2807
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2808