Skip to content

Latest commit

 

History

History
93 lines (69 loc) · 3.41 KB

nf-ctxtcall-icontextcallback-contextcallback.md

File metadata and controls

93 lines (69 loc) · 3.41 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:ctxtcall.IContextCallback.ContextCallback
IContextCallback::ContextCallback (ctxtcall.h)
Enters the object context, executes the specified function, and returns.
ContextCallback
ContextCallback method [COM]
ContextCallback method [COM]
IContextCallback interface
IContextCallback interface [COM]
ContextCallback method
IContextCallback.ContextCallback
IContextCallback::ContextCallback
_com_icontextcallback_contextcallback
com.icontextcallback_contextcallback
ctxtcall/IContextCallback::ContextCallback
com\icontextcallback_contextcallback.htm
com
7446792e-7f29-4ad4-8245-b86f63f2df18
12/05/2018
ContextCallback, ContextCallback method [COM], ContextCallback method [COM],IContextCallback interface, IContextCallback interface [COM],ContextCallback method, IContextCallback.ContextCallback, IContextCallback::ContextCallback, _com_icontextcallback_contextcallback, com.icontextcallback_contextcallback, ctxtcall/IContextCallback::ContextCallback
ctxtcall.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Ctxtcall.idl
Windows
19H1
IContextCallback::ContextCallback
ctxtcall/IContextCallback::ContextCallback
c++
APIRef
kbSyntax
COM
Ctxtcall.h
IContextCallback.ContextCallback

IContextCallback::ContextCallback

-description

Enters the object context, executes the specified function, and returns.

-parameters

-param pfnCallback [in]

The function to be called inside the object context.

-param pParam [in]

The data to be passed to the function when it is called in the context.

-param riid [in]

The IID of the call that is being simulated. See Remarks for more information.

-param iMethod [in]

The method number of the call that is being simulated. See Remarks for more information.

-param pUnk [in]

This parameter is reserved and must be NULL.

-returns

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL. If none of these failures occur, the return value of this function is the HRESULT value returned by the pfnCallback function.

-remarks

This method simulates a method call on an object inside the context. It is intended for low-level operations, such as cleanup/lazy marshaling, that respect the application's reentrancy expectations.

To give the infrastructure information, an interface and method number must be specified. The parameter riid must not be IID_IUnknown, and the method number must not be less than 3.

If riid is set to IID_IEnterActivityWithNoLock, the function is executed without an activity lock.

If riid is set to IID_ICallbackWithNoReentrancyToApplicationSTA, the function does not reenter an ASTA arbitrarily. Most apps should set riid to this values for general purpose use.

-see-also

IContextCallback