_Auction::AuctionRandomBids Method [C++]

Use this method to enter random bids into an auction for testing or demonstration purposes.

Definition

[C++]

HRESULT _Auction::AuctionRandomBids(BSTRszAuctionId,
  VARIANT_BOOLfDelete,
  longnNumberBids,
  VARIANT*unnamed parameter);

[Visual Basic]

Function AuctionRandomBids(szAuctionId As String,
  fDelete As Boolean,
  nNumberBids As Long) As Variant

Parameters

  • szAuctionId[C++]
    [in] A BSTR that contains the unique auction ID.
  • szAuctionId[Visual Basic]
    A String that contains the unique auction ID.
  • fDelete[C++]
    [in] A VARIANT_BOOL that indicates whether to delete previous random bids before adding the new bids. A value of True specifies to delete the bids. A value of False specifies to save the bids.
  • fDelete[Visual Basic]
    A Boolean that indicates whether to delete previous random bids before adding the new bids. A value of True specifies to delete the bids. A value of False specifies to save the bids.
  • nNumberBids[C++]
    [in] A long that contains the number of random bids to add.
  • nNumberBids[Visual Basic]
    A Long that contains the number of random bids to add.
  • unnamed parameter[C++]
    [out, retval] Reserved for future use.

Return Values

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

[Visual Basic] The return value is reserved for future use. Ignore the return value.

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

Random bids are entered under the bidder name "Random." The bids are at least the minimum bid and ask for a number of items between one and the number available.

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

[Visual Basic]

Example

'szAuctionId is a GUID
oAuction.AuctionRandomBids szAuctionId, FALSE, 25

See Also

[C++]Auction Object

[Visual Basic]Auction Object

Auction Samples

Copyright © 2005 Microsoft Corporation.
All rights reserved.