help: newbie can't lcase a PUNICODE_STRING

  • Thread starter Thread starter Seth
  • Start date Start date
S

Seth

I'm a vb programmer trying to learn C++ and strings are really tripping
me up. I have a PUNICODE_STRING being passed in and want to make the
whole thing lower case. Can anyone point me in the right direction?

Thanks in advance
 
I'm a vb programmer trying to learn C++ and strings are really tripping
me up. I have a PUNICODE_STRING being passed in and want to make the
whole thing lower case. Can anyone point me in the right direction?

What is a PUNICODE_STRING?
It is not a standard C++ thing, not a VB thing, not a Windows thing.
If it is a typedef, it might be anything, so we cannot tell what to use on
it.

If I assume is it a "pointer to a Unicode C string" (zero-terminated),
in the Windows world is WCHAR *, or wchar_t *, or PWSTR, or LPWSTR :-)

Then see CharLowerW and CharLowerBuffW.
 
Seth said:
I'm a vb programmer trying to learn C++ and strings are really
tripping me up. I have a PUNICODE_STRING being passed in and want to
make the whole thing lower case. Can anyone point me in the right
direction?

What are you using UNICODE_STRING for? That's a DDK type, used only in the
kernel and device drivers.

AFIAK, there is no function to convert a UNICODE_STRING to lower case -
drivers just don't do that sort of thing (and converting Unicode to
lowersace is a non-trivial operation).

What are you trying to accomplish? Most likely, you should be using another
type of string instead (std::string, CString, etc).

-cd
 
I'm trying to implement the password filter that the LSA can call as an
addition to the password complexity. In the Platform SDK and in various
discussions of this dll the third exported function looks like this:

BOOLEAN __stdcall PasswordFilter(
PUNICODE_STRING AccountName,
PUNICODE_STRING FullName,
PUNICODE_STRING Password,
BOOLEAN SetOperation
)

So, what I REALLY need to do is run a regular expression against the
incoming password but building and implementing Boost (something I've
been told I'll need to evaluate RegEx) is still waaaay out in front of
me. Lcase-ing the incoming string was just a first attempt to get a
grip on strings in C++.

Thanks for the reply...hopefully this will allow you to point me in the
right direction (and thanks to Mihai Nita as well).

s~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Equivilent of VB InStr(Lcase()) 4
Performance Difference - LCase vs UCase? 12
help with lcase function. 3
Usin ZwReadFile in winxp 1
Newbie question...? 3
Very Stuck Newbie 1
Newbie 6
simple newbie question 2

Back
Top