S
S
sddvxd2018-05-12 16:58:50
C++ / C#
sddvxd, 2018-05-12 16:58:50

How to get a structure string from a pointer to it?

Hello I
ran into this problem:
There is a POBJECT_ATTRIBUTES type structure that contains a PUNICODE_STRING member.
I'm trying to do it in the following ways:

(LPCWSTR)*(ObjectAttributes->ObjectName);
///
ObjectAttributes->(LPCWSTR)*ObjectName;
///
LPVOID __temp = ObjectAttributes->ObjectName;
LPCWSTR __wstr = (LPCWSTR)__temp;

I encounter such a situation for the first time, please tell me how to get a string by this pointer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2018-05-12
@sddvxd

Look at least that there is UNICODE_STRING
something like this:

wchar_t * str = ObjectAttributes->ObjectName->Buffer;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question