As you see,the question content,describe a situation as following:
In the Application:
<pre lang="C++">
BYTE SharedBuffer[256];
DeviceIoControl(device,SlefDefineNum,InputData,4,SharedBuffer,256,&ReLen,0);
</pre>
In the Driver:
<pre lang="C">
char*OutPut;
OutPut=(char*)MmMapIoSpace(MmGetPhysicalAddress((PVOID)((ULONG)(Irp->AssociatedIrp.SystemBuffer)+4)),256,0);
</pre>
what worry me is "if the Irp returned,the Irp will be deleted,what about the buffer it passed in? even,what about the buffer if it had be Mapped to an system-space,do them will be UnMapped when the irp returned?"
waiting & thanks for you answer...