Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error in RtlZeroMemory Pin
Richard MacCutchan5-Dec-11 7:12
mveRichard MacCutchan5-Dec-11 7:12 
AnswerRe: Error in RtlZeroMemory Pin
vishalgpt13-Dec-11 17:00
vishalgpt13-Dec-11 17:00 
GeneralRe: Error in RtlZeroMemory Pin
Erudite_Eric4-Dec-11 20:59
Erudite_Eric4-Dec-11 20:59 
AnswerRe: Error in RtlZeroMemory Pin
trotwa4-Dec-11 1:25
trotwa4-Dec-11 1:25 
AnswerRe: Error in RtlZeroMemory Pin
Software_Developer4-Dec-11 8:54
Software_Developer4-Dec-11 8:54 
AnswerRe: Error in RtlZeroMemory Pin
Richard Andrew x644-Dec-11 9:30
professionalRichard Andrew x644-Dec-11 9:30 
AnswerRe: Error in RtlZeroMemory Pin
Addy Tas4-Dec-11 10:00
Addy Tas4-Dec-11 10:00 
AnswerRe: Error in RtlZeroMemory Pin
Erudite_Eric4-Dec-11 20:55
Erudite_Eric4-Dec-11 20:55 
vishalgpt wrote:
RtlZeroMemory


Why are you using kernel functions?

In user mode uses memset().

So, what is the address of your memory? Well, with arrays it is the array name, so query_table. How long is your memory? Well, it is twice the type, so sizeof(RTL_QUERY_REGISTRY_TABLE) * 2.

So, call:

memset(quary_table, 0, sizeof(RTL_QUERY_REGISTRY_TABLE) * 2);


Remember, think memory address, think size. Smile | :)


--edit--
OK, so you are writing a driver...

You really should understand memory (and the C language) better than this before you write drivers because you are going to be in a world of pain, and anyone who gets your driver on their system is too.
==============================

Nothing to say.


modified 5-Dec-11 6:30am.

AnswerRe: Error in RtlZeroMemory Pin
Erudite_Eric5-Dec-11 6:43
Erudite_Eric5-Dec-11 6:43 
QuestionArray Problem. Pin
janaswamy uday2-Dec-11 17:28
janaswamy uday2-Dec-11 17:28 
AnswerRe: Array Problem. Pin
«_Superman_»2-Dec-11 18:22
professional«_Superman_»2-Dec-11 18:22 
AnswerRe: Array Problem. Pin
Richard MacCutchan2-Dec-11 23:14
mveRichard MacCutchan2-Dec-11 23:14 
GeneralRe: Array Problem. Pin
janaswamy uday3-Dec-11 0:18
janaswamy uday3-Dec-11 0:18 
GeneralRe: Array Problem. Pin
Richard MacCutchan3-Dec-11 0:25
mveRichard MacCutchan3-Dec-11 0:25 
AnswerRe: Array Problem. Pin
Addy Tas4-Dec-11 10:08
Addy Tas4-Dec-11 10:08 
Questiongetline Pin
jkirkerx2-Dec-11 11:21
professionaljkirkerx2-Dec-11 11:21 
AnswerRe: getline Pin
Chris Losinger2-Dec-11 11:45
professionalChris Losinger2-Dec-11 11:45 
GeneralRe: getline Pin
jkirkerx2-Dec-11 12:19
professionaljkirkerx2-Dec-11 12:19 
AnswerI'm stuck, not sure which direction to go Pin
jkirkerx2-Dec-11 19:16
professionaljkirkerx2-Dec-11 19:16 
GeneralRe: I'm stuck, not sure which direction to go Pin
Richard MacCutchan3-Dec-11 0:03
mveRichard MacCutchan3-Dec-11 0:03 
GeneralRe: I'm stuck, not sure which direction to go Pin
jkirkerx3-Dec-11 8:00
professionaljkirkerx3-Dec-11 8:00 
GeneralNextline Pin
jkirkerx3-Dec-11 8:26
professionaljkirkerx3-Dec-11 8:26 
GeneralRe: Nextline Pin
Richard MacCutchan3-Dec-11 9:13
mveRichard MacCutchan3-Dec-11 9:13 
Questioni can't load dll builded in debug unicode,what's difference between 'debug' and 'debug unicode'? Pin
Member 77984732-Dec-11 5:06
Member 77984732-Dec-11 5:06 
AnswerRe: i can't load dll builded in debug unicode,what's difference between 'debug' and 'debug unicode'? Pin
JackDingler2-Dec-11 5:19
JackDingler2-Dec-11 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.