BIND_OPTS2
Contains
parameters used during a moniker-binding operation. A BIND_OPTS2
structure is stored in a bind context; the same bind context is used by each
component of a composite moniker during binding, allowing the same parameters
to be passed to all components of a composite moniker. See IBindCtx
Moniker
clients (those using a moniker to acquire an interface pointer to an object)
typically do not need to specify values for the fields of this structure. The CreateBindCtx
The BIND_OPTS2
structure is defined in OBJIDL.IDL
typedef struct tagBIND_OPTS2 {
DWORD cbStruct; //
sizeof(BIND_OPTS2)
DWORD grfFlags;
DWORD grfMode;
DWORD dwTickCountDeadline;
DWORD dwTrackFlags;
DWORD dwClassContext;
LCID locale;
COSERVERINFO * pServerInfo;
} BIND_OPTS2, * LPBIND_OPTS2;
Members
cbStruct
Size of this
structure in bytes (that is, the size of the BIND_OPTS2 structure).
grfFlags
Flags that
control aspects of moniker binding operations. This value is any combination of
the bit flags in the BINDFLAGS enumeration. New values may be defined in
the future, so moniker implementations should ignore any bits in this field
that they do not understand. The CreateBindCtx6NHJ.W6 function initializes this field to zero.
grfMode
Flags that
should be used when opening the file that contains the object identified by the
moniker. The values are taken from the STGM
dwTickCountDeadline
Clock time
(in milliseconds, as returned by the GetTickCount function) by which the
caller would like the binding operation to be completed. This member lets the
caller limit the execution time of an operation when speed is of primary
importance. A value of zero indicates that there is no deadline. Callers most
often use this capability when calling the IMoniker::GetTimeOfLastChange
Typical
deadlines allow for a few hundred milliseconds of execution. This deadline is a
recommendation, not a requirement; however, operations that exceed their
deadline by a large amount may cause delays for the end user. Each moniker
implementation should try to complete its operation by the deadline, or fail
with the error MK_E_EXCEEDEDDEADLINE.
If a binding
operation exceeds its deadline because one or more objects that it needs are
not running, the moniker implementation should register the objects responsible
in the bind context using the IBindCtx::RegisterObjectParam
The GetTickCount
function indicates the number of milliseconds since system startup, and wraps
back to zero after 2^31 milliseconds. Consequently, callers should be careful
not to inadvertently pass a zero value (which indicates no deadline), and
moniker implementations should be aware of clock wrapping problems (see the GetTickCount
function for more information).
dwTrackFlags
A moniker can
use this value during link tracking. If the original persisted data that the
moniker is referencing has been moved, the moniker can attempt to reestablish
the link by searching for the original data though some adequate mechanism. dwTrackFlags
provides additional information on how the link should be resolved. See the
documentation of the fFlags parameter in IShellLink::Resolve in
the Win32 SDK for more details.
COM's file
moniker implementation uses the shell link mechanism to reestablish links and
passes these flags to IShellLink::Resolve.
dwClassContext
The class
context, taken from the CLSCTX enumeration, that is to be used for
instantiating the object. Monikers typically pass this value to the dwClsContext
parameter of CoCreateInstance.
locale
The LCID
value indicating the client s preference for the locale to be used by the
object to which they are binding. A moniker passes this value to IClassActivator::GetClassObject
pServerInfo
Points to a COSERVERINFO
See Also