Public Declare Function GetWindowsDirectory Lib _
"kernel32" Alias "GetWindowsDirectoryA" _
(ByVal lpBuffer As String, ByVal nSize As Long) _
As Long
Public Function GetWin() As String
Dim P As Long
Dim tmpString As String
tmpString = String$(255, Chr(13))
P = GetWindowsDirectory(tmpString, 255)
GetWin = Mid$(tmpString, 1, InStr(1, tmpString, _
Chr(13), vbTextCompare) - 2)
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.