This IOCTL reads plug definitions from the registry and calls the allocate and free callbacks into the subunit to process them. 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_PROCESS_REGISTRY_PLUGS. 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_ProcessRegistryPlugs_Request structure. The uprp_RegistrationToken and uprp_RootKey members must be pre-initialized. - BufferSize
[in] Set to sizeof(UNIT_ProcessRegistryPlugs_Request). - lpOutBuffer
[in] Set to NULL. - nOutBufferSize
[in] 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. For this command, set to 0.] - 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
This command is provided only as a convenience. Most subunits are expected to create at least a single default plug as part of their initialization process. It is advantageous for these default plugs to be registry-defined, some code is required to actually read the registry values and attempt to process them.
For each plug defined in the registry, the UNIT_AllocateLocalPlugCB callback function is called. The following registry format will be expected, relative to the uprp_RootKey registry key handle passed in.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_unit.h.
See Also
CreateFile | DeviceIoControl | UNIT_AllocateLocalPlugCB | UNIT_ProcessRegistryPlugs_Request
Send Feedback on this topic to the authors