Solved

How do I compare 2 LPOLESTR strings?

Posted on 2006-10-26
2
961 Views
Last Modified: 2012-06-21
I'm using only Win32 lib in VS 2005.  Thanks.
0
Comment
Question by:lapucca
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17816460
Since these are plain UNICODE strings, just use 'wcscmp()', e.g.

LPOLESTR test1 = L"test";
LPOLESTR test2 = L"test";

if (0 == wcscmp(test1,test2)) { // works like 'strcmp()'

  // identical
}
0
 

Author Comment

by:lapucca
ID: 17816481
thank you.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question