Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / September 2004



Tip: Looking for answers? Try searching our database.

Why my program ( VB6 made .exe file) will not release after terminated?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boki - 30 Sep 2004 08:31 GMT
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.
Mike D Sutton @ Work - 30 Sep 2004 11:58 GMT
>                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/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.