JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1658
|
Re: Windows Path
There's numerous things you can find, some are based on other values, but these are common ones (that I found easily:
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function GetAllUsersProfileDirectory Lib "userenv.dll" Alias "GetAllUsersProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
Private Declare Function GetDefaultUserProfileDirectory Lib "userenv.dll" Alias "GetDefaultUserProfileDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
Private Declare Function GetProfilesDirectory Lib "userenv.dll" Alias "GetProfilesDirectoryA" (ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
Private Declare Function GetUserProfileDirectory Lib "userenv.dll" Alias "GetUserProfileDirectoryA" (ByVal hToken As Long, ByVal lpProfileDir As String, lpcchSize As Long) As Boolean
Private Sub Main()
Dim WinDir As String
WinDir = String(256, 0)
GetWindowsDirectory WinDir, Len(WinDir)
Debug.Print Left(WinDir, InStr(1, WinDir, Chr(0)))
End Sub
|
[Edited by JLRodgers on 15-02-2003 at 11:54 AM GMT]
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|