Share via


CoRegisterMessageFilter

This function registers with OLE the instance of an EXE application's IMessageFilter interface, which is to be used for handling concurrency issues. DLL object applications cannot register a message filter.

HRESULT CoRegisterMessageFilter(
  LPMESSAGEFILTER lpMessageFilter,
  LPMESSAGEFILTER* lplpMessageFilter 
);

Parameters

  • lpMessageFilter
    [in] Pointer to the IMessageFilter interface on the message filter supplied by the application. Can be NULL, indicating that the current IMessageFilter registration should be revoked.
  • lplpMessageFilter
    [out] Address of IMessageFilter* pointer variable that receives the interface pointer to the previously registered message filter. If there was no previously registered message filter, the value of *lplpMessageFilter is NULL. The value contained in the output variable is rarely NULL, however, containing instead a pointer to the default message filter.

Return Values

  • S_OK
    The IMessageFilter instance registered or revoked successfully.
  • S_FALSE
    Error registering or revoking IMessageFilter instance.

Remarks

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Objbase.h.
Link Library: Ole32.lib.

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.