home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / NIVB_SRC / DLLVERS.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-06-02  |  2.2 KB  |  75 lines

  1. VERSION 2.00
  2. Begin Form DLLVersionForm 
  3.    Caption         =   "DLLVersions"
  4.    Height          =   2220
  5.    Left            =   3075
  6.    LinkMode        =   1  'Source
  7.    LinkTopic       =   "Form2"
  8.    ScaleHeight     =   1815
  9.    ScaleWidth      =   2775
  10.    Top             =   1245
  11.    Width           =   2895
  12.    Begin CommandButton OKButton 
  13.       Caption         =   "OK"
  14.       Height          =   375
  15.       Left            =   1080
  16.       TabIndex        =   0
  17.       Top             =   1320
  18.       Width           =   735
  19.    End
  20.    Begin Label Label3 
  21.       Alignment       =   2  'Center
  22.       Height          =   255
  23.       Left            =   120
  24.       TabIndex        =   3
  25.       Top             =   960
  26.       Width           =   2535
  27.    End
  28.    Begin Label Label2 
  29.       Alignment       =   2  'Center
  30.       Height          =   255
  31.       Left            =   120
  32.       TabIndex        =   2
  33.       Top             =   600
  34.       Width           =   2535
  35.    End
  36.    Begin Label Label1 
  37.       Alignment       =   2  'Center
  38.       Height          =   255
  39.       Left            =   120
  40.       TabIndex        =   1
  41.       Top             =   240
  42.       Width           =   2535
  43.    End
  44. Sub Form_Load ()
  45.     Label1.Caption = GetDLLVersion("NWNETAPI.DLL")
  46.     Label2.Caption = GetDLLVersion("NWIPXSPX.DLL")
  47.     Label3.Caption = GetDLLVersion("NWPSERV.DLL")
  48. End Sub
  49. Function GetDLLVersion (DLLFileName$) As String
  50.     winDir$ = Environ$("windir")
  51.     DLLFile$ = winDir$ + "\" + DLLFileName$
  52.     fileFound$ = Dir$(DLLFile$)
  53.     If (Len(fileFound$) = 0) Then
  54.         GetDLLVersion = DLLFileName$ + " not found"
  55.     Else
  56.         Open DLLFile$ For Binary Access Read Shared As #1
  57.         Do While Not EOF(1)
  58.             buffer$ = Input$(8, #1)
  59.             If (buffer$ = "VeRsIoN=") Then
  60.                 Do
  61.                     char$ = Input$(1, #1)
  62.                     version$ = version$ + char$
  63.                 Loop While (char$ <> Chr$(0))
  64.                 GoTo Break
  65.             End If
  66.         Loop
  67. Break:
  68.         Close
  69.     End If
  70.     GetDLLVersion = version$
  71. End Function
  72. Sub OKButton_Click ()
  73.     Unload DLLVersionForm
  74. End Sub
  75.