Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to Free a USB port on VB.NET

How to Free a USB port on VB.NET

Scheduled Pinned Locked Moved Visual Basic
csharptutorial
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elRaptor
    wrote on last edited by
    #1

    Hello All: I'm using an SDK from a device that uses the USB to communicate in the SDK theres is a function that Initializes the port but there is no function or method to free the port, I already try to contact the vendor but I am not having any responce so if someone can helpme whit this, I will very tankful. JA

    D 1 Reply Last reply
    0
    • E elRaptor

      Hello All: I'm using an SDK from a device that uses the USB to communicate in the SDK theres is a function that Initializes the port but there is no function or method to free the port, I already try to contact the vendor but I am not having any responce so if someone can helpme whit this, I will very tankful. JA

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      If there isn't a function to Close/Release/Free the port, then your going to have to contact the manufacturer and find out why and what should be done. Another possibility is searching for any sample code, either in the docs for the SDK or on the web, that shows what should be used. But, as with any SDK, what the procedures are and what function names are used depends ENTIRELY on the SDK and the device your using. RageInTheMachine9532

      E 1 Reply Last reply
      0
      • D Dave Kreskowiak

        If there isn't a function to Close/Release/Free the port, then your going to have to contact the manufacturer and find out why and what should be done. Another possibility is searching for any sample code, either in the docs for the SDK or on the web, that shows what should be used. But, as with any SDK, what the procedures are and what function names are used depends ENTIRELY on the SDK and the device your using. RageInTheMachine9532

        E Offline
        E Offline
        elRaptor
        wrote on last edited by
        #3

        Thanks for your response, I have other question, when I exit the application the port, becomes available, is there a way to close this reference in the application?, or in the main form ?(This is were I'am using this device). Javier Ayala

        D 1 Reply Last reply
        0
        • E elRaptor

          Thanks for your response, I have other question, when I exit the application the port, becomes available, is there a way to close this reference in the application?, or in the main form ?(This is were I'am using this device). Javier Ayala

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          The port becomes available because when your app quits, it releases its resources. This is apparently causing the API to close the port it has open. Once again, it's all in the SDK, there is no standard method of talking to all devices when using an SDK. It MUST be done through calls into the SDK. But if they are not documented, your best bet is the manufacturer. RageInTheMachine9532

          E 1 Reply Last reply
          0
          • D Dave Kreskowiak

            The port becomes available because when your app quits, it releases its resources. This is apparently causing the API to close the port it has open. Once again, it's all in the SDK, there is no standard method of talking to all devices when using an SDK. It MUST be done through calls into the SDK. But if they are not documented, your best bet is the manufacturer. RageInTheMachine9532

            E Offline
            E Offline
            elRaptor
            wrote on last edited by
            #5

            Tanks, I already contact the vendor of the device and It toll me that It doesnt have this method, so I thing I am going to try a low level approach, what you thing? JA

            D 1 Reply Last reply
            0
            • E elRaptor

              Tanks, I already contact the vendor of the device and It toll me that It doesnt have this method, so I thing I am going to try a low level approach, what you thing? JA

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Probably possible, but if your SDK doesn't have to functionality to close a port that it opens, be prepared for a crash when you close the port, but not have the SDK release its resources. RageInTheMachine9532

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups