The CloseHandle function closes an open object handle.
BOOL CloseHandle(
HANDLE hObject |
// handle to object to close |
); |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The CloseHandle function closes handles to the following objects:
CloseHandle invalidates the specified object handle, decrements the object’s handle count, and performs object retention checks. Once the last handle to an object is closed, the object is removed from the operating system.
This function does not close module objects.
Use CloseHandle to close handles returned by calls to the CreateFile function. Use FindClose to close handles returned by calls to the FindFirstFile function.
Closing an invalid handle raises an exception. This includes closing a handle twice, not checking the return value and closing an invalid handle, and using CloseHandle on a handle returned by FindFirstFile.
CreateFile, DeleteFile, FindClose, FindFirstFile
file: /Techref/os/win/api/win32/func/src/f06_4.htm, 2KB, , updated: 2001/6/23 22:02, local time: 2024/12/8 19:53,
18.97.14.82:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/os/win/api/win32/func/src/f06_4.htm"> CloseHandle</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.