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

  1. Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long   æall one line
  2.  
  3. Global Const gintMAX_SIZE% = 255
  4. Global Const gstrNULL$ = ""
  5.  
  6. Sub AddDirSep(strPathName As String)
  7.     If Right$(RTrim$(strPathName), Len(gstrSEP_DIR)) <> gstrSEP_DIR Then
  8.         strPathName = RTrim$(strPathName) & gstrSEP_DIR
  9.     End If
  10. End Sub
  11.  
  12. Function StripTerminator(ByVal strString As String) As String
  13.     Dim intZeroPos As Integer
  14.  
  15.     intZeroPos = InStr(strString, Chr$(0))
  16.     If intZeroPos > 0 Then
  17.         StripTerminator = Left$(strString, intZeroPos - 1)
  18.     Else
  19.         StripTerminator = strString
  20.     End If
  21. End Function
  22.  
  23. Function UCase16(ByVal str As String)
  24. #If Win16 Then
  25.     UCase16 = UCase$(str)
  26. #Else
  27.     UCase16 = str
  28. #End If
  29. End Function
  30.