I have a C function that takes a parameter of type LPVOID. The values that gets passed in is \0 seperated array of characters. How can I cast the parameter to see the incoming value in visual studio / windbg?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no cast that would allow you to observe that in watch windows. For VS you will have to open up a memory window on the address at the beginning of the null separated block.
In WinDbg command
db <my_address>dumps raw memory along with ASCII conversion. If block is larger than 128 bytes, then add optionlto the command. E.g this will print out first 0x200 bytes for local variable pVoid:db poi pVoid l200