This method of the IMoniker interface 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.
public IMoniker ParseDisplayName(IBindCtx pbc, IMoniker pmkToLeft, String pszDisplayName, int[] pchEaten);
The method supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:
S_OK -- The parsing operation was completed successfully.
MK_E_SYNTAX -- An error in the syntax of the input components (pmkToLeft, this moniker, and pszDisplayName). For example, a file moniker returns this error if pmkToLeft is non-NULL, and an item moniker returns it if pmkToLeft is NULL.
IMoniker.BindToObject errors -- Parsing display names may cause binding. Thus, any error associated with this function may be returned.
[in] pbc | Pointer to the IBindCtx interface on the bind context to be used in this binding operation. The bind context caches objects bound during the binding process, contains parameters that apply to all operations using the bind context, and provides the means by which the moniker implementation should retrieve information about its environment. |
[in] pmkToLeft | Pointer to the IMoniker interface on the moniker that has been built out of the display name up to this point. |
[in] pszDisplayName | Pointer to a zero-terminated string containing the remaining display name to be parsed. For Win32 applications, the LPOLESTR type indicates a wide character string (two bytes per character); otherwise, the string has one byte per character. |
[out] pchEaten | Pointer to the number of characters in pszDisplayName that were consumed in this step. |