Hi All,
I want to send device control codes which is received from one driver to
another driver, below is my devicecontrol code
switch (IoControlCode) {
case IOCTL_MUX_CREATE_RFM_UPLINK:
WDF_OBJECT_ATTRIBUTES_INIT(&objAttributes);
objAttributes.ParentObject = devContext->frameTarget;
status = WdfRequestCreate(&objAttributes, devContext->frameTarget,
&localRequest);
if(!NTSTATUS(status)) {
MUXDBGERR((“\nWdfRequestCreate failed 0x%0x\n”,status));
WdfRequestComplete(Request, status);
}
status = WdfIoTargetFormatRequestForIoctl(devContext->frameTarget,
localRequest,
(ULONG)IOCTL_MUX_CREATE_RFM_UPLINK, NULL, NULL, NULL, NULL);
if(!NTSTATUS(status)) {
MUXDBGERR((“\nWdfRequestCreate failed 0x%0x\n”,status));
WdfObjectDelete(localRequest);
WdfRequestComplete(Request, status);
}
MUXDBGERR((“\ndevContext->rfmTarget = ioTarget; removed”));
WDF_REQUEST_SEND_OPTIONS_INIT(&sendOptions,
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS);
if(!WdfRequestSend(localRequest, devContext->frameTarget, &sendOptions)) {
MUXDBGERR((“\n MUX WdfRequestSend failed”));
//To Get the status
status = WdfRequestGetStatus(Request);
if(!NT_SUCCESS(status)) {
MUXDBGERR((“\n MUX WdfRequestGetStatus failed 0x%0x\n”,status));
}
}
MUXDBGERR((“\n MUX WdfRequestSend complete”));
WdfObjectDelete(localRequest);
break;
default:
MUXDBG((“\n MUX MuxEvtDeviceControl default Start\n”));
break;
}
MUXDBGERR((“\n MUX WdfRequestComplete start”));
WdfRequestComplete(Request, status);
MUXDBGERR((“\n MUX WdfRequestComplete end”));
But my problem is wdfrequestcreate fail at very first step with error code
0x0 and same code work in Queue write callback function
–
Thanks and Regards
Shiva Kumara R