次の方法で共有


IOCTL_PSL_NOTIFY (Compact 2013)

10/16/2014

This I/O control message is used by device drivers if a process is exiting, that is, its main thread terminates, while one or more other threads are running. It can also be used when secondary threads that are blocked in a system call do not exit cleanly when requested by the scheduler. This I/O control provides a mechanism for the system call implementers to unblock threads belonging to processes that have been terminated. This message can be sent with COM_IOControl.

Syntax

BOOL COM_IOControl(
    DWORD dwOpenData,         // used for return value
    DWORD dwIoControlCode,    // use IOCTL_PSL_NOTIFY
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned   // number of bytes returned
);

Parameters

  • dwOpenData
    Not used.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_PSL_NOTIFY for this operation.
  • nInBufferSize
    [in] Set to sizeof(DEVICE_PSL_NOTIFY), the size of lpInBuffer.
  • lpOutBuffer
    [out] Not used; set to NULL.
  • nOutBufferSize
    [out] Not used; set to zero.
  • lpBytesReturned
    [out] Not used; set to NULL.

Return Values

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

Device drivers use this IOCTL to perform custom processing not handled by the XXX_Close (Device Manager) function.

If threads owned by processes that no longer exit are blocked in a call to a driver, the OS uses this I/O control to notify the driver to unblock those threads.

The OS uses this I/O control when all of the following conditions are true:

  • The main application thread exits.
  • The application has other threads still running.
  • The application has open file handles that refer to the device.

Requirements

Header

pkfuncs.h

See Also

Reference

Other OAL IOCTLs