Share via


IOCTL_UNIT_DEREGISTER_SUBUNIT (Windows CE 5.0)

Send Feedback

This IOCTL permits a subunit to remove itself from global consideration to the unit filter driver. The DeviceIoControl function calls this IOCTL.

Parameters

  • hDevice
    [in] Handle to the target object. To get a device handle, call the CreateFile function with a name obtained dynamically from the SetupDiEnumDeviceInterfaces function.
  • dwIoControlCode
    [in] Set to IOCTL_UNIT_DEREGISTER_SUBUNIT. This value identifies the target operation and the type of device on which to perform it.
  • lpInBuffer
    [in] Must be completed with a properly initialized UNIT_RegisterSubunit_Request structure. The uds_RegistrationToken member must be pre-initialized.
  • BufferSize
    [in] Set to sizeof(UNIT_DeregisterSubunit_Request).
  • lpOutBuffer
    [in] Unused. Set to NULL.
  • nOutBufferSize
    [in] Unused. Set to 0.
  • lpBytesReturned
    [out] Pointer to a DWORD variable that receives the actual count of bytes returned by the function in the output buffer.
  • lpOverlapped
    [out] If not used, NULL. Otherwise, this should point to a completely filled out OVERLAPPED structure that contains a valid event. The event will be signaled when the I/O operation is complete.

Return Values

If the operation succeeds, DeviceIoControl returns a non-zero value. If the operation fails, DeviceIoControl returns zero. To get extended error information, call GetLastError.

Remarks

Processing this command reverses the registration done in a previous IOCTL_UNIT_REGISTER_SUBUNIT call. This is expected to be called when the virtual driver is being unloaded, such as at IRP_MN_REMOVE_DEVICE time.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_unit.h.

See Also

CreateFile | DeviceIoControl | IOCTL_UNIT_REGISTER_SUBUNIT | UNIT_RegisterSubunit_Request

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.