srinivas_gowd
asked on
How To Find the windowssystem directory without using API Calls from Visual Basic
Hi all
Can Any body tell me "How to get the windows system directory without using visual basic "
thanks in advantage
Srinivas Gowd
srinivas_gowd@yahoo.co.uk
Can Any body tell me "How to get the windows system directory without using visual basic "
thanks in advantage
Srinivas Gowd
srinivas_gowd@yahoo.co.uk
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Public Const MAX_PATH = 260
Public Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function GetSystemDir() As String
Dim strBuffer As String
Dim lngReturn As Long
Dim strWindowsSystemDirectory As String
strBuffer = Space$(MAX_PATH)
lngReturn = GetSystemDirectory(strBuff er, MAX_PATH)
strWindowsSystemDirectory = Left$(Trim$(strBuffer), Len(Trim$(strBuffer)) - 1)
GetSystemDir = strWindowsSystemDirectory
End Function
Public Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function GetSystemDir() As String
Dim strBuffer As String
Dim lngReturn As Long
Dim strWindowsSystemDirectory As String
strBuffer = Space$(MAX_PATH)
lngReturn = GetSystemDirectory(strBuff
strWindowsSystemDirectory = Left$(Trim$(strBuffer), Len(Trim$(strBuffer)) - 1)
GetSystemDir = strWindowsSystemDirectory
End Function
to me that is an API call or not ;)
haha, if not using VB, then code is not applicable. :)
Accept bruintje's comment as answer
Moderator, my recommended disposition is:
Accept bruintje's comment(s) as an answer.
DanRollins -- EE database cleanup volunteer
Accept bruintje's comment(s) as an answer.
DanRollins -- EE database cleanup volunteer
echo %WINDIR%