Condividi tramite


IBindHost::CreateMoniker method

Creates a moniker to bind to a URL.

Syntax

HRESULT CreateMoniker(
  [in]  LPOLESTR szName,
  [in]  IBindCtx *pBC,
  [out] IMoniker **ppmk,
  [in]  DWORD    dwReserved
);

Parameters

  • szName [in]
    A pointer to a string that contains the URL to bind to.

  • pBC [in]
    A pointer to the IBindCtx interface of the optional bind context that is used when the moniker is created. This parameter is currently ignored, but might be used later for passing additional information.

  • ppmk [out]
    A pointer to the IMoniker interface of the moniker that is created.

  • dwReserved [in]
    Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code Description
S_OK

The moniker was successfully obtained, and the caller is responsible for the interface pointer.

E_OUTOFMEMORY

There is insufficient memory to create the moniker.

E_UNEXPECTED

An unknown error occurred.

MK_E_SYNTAX

The bind host was unable to parse the string into a moniker because the information in the name was unrecognizable.

 

Remarks

E_NOTIMPL is disallowed—a bind host is responsible for providing moniker parsing services.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Product

Internet Explorer 4.0

DLL

Urlmon.dll

See also

IBindHost