home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / killdll / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  1.4 KB  |  53 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Kill DLL"
  4.    ClientHeight    =   1515
  5.    ClientLeft      =   1455
  6.    ClientTop       =   2190
  7.    ClientWidth     =   2595
  8.    Height          =   1920
  9.    Left            =   1395
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1515
  13.    ScaleWidth      =   2595
  14.    Top             =   1845
  15.    Width           =   2715
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Dump DLL"
  18.       Default         =   -1  'True
  19.       Height          =   315
  20.       Left            =   540
  21.       TabIndex        =   1
  22.       Top             =   1080
  23.       Width           =   1215
  24.    End
  25.    Begin TextBox Text1 
  26.       Height          =   315
  27.       Left            =   120
  28.       TabIndex        =   0
  29.       Top             =   600
  30.       Width           =   2355
  31.    End
  32.    Begin Label Label1 
  33.       Caption         =   "DLL Filename to unload"
  34.       Height          =   255
  35.       Left            =   120
  36.       TabIndex        =   2
  37.       Top             =   240
  38.       Width           =   2295
  39.    End
  40. Sub Command1_Click ()
  41.     Dim dHndl%
  42.     dHndl = LoadLibrary((text1.text))
  43.     If dHndl >= 32 Then
  44.         Do While GetModuleUsage(dHndl) > 0
  45.             FreeLibrary (dHndl)
  46.         Loop
  47.         MsgBox "DLL Dumped"
  48.     End If
  49. End Sub
  50. Sub Form_Load ()
  51.     text1.text = Command$
  52. End Sub
  53.