Registers with OLE the instance of an IMessageFilter interface, which is to be used for handling concurrency issues on the current thread. Only one message filter can be registered for each thread. Threads in multithreaded apartments cannot have message filters.
HRESULT CoRegisterMessageFilter( LPMESSAGEFILTER lpMessageFilter, LPMESSAGEFILTER *lplpMessageFilter );
A pointer to the IMessageFilter interface on the message filter. This message filter should be registered on the current thread, replacing the previous message filter (if any). This parameter can be NULL, indicating that no message filter should be registered on the current thread.
Note that this function calls AddRef on the interface pointer to the message filter.
Address of the IMessageFilter* pointer variable that receives the interface pointer to the previously registered message filter. If there was no previously registered message filter for the current thread, the value of *lplpMessageFilter is NULL.
If the instance was registered or revoked successfully, the return value is S_OK; otherwise, it is S_FALSE.
To revoke the registered message filter, pass the previous message filter (possibly NULL) as the lpMessageFilter parameter to CoRegisterMessageFilter.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|