_Auction::AuctionUpdateItem Method [C++]

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

Definition

[C++]

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);

[Visual Basic]

Function AuctionUpdateItem(szAuctionId As String,
  szSKU As String,
  cyReservePrice As Currency,
  nAvailable As Long,
  cyBidIncrement As Currency,
  nAuctionType As Long,
  cyMinimumBid As Currency,
  fSealedBid As Boolean,
  fSealedInventory As Boolean,
  fActive As Boolean,
  dtStartDate As Date,
  dtEndDate As Date,
  nAutoCloseSeconds As Long,
  objErrorList As Object,
  Optional bResolve As Boolean) As Long

Parameters

  • szAuctionId[C++]
    [in] A BSTR that contains the unique auction ID.
  • szAuctionId[Visual Basic]
    A String that contains the unique auction ID.
  • szSKU[C++]
    [in] A BSTR that contains the unique ID for the item.
  • szSKU[Visual Basic]
    A String that contains the unique ID for the item.
  • cyReservePrice[C++]
    [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.
  • cyReservePrice[Visual Basic]
    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[C++]
    [in] A long that contains the number of items for sale.
  • nAvailable[Visual Basic]
    A Long that contains the number of items for sale.
  • cyBidIncrement[C++]
    [in] A CURRENCY that contains the amount a bid must be raised in order to bid on the item.
  • cyBidIncrement[Visual Basic]
    A Currency that contains the amount a bid must be raised in order to bid on the item.
  • nAuctionType[C++]
    [in] A long that contains the auction type. For more information, see the Remarks section.
  • nAuctionType[Visual Basic]
    A Long that contains the auction type. For more information, see the Remarks section.
  • cyMinimumBid[C++]
    [in] A CURRENCY that contains the minimum opening bid.
  • cyMinimumBid[Visual Basic]
    A Currency that contains the minimum opening bid.
  • fSealedBid[C++]
    [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.
  • fSealedBid[Visual Basic]
    A Boolean 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[C++]
    [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.
  • fSealedInventory[Visual Basic]
    A Boolean 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[C++]
    [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.
  • fActive[Visual Basic]
    A Boolean 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[C++]
    [in] A DATE that determines when bids will be accepted on the item.
  • dtStartDate[Visual Basic]
    A Date that determines when bids will be accepted on the item.
  • dtEndDate[C++]
    [in] A DATE that determines when the auction is closed and the items can be purchased.
  • dtEndDate[Visual Basic]
    A Date that determines when the auction is closed and the items can be purchased.
  • nAutoCloseSeconds[C++]
    [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.
  • nAutoCloseSeconds[Visual Basic]
    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[C++]
    [in] A pointer to the IDispatch interface that contains the error list.
  • objErrorList[Visual Basic]
    An IDispatch interface that contains the error list.
  • bResolve[C++]
    [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.
  • bResolve[Visual Basic]
    A Boolean that indicates whether to call the AuctionResolve method. A 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. The default value is True.
  • plNumErrors[C++]
    [out, retval] A pointer to a long used to return the number of error strings written to the objErrorList object*.*

Return Values

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

[Visual Basic] If this method completes successfully, it returns a Long that contains the number of error strings written to the objErrorList object*.*

Error Values

[C++] 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.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM 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. In particular, the Description property may contain 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.

[Visual Basic]

Example

' lNumErrStrings is a Long
lNumErrStrings = oAuction.AuctionUpdateItem(szAuctionId, szSKU, cyReservePrice, nAvailable, cyBidIncrement, nAuctionType, cyMinimumBid, fSealedBid, fSealedInventory, fActive, dtStartDate, dtEndDate, nAutoCloseSeconds, objErrorList, bResolve)

See Also

[C++]Auction Object

[Visual Basic]Auction Object

Auction Samples

Copyright © 2005 Microsoft Corporation.
All rights reserved.