Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i use
C++
RtlCopyMemory( userBuffer, Devicebuffer, Length);

to set the user buffer from kernel and use the buffer
C++
char inBuffer[100];

in console to retrieve that content.While the length of data from the kernel greater than the size 100,then the system hang up.Plz help me to find the exact length of buffer of kernel from user mode console..
Posted

1 solution

Do you see the "Length" parameter on the RtlCopyMemory function?
Either:
1) Set that to the length of inBuffer (i.e. 100 in your example)
or
2) Allocate inBuffer that number of characters.
 
Share this answer
 
Comments
aboutjayesh 13-Jun-12 10:26am    
Thank you for your response..But "RtlCopyMemory" is used in driver program.How cam i access the "Length" in user console program?
OriginalGriff 13-Jun-12 10:47am    
The same way you are accessing it when you call the RtlCopyMemory function...
Or am I missing something?
aboutjayesh 13-Jun-12 11:00am    
When the length is greater than 100 then the operating system hang up..So how can i manage that ?
OriginalGriff 13-Jun-12 11:55am    
You need to do some playing, and see what happens. Try declaring your buffer as 32KB and see what happens.
Use the debugger and look at all the parameters when you get to the RtlCopyMemory and see what you have.
Basically, you need more info than you have given us so far!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900