IBindHost::CreateMoniker

Provides the caller with a means to turn text string into a moniker such that the caller does not have to interpret the name in any way itself. In many cases, the implementation of IBindHost::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. Specifically, IBindHost::CreateMoniker should resolve relative path names into absolute pathnames when interpreting the pszName.

HRESULT CreateMoniker(
  LPOLESTR  pszName,  //Pointer to the string to parse
  IMoniker ** ppmk    //Address of output variable that receives the 
                      // IMoniker interface pointer
);
 

Parameters

pszName
[in] Pointer to the string containing the name to parse.
ppmk
[out] Address of IMoniker* pointer variable that receives the interface pointer to the moniker created from pszName. The caller is responsible for calling IMoniker::Release when the moniker is no longer needed.

Return 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 unexpected 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.

Remarks

E_NOTIMPL is not allowed — a bind host is responsible for providing moniker parsing services.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in urlmon.h.