Argument | Type | Description |
pbc | IBindCtx* | The binding context in which to accumulate bound objects. |
lpszDisplayName | LPSTR | The display name to be parsed. |
pcchEaten | ULONG* | On exit the number of characters of the display name that was successfully parsed. Most useful on syntax error. |
ppmk | IMoniker* | The resulting moniker. |
return value | HRESULT | S_OK, MK_E_SYNTAX. |
\ / : ! [
Standardization in delimiters promotes usability. But more importantly, notice that the parsing algorithm has the characteristic that a given container consumes as much as it can of the string being parsed before passing the remainder on to the designated object inside themselves. If the delimiter expected of the next-to-be-generated moniker in fact forms (part of) a valid display name in the container, then the container's parse will consume it!
Monikers and objects which have implementations on more than one platform (such as File Monikers) should always parse according to the syntax of the platform on which they are currently running. When asked for their display name, monikers should also show delimiters appropriate to the platform on which they are currently running, even if they were originally created on a different platform. In total, users will always deal with delimiters appropriate for the host platform.
The initial step of the parsing process is a bit tricky, in that it needs to somehow determine the initial moniker-so-far. MkParseDisplayName is omniscient with respect to the syntax with which the display name of a moniker may legally begin, and it uses this omniscience to choose the initial moniker.
The initial moniker is determined by trying the following strategies in order, using the first to succeed.