[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    Re: lstrcmpW & Win98
From:       Tim Tabor <tltabor () EARTHLINK ! NET>
Date:       2000-06-30 1:18:35
[Download RAW message or body]


That works

        cout << _wcsicmp(L"hello", L"hello") << '\t'
                 << _wcsicmp(L"hello", L"world") << endl;

on win95 and nt4
        0  -15

I see the prototype but not the source.

// timtabor

> -----Original Message-----
> From: ATL - Active Template Library [mailto:ATL@DISCUSS.MICROSOFT.COM]On
> Behalf Of Kenneth Kasajian
> Sent: Thursday, June 29, 2000 8:26 PM
> To: ATL@DISCUSS.MICROSOFT.COM
> Subject: Re: lstrcmpW & Win98
>
>
> How about, _wcsicmp().  If the code doesn't use CRT (which is likely
> in ATL code), then I'd just copy the source for _wcsicmp() into the code.
>
> -----Original Message-----
> From: Tim Tabor [mailto:tltabor@EARTHLINK.NET]
> Sent: Thursday, June 29, 2000 1:36 PM
> To: ATL@DISCUSS.MICROSOFT.COM
> Subject: Re: lstrcmpW & Win98
>
>
> I think the ignore case is the problem.
>
> > -----Original Message-----
> > From: ATL - Active Template Library [mailto:ATL@DISCUSS.MICROSOFT.COM]On
> > Behalf Of Kenneth Kasajian
> > Sent: Thursday, June 29, 2000 4:04 PM
> > To: ATL@DISCUSS.MICROSOFT.COM
> > Subject: Re: lstrcmpW & Win98
> >
> >
> > Doesn't wcscmp work on Win9x?
> >
> > -----Original Message-----
> > From: Shawn A. VanNess [mailto:xonix@MINDSPRING.COM]
> > Sent: Thursday, June 29, 2000 12:38 PM
> > To: ATL@DISCUSS.MICROSOFT.COM
> > Subject: Re: lstrcmpW & Win98
> >
> >
> > I've seen the same thing, and I don't think I've ever been so
> > pissed off at
> > MS.  So, I wrote the following two functions, which I've tried to make
> > (somewhat) consistent with ATLCONV.H's extremely useful "ocs*"
> > functions...
> >
> > -S
> >
> > //
> > // These handy functions seem to be missing from atlconv.h...
> > // Note: they are only handy because lstrcmp(i)W doesn't work on 9X.
> > // WDEHTS?
> > //
> >
> > inline int ocscmp(const OLECHAR* sz1, const OLECHAR* sz2)
> >    {
> >    if (!sz1)
> >       return (sz2) ? (-1) : (0);
> >    if (!sz2)
> >       return (1);
> >
> >    while(true)
> >       {
> >       if (*sz1 != *sz2)
> >          return (sz1 < sz2) ? (-1) : (1);
> >
> >       if (!*sz1 || !*sz2)
> >          return 0;
> >
> >       sz1++; sz2++;
> >       }
> >    __asm { int 03 } // should never be here
> >    return 0;
> >    }
> >
> > inline int ocscmpi(const OLECHAR* sz1, const OLECHAR* sz2)
> >    {
> >    if (!sz1)
> >       return (sz2) ? (-1) : (0);
> >    if (!sz2)
> >       return (1);
> >
> >    while(true)
> >       {
> >       OLECHAR c1 = (*sz1 >= L'A' && *sz1 <= L'Z') ? (*sz1 +
> (L'a'-L'A')) :
> > (*sz1);
> >       OLECHAR c2 = (*sz2 >= L'A' && *sz2 <= L'Z') ? (*sz2 +
> (L'a'-L'A')) :
> > (*sz2);
> >
> >       ATLTRACE(L"%c %c\n",c1,c2);
> >
> >       if (c1 != c2)
> >          return (c1 < c2) ? (-1) : (1);
> >
> >       if (!*sz1 || !*sz2)
> >          return 0;
> >
> >       sz1++; sz2++;
> >       }
> >    __asm { int 03 } // should never be here
> >    return 0;
> >    }
> >
> >
> >
> > ----- Original Message -----
> > From: "Peter Datsichin" <dp@SOFTING.COM>
> > Sent: Thursday, June 29, 2000 05:13
> > Subject: OT: lstrcmpW & Win98
> >
> >
> > > Hi,
> > >
> > > does anybody know what happens with the wide-character versions
> > > of the functions from kernel32.dll on Win98? Are they just stubs?
> > >
> > > I'm asking that because I found out that lstrcmpW always returns 0
> > > on Win98, no matter what arguments are.....
> > >
> > > Peter
> > >
> >
> > ----------------------------------------------------------------
> > Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> > contains important info including how to unsubscribe.  Save time, search
> > the archives at http://discuss.microsoft.com/archives/index.html
> >
> > ----------------------------------------------------------------
> > Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> > contains important info including how to unsubscribe.  Save time, search
> > the archives at http://discuss.microsoft.com/archives/index.html
> >
>
> ----------------------------------------------------------------
> Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>
> ----------------------------------------------------------------
> Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
> contains important info including how to unsubscribe.  Save time, search
> the archives at http://discuss.microsoft.com/archives/index.html
>

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic