Code Comments
Programming Forum and web based access to our favorite programming groups.Dear All, 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? Best regards, Boki.
Post Follow-up to this message> 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/
Post Follow-up to this messageStill 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. "Mike D Sutton @ Work" <EDais@mvps.org> ¦b¶l¥ó news:erkvuxtpEHA.3724@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g... > > 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/ > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.