Reads as many characters of the specified display name as it understands and builds a moniker corresponding to the portion read; this procedure is known as "parsing" the display name.
HRESULT ParseDisplayName(
IBindCtx *pbc, //Pointer to bind context to be used
IMoniker *pmkToLeft, //Pointer to moniker to the left in the
//composite
LPOLESTR pszDisplayName, //Pointer to display name
ULONG *pchEaten, //Pointer to number of characters consumed
IMoniker **ppmkOut //Address of output variable that receives
//the IMoniker interface pointer
);
The method supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:
Moniker clients do not typically call IMoniker::ParseDisplayName directly. Instead, they call the MkParseDisplayName function when they want to convert a display name into a moniker (for example, in implementing the Links dialog box for a container application, or for implementing a macro language that supports references to objects outside the document). That function first parses the initial portion of the display name itself.
It then calls IMoniker::ParseDisplayName on the moniker it has just created, passing the remainder of the display name and getting a new moniker in return; this step is repeated until the entire display name has been parsed.
Your implementation may be able to perform this parsing by itself if your moniker class is designed to designate only certain kinds of objects. Otherwise, you must get an IParseDisplayName interface pointer for the object identified by the moniker-so-far (i.e., the composition of pmkToLeft and this moniker) and then return the results of calling IParseDisplayName::ParseDisplayName.
There are different strategies for getting an IParseDisplayName pointer:
Any objects that are bound should be registered with the bind context (see IBindCtx::RegisterObjectBound) to ensure that they remain running for the duration of the parsing operation.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
IParseDisplayName, MkParseDisplayName