freshharry
August 21st, 2008, 03:48 PM
Hello
I am writing an Driver with en implemented RTP Stack. For this Project i have to communicate with an other driver! For this i use IRPs. First i implmentet the function that i can send data to the other driver and that works fine! Now i must implemen an function which asks the other driver for data and if there is any available the other driver send it to me! But this doesn*t work until now!
Is use following IRP Code:
irpStack = IoGetNextIrpStackLocation(irp);
irpStack->MajorFunction = IRP_MJ_DEVICE_CONTROL;
irpStack->MinorFunction = 0;
irpStack->Parameters.DeviceIoControl.IoControlCode = IOCTL_DRIVER_OUT;
irpStack->Parameters.DeviceIoControl.OutputBufferLength = sizeof(IOCTL_RX_OUT);
irpStack->Parameters.DeviceIoControl.InputBufferLength = sizeof(IOCTL_RX_IN);
And in the completion routine it looks like this:
IOCTL_RX_OUT data_tmp;
data_tmp = (IOCTL_RX_OUT*)(irp->AssociatedIrp.SystemBuffer);
But i dont get the data_tmp!
Can somebody help me or can show me an example how it works!?
THANKS
Harry
I am writing an Driver with en implemented RTP Stack. For this Project i have to communicate with an other driver! For this i use IRPs. First i implmentet the function that i can send data to the other driver and that works fine! Now i must implemen an function which asks the other driver for data and if there is any available the other driver send it to me! But this doesn*t work until now!
Is use following IRP Code:
irpStack = IoGetNextIrpStackLocation(irp);
irpStack->MajorFunction = IRP_MJ_DEVICE_CONTROL;
irpStack->MinorFunction = 0;
irpStack->Parameters.DeviceIoControl.IoControlCode = IOCTL_DRIVER_OUT;
irpStack->Parameters.DeviceIoControl.OutputBufferLength = sizeof(IOCTL_RX_OUT);
irpStack->Parameters.DeviceIoControl.InputBufferLength = sizeof(IOCTL_RX_IN);
And in the completion routine it looks like this:
IOCTL_RX_OUT data_tmp;
data_tmp = (IOCTL_RX_OUT*)(irp->AssociatedIrp.SystemBuffer);
But i dont get the data_tmp!
Can somebody help me or can show me an example how it works!?
THANKS
Harry