Solved

How do I compare 2 LPOLESTR strings?

Posted on 2006-10-26
2
913 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
Comment Utility
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
Comment Utility
thank you.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now