| BOOL CompareText( |
| |
LPCTSTR lpszObjectLabel, |
|
| |
LPCTSTR lpszObjectText, |
|
| |
INT cchObjectText |
|
| ); |
The CompareText method compares the contents of a
stored object with the string provided by the caller.
Parameters
- lpszObjectLabel
- A null-terminated string which specifies the label
of the object to be compared.
- lpszObjectText
- A null-terminated string which contains the text to
be compared with the stored object.
- cchObjectText
- The number of characters in the lpszObjectText string
to be compared. This value may be -1, in which case the string
length will be determined by counting the number of characters up to
the terminating null.
Return Value
If the method succeeds, the return value is a non-zero and the
data matches the contents of the stored object. If the method fails,
the return value is zero. To get extended error information,
call the GetLastError method.
Remarks
The CompareText method performs a text comparison
of the characters in the string with the contents of the storage object on
the server. The string length must match the amount of text in the stored
object exactly, or this function will fail. Partial comparisons are not
supported by this function.
Unicode strings will be automatically converted from UTF-16 to UTF-8 encoding
in the same way the PutData method does when storing text objects.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cswebv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|