Skip to content

Latest commit

 

History

History
136 lines (107 loc) · 5.26 KB

nf-objidl-imessagefilter-handleincomingcall.md

File metadata and controls

136 lines (107 loc) · 5.26 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:objidl.IMessageFilter.HandleInComingCall
IMessageFilter::HandleInComingCall (objidl.h)
Provides a single entry point for incoming calls.
HandleInComingCall
HandleInComingCall method [COM]
HandleInComingCall method [COM]
IMessageFilter interface
IMessageFilter interface [COM]
HandleInComingCall method
IMessageFilter.HandleInComingCall
IMessageFilter::HandleInComingCall
_com_imessagefilter_handleincomingcall
com.imessagefilter_handleincomingcall
objidl/IMessageFilter::HandleInComingCall
com\imessagefilter_handleincomingcall.htm
com
7e31b518-ef4f-4bdd-b5c7-e1b16383a5be
12/05/2018
HandleInComingCall, HandleInComingCall method [COM], HandleInComingCall method [COM],IMessageFilter interface, IMessageFilter interface [COM],HandleInComingCall method, IMessageFilter.HandleInComingCall, IMessageFilter::HandleInComingCall, _com_imessagefilter_handleincomingcall, com.imessagefilter_handleincomingcall, objidl/IMessageFilter::HandleInComingCall
objidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
ObjIdl.idl
Windows
19H1
IMessageFilter::HandleInComingCall
objidl/IMessageFilter::HandleInComingCall
c++
APIRef
kbSyntax
COM
ObjIdl.h
IMessageFilter.HandleInComingCall

IMessageFilter::HandleInComingCall

-description

Provides a single entry point for incoming calls.

This method is called prior to each method invocation originating outside the current process and provides the ability to filter or reject incoming calls (or callbacks) to an object or a process.

-parameters

-param dwCallType [in]

The type of incoming call that has been received. Possible values are from the enumeration CALLTYPE.

-param htaskCaller [in]

The thread id of the caller.

-param dwTickCount [in]

The elapsed tick count since the outgoing call was made, if dwCallType is not CALLTYPE_TOPLEVEL. If dwCallType is CALLTYPE_TOPLEVEL, dwTickCount should be ignored.

-param lpInterfaceInfo [in]

A pointer to an INTERFACEINFO structure that identifies the object, interface, and method being called. In the case of DDE calls, lpInterfaceInfo can be NULL because the DDE layer does not return interface information.

-returns

This method can return the following values.

Return code Description
SERVERCALL_ISHANDLED
The application might be able to process the call.
SERVERCALL_REJECTED
The application cannot handle the call due to an unforeseen problem, such as network unavailability, or if it is in the process of terminating.
SERVERCALL_RETRYLATER
The application cannot handle the call at this time. An application might return this value when it is in a user-controlled modal state.

-remarks

If implemented, HandleInComingCall is called by COM when an incoming COM message is received.

Depending on an application's current state, a call is either accepted and processed or rejected (permanently or temporarily). If SERVERCALL_ISHANDLED is returned, the application may be able to process the call, although success depends on the interface for which the call is destined. If the call cannot be processed, COM returns RPC_E_CALL_REJECTED.

Input-synchronized and asynchronous calls are dispatched even if the application returns SERVERCALL_REJECTED or SERVERCALL_RETRYLATER.

HandleInComingCall should not be used to hold off updates to objects during operations such as band printing. For that purpose, use IViewObject::Freeze.

You can also use HandleInComingCall to set up the application's state so that the call can be processed in the future.

Note  Although the htaskCaller parameter is typed as an HTASK, it contains the thread id of the calling thread. When you implement the IMessageFilter interface, you can call the OpenThread function to get the thread handle from the htaskCaller parameter, and you can call the GetProcessIdOfThread function to get the process id.
 

-see-also

IMessageFilter