home *** CD-ROM | disk | FTP | other *** search
- Public Function GetWindowsDir() As String
- Dim strBuf As String
-
- strBuf = Space$(gintMAX_SIZE)
-
- 'Get the windows directory and then trim the buffer to the exact length
- 'returned and add a dir sep (backslash) if the API didn't return one
-
- If GetWindowsDirectory(strBuf, gintMAX_SIZE) > 0 Then
- strBuf = StripTerminator$(strBuf)
- AddDirSep strBuf
-
- GetWindowsDir = UCase16(strBuf)
- Else
- GetWindowsDir = gstrNULL
- End If
- End Function
-