Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

lstrcmpi() behave differently on XP and Vista

Featured Replies

Hi,

I have written a small programme in VC.

Its code is as below.

####################################################################################################

###########

#include "stdafx.h"

#include <tchar.h>

#include <Shellapi.h>

#include <malloc.h>

#include <stdlib.h>

int APIENTRY WinMain(HINSTANCE hInstance,

HINSTANCE hPrevInstance,

LPSTR lpCmdLine,

int nCmdShow)

{

TCHAR t3[15];

t3[0] = 65279; // equivalent to 0xFEFF, (in my real application this byte is read from a unicode file

// in UTF-16 format and its value is 0xFEFF)

t3[1] =_T('a');

t3[2] =_T('b');

t3[3] =_T('c');

t3[4] =_T('d');

t3[5] =_T('e');

t3[6] =_T('');

if ((lstrcmpi (t3,_T("abcde"))) == 0)

{

MessageBox(NULL,_T("two strings are equal"), _T("match result"), MB_OK);

}

else

{

MessageBox(NULL,_T("NOT EQUAL"), _T("match result"), MB_OK);

}

return 1;

}

####################################################################################################

############

I have build it and made a executable.

Not when I run this executable on XP machine(with SP2 installed), it gives messages one.("two strings are equal").

string comparison passes on XP machine.

But when I run this application on Vista machine it gives second message.("NOT EQUAL")

string comparison fails on Vista machine.

Do anybody have any idea, why this is happening....?

i don't think we have many coders on teh apps forum here, your best bet is the the MSDN forum over at MS, have you checked teh Vista SDK to see if the functionality was changed in vista?

  • 2 months later...

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.