# IHlinkBrowseContext::Register

Registers an object with the browse context.

HRESULT Register(

DWORD dwReserved, | // Reserved for future use
IUnknown piunk, | // Object being registered
IMoniker * pimk, | // Moniker interface pointer of the object being registered
DWORD * pdwRegister | // Receives the registration value
); |

Parameters

dwReserved
  [in] Reserved for future use; must be set to zero by the caller. To ensure compatibility with future use, the callee must not check for zero.
piunk
  [in, unique] The object being registered.
pimk
  [in, unique] Pointer to the IMoniker interface pointer that identifies the object being registered.
pdwRegister
  [out] Pointer to a location to return a value identifying the registration which can be used to subsequently revoke the registration.

Return Values

S_OK
  The object has been registered.
MK_S_MONIKERALREADYREGISTERED
  The object was successfully registered, but another object (possibly the same object) has already been registered with the same moniker in this browse context.
E_OUTOFMEMORY
  There was insufficient memory to register the object with the browse context.

See Also

HlinkCreateBrowseContext, IHlinkBrowseContext::Close, IHlinkBrowseContext::Revoke