IBindCtx::SetBindOptions method (objidl.h)

Sets new values for the binding parameters stored in the bind context.

Syntax

HRESULT SetBindOptions(
  [in] BIND_OPTS *pbindopts
);

Parameters

[in] pbindopts

A pointer to a BIND_OPTS3 structure containing the binding parameters.

Return value

This method can return the standard return values E_OUTOFMEMORY and S_OK.

Remarks

A bind context contains a block of parameters that are common to most IMoniker operations. These parameters do not change as the operation moves from piece to piece of a composite moniker.

Subsequent binding operations can call IBindCtx::GetBindOptions to retrieve these parameters.

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 CreateBindCtx function, the fields of the BIND_OPTS structure are initialized to the following values:

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

You can use the IBindCtx::SetBindOptions method to modify these values before using the bind context, if you want values other than the defaults.

SetBindOptions copies the members of the specified structure, but not the COSERVERINFO structure and the pointers it contains. Callers may not free these pointers until the bind context is released.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objidl.h

See also

BIND_OPTS

BIND_OPTS2

BIND_OPTS3

IBindCtx