Results 1 to 3 of 3

Thread: [RESOLVED] Get comm num from handle?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    Resolved [RESOLVED] Get comm num from handle?

    Hi again folks.

    Is there a way in C of getting the comm port number if I have a handle of said comm port?

    obviously I already know the comm number (thats how I got the handle in the first place) but I am using multiple ports and dont want to have to go passing the different numbers around along with the handles, especially when it essentially only going to lead to a more concise error message.

    Thanks
    Thanks

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Get comm num from handle?

    What about the GetCommProperties function? I'm guessing you are getting the handle via the CreateFile function?

  3. #3
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Get comm num from handle?

    Actually you might even be able to use the GetFileInformationByHandle function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width