3.38.4.9 IUpdateSearcher::EscapeString (Opnum 18)
The IUpdateSearcher::EscapeString (opnum 18) method escapes a string such that it can be used as a literal value in a search criteria string.
-
HRESULT EscapeString( [in] BSTR unescaped, [out, retval] BSTR* retval );
unescaped: The string to escape.
retval: Resulting escaped string.
-
Strings are escaped as follows: all single-quote ('), open square bracket ([), and close square bracket (]) characters in the unescaped string MUST be replaced with ['], [[], and []] sequences, respectively.
Return Values: The method MUST return information in an HRESULT data structure. The severity bit in the structure identifies the following conditions:
If the severity bit is set to 0, the method completed successfully.
If the severity bit is set to 1, the method failed and encountered a fatal error.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].
This method MUST return the escaped string.