Closing a handle

This is a discussion on Closing a handle within the C++ Programming forums, part of the General Programming Boards category; I have opened a handle for a port using CreateFile() but don't know how to close it. Can you help ...

  1. #1
    swordfish
    Guest

    Closing a handle

    I have opened a handle for a port using CreateFile() but don't know how to close it. Can you help me?

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    ummmm the rather imaginatively titled CloseHandle (filehandle) will do the job. Dont you guys ever read the documentation that comes with a compiler!
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting other processes class names
    By Hawkin in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2008, 05:02 PM
  2. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 04:36 AM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 10:37 AM
  5. closing handle
    By swordfish in forum C++ Programming
    Replies: 6
    Last Post: 10-18-2001, 07:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21