Windows Dev Center

Expand Minimize

CloseThreadpoolIo function

Releases the specified I/O completion object.

Syntax


VOID WINAPI CloseThreadpoolIo(
  _Inout_ PTP_IO pio
);

Parameters

pio [in, out]

A TP_IO structure that defines the I/O completion object. The CreateThreadpoolIo function returns this structure.

Return value

This function does not return a value.

Remarks

The I/O completion object is freed immediately if there are no outstanding callbacks; otherwise, the I/O completion object is freed asynchronously after the outstanding callbacks complete.

You should close the associated file handle and wait for all outstanding overlapped I/O operations to complete before calling this function—you must not cause any more overlapped I/O operations to occur after calling this function.

It may be necessary to cancel threadpool I/O notifications to prevent memory leaks. For more information, see CancelThreadpoolIo.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h on Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Threadpoolapiset.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CancelThreadpoolIo
CreateThreadpoolIo
StartThreadpoolIo
Thread Pools
WaitForThreadpoolIoCallbacks

 

 

Community Additions

ADD
Show:
© 2015 Microsoft