Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
Windows Shell
Shell Reference
String Functions
 StrCmp function
StrCmp function

Compares two strings to determine if they are the same. The comparison is case-sensitive.

Syntax

int StrCmp(
  __in  PCTSTR psz1,
  __in  PCTSTR psz2
);

Parameters

psz1 [in]

Type: PCTSTR

A pointer to the first null-terminated string to be compared.

psz2 [in]

Type: PCTSTR

A pointer to the second null-terminated string to be compared.

Return value

Type: int

Returns zero if the strings are identical. Returns a positive value if the string pointed to by psz1 is greater than that pointed to by psz2. Returns a negative value if the string pointed to by psz1 is less than that pointed to by psz2.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP

Minimum supported server

Windows 2000 Server

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 4.71 or later)

Unicode and ANSI names

StrCmpW (Unicode)

 

 

Send comments about this topic to Microsoft

Build date: 9/7/2011

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker