> My VB6 USB program will not be released after program
> terminated, I don't know why.
> Does it possible I didn't close/release USB control ( CreatFlie API) in
> program?
Use the CloseHandle() API call to release a handle created with CreateFile().
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: Http://www.mvps.org/EDais/
Boki - 30 Sep 2004 13:05 GMT
Still stick in memory...@@ .... help me ....
This is DisplayUSB.vbp that shows USB devices information.
===================================================
Private Sub Form_Unload(Cancel As Integer)
Dim ControllerIndex&
Dim HostControllerName$
Dim HostControllerHandle&
Dim SA As Security_Attributes
'
For ControllerIndex& = 0 To 3
HostControllerName$ = "\\.\HCD" & ControllerIndex&
HostControllerHandle& = CreateFile(HostControllerName$, &H40000000, 2,
SA, 3, 0, 0)
CloseHandle (HostControllerHandle&)
Next ControllerIndex&
End Sub
====================================================
Best regards,
Boki.
> > My VB6 USB program will not be released after program
> > terminated, I don't know why.
[quoted text clipped - 9 lines]
> E-Mail: EDais@mvps.org
> WWW: Http://www.mvps.org/EDais/