Re: passing a string to a dll
- From: "David Webber" <dave@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 18 Sep 2007 15:40:59 +0100
"SteveR" <srussell@xxxxxxxxxxxxxxxxxxxxxx> wrote in message news:O0bV%23OZ%23HHA.1212@xxxxxxxxxxxxxxxxxxxxxxx
if(s != _T("12345") )
Call me paranoid, but...
Yes, I know there's a "!=" operator for this which should be used, but CString also has a cast to LPCTSTR and so it can read somewhat ambiguously that one might be just comparing the locations of the two strings. So I always use
if( s.Compare( _T("12345") ) )
in circumstances like this. (Also I tent to need CompareNoCase() as often as not, so I'm used to it.)
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
.
- Follow-Ups:
- Re: passing a string to a dll
- From: David Ching
- Re: passing a string to a dll
- References:
- passing a string to a dll
- From: SteveR
- passing a string to a dll
- Prev by Date: Re: How will I print from the begining of the page?
- Next by Date: Re: How do I write an invisible program?
- Previous by thread: Re: passing a string to a dll
- Next by thread: Re: passing a string to a dll
- Index(es):
Relevant Pages
|