Previous in Contents Next in Contents

ICreditCardEncryption2::PreModify

Syntax

STDMETHOD PreModify(
long
hWnd// in
CREDITCARDINFO *pOldCCInfo// in
CREDITCARDINFO *pNewCCInfo// in
BYTE ** ppBlob// out
long *cLen// out
BSTR*pbstrErrMsg// out
);

Description

The Wallet calls the Payment Builder's implementation of PreModify to notify the payment builder that a payment instance is being changed. This notification provides the payment builder an opportunity to warn the user in the event that the modification will affect the use of the protocol. The Payment builder provides this notification by returning S_FALSE, and by storing the text of the warning in pbstrErrMsg. The Wallet then displays this message to the user.

If the user chooses to cancel the modification, the Modify method is not called.

Parameters

hWnd
Window handle to the parent window.
pOldCCInfo
Pointer to the credit-card information.
pNewCCInfo
Pointer to the changed credit-card information.
ppBlob
Address where this function returns a pointer to a blob that will be stored by the Credit Card component and given to the protocol when a payment instruction is generated. The ppBlob value should be NULL if the protocol does not need any information to be stored. **ppBlob is the blob originally stored when the card was added or last modified. If the blob is changed, the protocol must call CoTaskMemFree to free the original blob and call CoTaskMemAlloc to dynamically allocate a new blob. This memory will be freed by the Credit Card CPC.
cLen
Length of the blob.
pbstrErrMsg
The address to which the PreModify method returns a warning that the Wallet displays to the user.

Return Value

The CPC displays the message contained in pbstrErrMsg to the user only if PreModify returns S_FALSE.


© 1997-2000 Microsoft Corporation. All rights reserved.