Get Windows directory using an API call.
Get Windows directory using an API call.
API Declarations
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Rate Get Windows directory using an API call.
(2(2 Vote))
Dim lngReturn As Long
Dim strWindowsDirectory As String
strBuffer = Space$(MAX_PATH)
lngReturn = GetWindowsDirectory(strBuffer, MAX_PATH)
strWindowsDirectory = Left$(strBuffer, Len(strBuffer) - 1)
Get Windows directory using an API call. Comments
No comments yet — be the first to post one!
Post a Comment