Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function registers with OLE the instance of an EXE application's IMessageFilterinterface, 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 IMessageFilterinterface on the message filter supplied by the application. Can be NULL, indicating that the current IMessageFilterregistration 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 * lplpMessageFilteris 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 IMessageFilterinstance registered or revoked successfully.
- S_FALSE
-
Error registering or revoking IMessageFilterinstance.
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 |
Windows Mobile | Windows Mobile Version 5.0 and later |