Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method specifies new values for the binding parameters stored in the bind context. Subsequent binding operations can call the IBindCtx::GetBindOptionsmethod to retrieve the parameters.

Syntax

HRESULT SetBindOptions(
  BIND_OPTS* 
pbindopts
);

Parameters

pbindopts

[in] Pointer to a BIND_OPTS2or a BIND_OPTSstructure containing the binding parameters.

Return Value

The following table shows the return values for this method.

Value Description

E_OUTOFMEMORY

A standard return value.

S_OK

The parameters were stored successfully.

Remarks

A bind context contains a block of parameters, stored in a BIND_OPTS2or BIND_OPTSstructure, that are common to most IMonikeroperations. These parameters do not change as the operation moves from piece to piece of a composite moniker.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Callers

This method can be called by moniker clients (those who use monikers to acquire interface pointers to objects).

When you first create a bind context by using the CreateBindCtxfunction, the fields of the BIND_OPTSstructure are initialized to the following values.

Copy Code
	cbStruct = sizeof(BIND_OPTS); 
	grfFlags = 0; 
	grfMode = STGM_READWRITE; 
	dwTickCountDeadline = 0; 

If you want values other than the defaults, you can use the IBindCtx::SetBindOptionsmethod to modify these values before using the bind context. See BIND_OPTSfor more information.

SetBindOptionscopies only the members of BIND_OPTS2, but not the COSERVERINFOstructure and the pointers it contains. Callers may not free any of these pointers until the bind context is released.

Requirements

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also