Contents Index Topic Contents | ||
Previous Topic: IBindHost Next Topic: IBindHost::MonikerBindToObject |
IBindHost::CreateMoniker
HRESULT CreateMoniker( LPCOLESTR pszName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved);Provides the caller with a means to turn some sort of text name into a moniker so that the caller does not have to interpret the name in any way itself. In many cases, the implementation of CreateMoniker will simply call MkParseDisplayNameEx, but this method gives the implementor of IBindHost a chance to catch host-specific strings that MkParseDisplayNameEx would not otherwise recognize.
- Returns one of the following values:
S_OK The moniker was successfully obtained and the caller is responsible for the interface pointer. E_OUTOFMEMORY There is insufficient memory to create the moniker. E_UNEXPECTED An unknown error occurred. MK_E_SYNTAX The bind host was unable to parse the string into a moniker because the information in the name was unrecognizable.
- pszName
- [in] Address of the string containing the name to parse.
- pBC
- [in] Optional bind context to be used when creating the moniker. This parameter is currently ignored, but may be used in the future for passing additional information.
- ppmk
- [out] Address of the caller's IMoniker * variable in which to store the moniker created from pszName. The caller is responsible for calling IMoniker::Release when the moniker is no longer needed.
- dwReserved
- [in] Reserved for future use, must be zero.
E_NOTIMPL is disalloweda bind host is responsible for providing moniker parsing services.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.