Microsoft SDK for Java

MarshalCallToJavaObjectHostThread

Re-executes the Raw Native Interface (RNI) method on the apartment thread ID for the supplied Java object.

Syntax

HRESULT __cdecl MarshalCallToJavaObjectHostThread(Hjava_lang_Object *phobj, int64_t *pResult);

Parameters

*phobj The address of the Java object.
*pResult The address of the value to be returned upon S_FALSE.

Remarks

MarshalCallToJavaObjectHostThread and MarshalCallToJavaThreadID return the following sets of HRESULTs:

S_OK -- The call was successfully marshaled to the target thread. The marshaled call may have generated an exception, which can be checked by calling exceptionOccurred.

S_FALSE -- The call did not require marshaling to the other thread. The currently executing thread is the target thread.

E_<> -- An error occurred inside the MarshalCall API, such as invalid arguments, out of memory, and so on.

The typical use of these APIs is to call the appropriate MarshalCall API and if the HRESULT is S_FALSE, execute the rest of the RNI method; otherwise, return with the value contained in pResult.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.