_Auction::AuctionUpdateItem

Ee824677.c++_off(en-US,CS.10).gifEe824677.vb_on(en-US,CS.10).gif

Use this method to update an existing item in the auction system.

Definition

HRESULT _Auction::AuctionUpdateItem(BSTRszAuctionId,BSTRszSKU,CURRENCYcyReservePrice,longnAvailable,CURRENCYcyBidIncrement,longnAuctionType,CURRENCYcyMinimumBid,VARIANT_BOOLfSealedBid,VARIANT_BOOLfSealedInventory,VARIANT_BOOLfActive,DATEdtStartDate,DATEdtEndDate,longnAutoCloseSeconds,IDispatch*objErrorList,VARIANT_BOOLbResolve,long*plNumErrors);

Parameters

szAuctionId

[in] A BSTR that contains the unique auction ID.

szSKU

[in] A BSTR that contains the unique ID for the item.

cyReservePrice

[in] A CURRENCY that contains the minimum price the seller is willing to sell the item for. The reserve price must be greater than the minimum bid.

nAvailable

[in] A long that contains the number of items for sale.

cyBidIncrement

[in] A CURRENCY that contains the amount a bid must be raised in order to bid on the item.

nAuctionType

[in] A long that contains the auction type. For more information, see the Remarks section.

cyMinimumBid

[in] A CURRENCY that contains the minimum opening bid.

fSealedBid

[in] A VARIANT_BOOL that indicates whether to check a bid against the minimum bid. A value of True skips the minimum bid check. A value of False checks against the minimum bid.

fSealedInventory

[in] A VARIANT_BOOL that indicates whether to check the wanted number of items in a bid against the number of items available for sale. A value of True skips the check (the fTakeLess parameter in the bid is ignored). A value of False checks against the available items.

fActive

[in] A VARIANT_BOOL that indicates whether the auction is active. A value of True indicates the auction is active. A value of False suspends bidding on the auction.

dtStartDate

[in] A DATE that determines when bids will be accepted on the item.

dtEndDate

[in] A DATE that determines when the auction is closed and the items can be purchased.

nAutoCloseSeconds

[in] A long that indicates the number of seconds to wait after the last bid is received to close the auction. This can close an auction before the end date. A value of zero (0) indicates to ignore the time of the last bid and close the auction on the end date.

objErrorList

[in] A pointer to the IDispatch interface that contains the error list.

bResolve

[in, optional, defaultvalue (-1)] A VARIANT_BOOL that indicates whether to call the AuctionResolve method. The default value of True causes the method to be called with the bOptimize parameter of the method set to False. A value of False causes the Auction object to skip the automatic call to the AuctionResolve method.

plNumErrors

[out, retval] A pointer to a long used to return the number of error strings written to the objErrorList object*.*

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

The auction type controls the method used to determine the winning bidder and the amount the winning bidder must pay. The following table describes the available auction types.

Auction Type Value Description Example
Winning Price 0 Winning bidders receive the item they bid on for the amount bid. If there is more than one item, winning bidders receive the number requested at the amount they bid. Two items are at auction. Bidder A bids $10.00, Bidder B bids $5.00, and Bidder C bids $3.00, and each bidder requests one item.

Bidder A receives one item for $10.00 and Bidder B receives one item for $5.00. However, if Bidder A requested two items at $10.00 each, both items would be awarded to Bidder A.

Clear Price 1 Winning bidders receive the item they bid on for the lowest winning bid. Same conditions as Winning Price auction type example.

Bidder A and Bidder B each receive one item for $5.00.

Second Price 2 Winning bidders pay the lowest of the following:

The highest losing bid plus the bid increment, the lowest winning bid, or the reserve price, assuming the number of bids above the reserve price is less than the number of available items.

Same conditions as Winning Price auction type example with a bid increment of $0.50.

Bidder A and Bidder B each receive one item for $3.50.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

Auction Object


All rights reserved.