Export (0) Print
Expand All

MkParseDisplayNameEx function

Creates a moniker to the object that is specified by the given string.

Syntax


HRESULT MkParseDisplayNameEx(
  _In_   IBindCtx *pbc,
  _In_   LPWSTR szDisplayName,
  _Out_  unsigned long *pcchEaten,
  _Out_  IMoniker **ppmk
);

Parameters

pbc [in]

The address of the IBindCtx interface of the bind context in which to accumulate bound objects.

szDisplayName [in]

The address of the string value to parse.

pcchEaten [out]

The address of an unsigned long integer value that indicates the number of characters successfully parsed.

ppmk [out]

A pointer to the IMoniker interface of the resulting moniker.

Return value

Returns one of the following values.

Return codeDescription
S_OK

Successful.

E_OUTOFMEMORY

There is insufficient memory to complete the operation.

INET_E_UNKNOWN_PROTOCOL

The szDisplayName parameter contains a protocol (other than telnet) that does not have a valid protocol handler assigned.

MK_E_SYNTAX

Parsing failed because szDisplayName can only be partially resolved into a moniker. In this case, pcchEaten receives the number of characters that are successfully parsed into a moniker prefix.

NOERROR

The szDisplayName uses a telnet protocol, for which the function does not have a valid protocol handler.

 

Remarks

When MK_E_SYNTAX is returned and pcchEaten contains a nonzero value, a subsequent call to MkParseDisplayNameEx with the same pbc parameter and a shortened szDisplayName parameter returns a valid moniker.

Security Warning:  Calling MkParseDisplayName or MkParseDisplayNameEx with a szDisplayName parameter from a non-trusted source is unsafe. Not only can an arbitrary class be instantiated but some moniker implementations might act on the string during parsing instead of deferring this to binding.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Product

Internet Explorer 3.0

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll

See also

IParseDisplayName

 

 

Show:
© 2014 Microsoft