home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1995 November / PCPRO_NOV95.ISO / code / vb / code_e.txt < prev    next >
Encoding:
Text File  |  1995-09-08  |  502 b   |  18 lines

  1. Public Function GetWindowsDir() As String
  2.     Dim strBuf As String
  3.  
  4.     strBuf = Space$(gintMAX_SIZE)
  5.  
  6.     'Get the windows directory and then trim the buffer to the exact length
  7.     'returned and add a dir sep (backslash) if the API didn't return one
  8.  
  9.     If GetWindowsDirectory(strBuf, gintMAX_SIZE) > 0 Then
  10.         strBuf = StripTerminator$(strBuf)
  11.         AddDirSep strBuf
  12.  
  13.         GetWindowsDir = UCase16(strBuf)
  14.     Else
  15.         GetWindowsDir = gstrNULL
  16.     End If
  17. End Function
  18.