Click here to Skip to main content
12,949,700 members (73,362 online)
Rate this:
Please Sign up or sign in to vote.
See more:

i use
RtlCopyMemory( userBuffer, Devicebuffer, Length);

to set the user buffer from kernel and use the buffer
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 12-Jun-12 0:28am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Do you see the "Length" parameter on the RtlCopyMemory function?
1) Set that to the length of inBuffer (i.e. 100 in your example)
2) Allocate inBuffer that number of characters.
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,380
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web02 | 2.8.170524.1 | Last Updated 12 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100