共用方式為


IPassportCrypt::Decompress

IPassportCrypt::Decompress

Decompresses data that has been compressed by the Compress method. Given a string, decompresses the string from a double-byte representation of the same string.

Syntax

HRESULT Decompress(
    BSTR bstrIn, 
    BSTR *pbstrOut
);

Parameters

  • bstrIn
    [in] A BSTR containing the data to be decompressed.
  • pbstrOut
    [out, retval] A pointer to the BSTR containing the decompressed data.

Return values

Returns one of the following:

S_OK Success.
E_POINTER The bstrIn parameter was NULL or a NULL pointer. A zero length string does not produce this error.
E_OUTOFMEMORY Could not allocate memory for a copy string.

Example

For an example of this method, see IPassportCrypt::Decrypt.

Remarks

This method decompresses a compressed string and is typically used after calling Decrypt because a string that is encrypted in double-byte representation will save space on the query string or in storage. This method should be used on any decrypted strings that arrive from the kppvc parameter received for purposes of Microsoft® Kids Passport account verification.

Typically, this method is used in conjunction with Encrypt, Decrypt, and Compress.

See Also

IPassportCrypt Interface | IPassportCrypt::Compress | IPassportCrypt::Encrypt