home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Mother of All Windows Books
/
CD-MOM.iso
/
cd_mom
/
newsletr
/
vbz
/
vbz1-3
/
zaplib.frm
< prev
next >
Wrap
Text File
|
1993-04-25
|
2KB
|
79 lines
VERSION 2.00
Begin Form Form1
Caption = "Libraries"
Height = 3060
HelpContextID = 104
Icon = ZAPLIB.FRX:0000
KeyPreview = -1 'True
Left = 2130
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2655
ScaleWidth = 4170
Top = 1980
Width = 4290
Begin CommandButton Command1
Caption = "Ok"
Height = 495
Left = 1440
TabIndex = 1
Top = 2040
Width = 1215
End
Begin ListBox List1
Height = 1785
Left = 120
MultiSelect = 1 'Simple
Sorted = -1 'True
TabIndex = 0
Top = 120
Width = 3975
End
End
DefInt A-Z
Dim lpModule As MODULEENTRY
Declare Function GetModuleUsage Lib "KERNEL" (ByVal hModule)
Declare Sub FreeLibrary Lib "KERNEL" (ByVal hLib)
Const Reserved$ = "COMMDLGMMSYSTEMSHELLTOOLHELPVBRUN200WIN87EM"
Sub Command1_Click ()
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
hModule = List1.ItemData(i)
For X = 1 To GetModuleUsage(hModule)
FreeLibrary hModule
Next
End If
Next
WindowState = 1
End Sub
Sub Form_Load ()
WindowState = 1
End Sub
Sub Form_Resize ()
If WindowState = 0 Then
List1.Clear
lpModule.dwSize = Len(lpModule)
Res = ModuleFirst(lpModule)
While Res <> 0
P = InStr(lpModule.szExePath, Chr$(0))
ModulePath$ = Left$(lpModule.szExePath, P - 1)
P = InStr(lpModule.szModule, Chr$(0))
Module$ = Left$(lpModule.szModule, P - 1)
If (InStr(ModulePath$, ".DLL") > 0) Or (InStr(ModulePath$, ".VBX") > 0) Then
If InStr(Reserved$, Module$) = 0 Then
List1.AddItem ModulePath$
List1.ItemData(List1.NewIndex) = lpModule.hModule
End If
End If
Res = ModuleNext(lpModule)
Wend
End If
End Sub