InputBuffer is char* allocated on stack in used mode. InputBufferLength is
buffer size.
Am I doing something wrong here??
if(ExGetPreviousMode() != KernelMode){
try{
ProbeForRead(InputBuffer, InputBufferLength, 1);
}except(EXCEPTION_EXECUTE_HANDLER){
KdPrint(("Exception!\n"));
IoStatus->Status = STATUS_INVALID_PARAMETER;
return FALSE;
}
}
thank you!
"veeman" <yadaya...@yebi.se> wrote in message
news:eXm1z07Q...@TK2MSFTNGP06.phx.gbl...
--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net
"Arkady Frenkel" <ark...@hotmailxdotx.com> wrote in message
news:erUMS8DR...@TK2MSFTNGP05.phx.gbl...
Ken, thanks for this comment. I'll check my code, but I think you are
right!!!
> Am I doing something wrong here??
I would say that the excerpt below provides an answer to your question....
[begin quote]
If the specified range of memory is not within the user-mode address range,
ProbeForRead raises the STATUS_ACCESS_VIOLATION exception. If the beginning
of the address range is not aligned on the byte boundary that is specified
by Alignment, ProbeForRead raises the STATUS_DATATYPE_MISALIGNMENT exception.
[end quote]
Anton Bassov