Searching...
2:02 AM

Get Windows Dir

code:
Public Declare Function GetWindowsDirectory Lib "Kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long

Public Function GetWin() As String
Dim strWin As String

    strWin = Space(256)
    strPath = GetWindowsDirectory(strWin, 512)
    GetWin = Left$(strWin, strPath) & "\"

End Function

0 comments:

Post a Comment

 
Back to top!