Member | Description |
grfFlags | A group of Boolean flags. Legal values that may be OR'd together are the taken from the enumeration BINDFLAGS; see below. Moniker implementations must ignore any set-bits in this field that they do not understand. |
grfMode | A group of flags that indicates the intended use that the caller has towards the object that he ultimately receives from the associated moniker binding operation. Constants for this member are taken from the STGM enumeration. |
| When applied to the IMoniker::BindToObject operation, by far the most significant flag values are: STGM_READ, STGM_WRITE, and STGM_READWRITE. It is possible that some binding operations might make use of the other flags, particularly STGM_DELETEONRELEASE or STGM_CREATE, but such cases are quite esoteric. |
| When applied to the IMoniker::BindToStorage operation, most STGM values are potentially useful here. |
| The default value for grfMode is STGM_READWRITE | STGM_SHARE_EXCLUSIVE. |
dwTickCount _Deadline | This is an indication of when the caller would like the operation to complete. Having this parameter allows the caller to approximately and heuristically bound the execution time of an operation when it is more important that the operation perform quickly than it is that it perform accurately. Most often, this capability is used with IMoniker::GetTimeOfLastChange, as was previously described, though it can be usefully applied to other operations as well. |
| This 32-bit unsigned value is a time in milliseconds on the local clock maintained by the GetTickCount function. A value of zero indicates "no deadline;" callers should therefore be careful not to pass to the bind context a value of zero that was coincidentally obtained from GetTickCount. Clock wrapping is also a problem. Thus, if the value in this variable is less than the current time by more than 2 [to the 31st power] milliseconds, then it should be interpreted as indicating a time in the future of its indicated value plus 2 [to the 32nd power] milliseconds. |
| Typical deadlines will allow for a few hundred milliseconds of execution. Each function should try to complete its operation by this time on the clock, or fail with the error MK_E_EXCEEDEDDEADLINE if it cannot do so in the time allotted. Functions are not required to be absolutely accurate in this regard, since it is almost impossible to predict how execution might take (thus, callers cannot rely on the operation completing by the deadline), but operations which exceeded their deadline excessively will usually cause intolerable user delays in the operation of their callers. Thus, in practice, the use of deadlines is a heuristic which callers can impose on the execution of moniker operations. |
| If a moniker operation exceeds its deadline because a given object or objects that it uses are not running, and if one of these had been running, then the operation would have completed more of its execution, then the monikers of these objects should be recorded in the bind context using IBindCtx::RegisterObjectParam under the parameter names ExceededDeadline, ExceededDeadline1, ExceededDeadline2, and so forth.; use the first name in this series that is currently unused. This approach gives the caller some knowledge as to when to try the operation again |