Share via


CoRegisterMessageFilter (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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 Value

  • 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

Header objbase.h
Library ole32.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

COM Functions