|
|
|
IParseDisplayName Interface |
|
IID_IParseDisplayName |
{0000011A-0000-0000-C000-000000000046} |
|
The IParseDisplayName interface parses a displayable name string to convert it into a moniker for custom moniker implementations.
In general, the maximum prefix of szDisplayName that is syntactically valid and that represents an object should be consumed by this method and converted to a moniker.
Typically, this method is called by MkParseDisplayName[Ex]. In the initial step of the parsing operation, the MkParseDisplayName[Ex] function can retrieve the IParseDisplayName interface directly from an instance of a class identified with either the "@ProgID" or "ProgID" notation. Subsequent parsing steps can query for the interface on an intermediate object.
The main loop of MkParseDisplayName[Ex] finds the next moniker piece by calling the equivalent method in the IMoniker interface, that is, IMoniker::ParseDisplayName, on the moniker that it currently holds. In this call to IMoniker::ParseDisplayName, the MkParseDisplayName[Ex] function passes NULL in the pmkToLeft parameter. If the moniker currently held by MkParseDisplayName[Ex] is a generic composite, the call to IMoniker::ParseDisplayName is forwarded by that composite onto its last piece, passing the prefix of the composite to the left of the piece in pmkToLeft.
Some moniker classes will be able to handle this parsing internally to themselves since they are designed to designate only certain kinds of objects. Others will need to bind to the object that they designate to accomplish the parsing process. As is usual, these objects should not be released by IMoniker::ParseDisplayName but instead should be transferred to the bind context via IBindCtx::RegisterObjectBound or IBindCtx::GetRunningObjectTable followed by IRunningObjectTable::Register for release at a later time.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IParseDisplayName Method |
Description |
|
ParseDisplayName |
Parses the display name returning a moniker corresponding to it. |
|
ParseDisplayName |
|
FUNCTION IParseDisplayName_ParseDisplayName ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pbc AS DWORD _ , BYVAL strDisplayName AS STRING _ , BYREF pchEaten AS DWORD _ , BYREF ppmkOut AS DWORD _ )
AS LONG strDisplayName = UCODE$(strDisplayName) & $NUL CALL DWORD @@pthis[3]
USING IParseDisplayName_ParseDisplayName
(pthis, pbc, strDisplayName, pchEaten,
ppmkOut) TO HRESULT
|
Page last updated on Thursday, 16 March 2006 02:34:51 +0100