This section shows some IDL declarations and their corresponding Java declarations.
HRESULT Func([in] int x); void Func(int x); HRESULT Func([in,out] int* x); void Func(int[] x); HRESULT Func([out,retval] int* x); int Func();
HRESULT Func([in] BSTR x); void Func(java.lang.String x); HRESULT Func([in,out] BSTR* x); void Func(java.lang.String[] x); HRESULT Func([out,retval] BSTR* x); java.lang.String Func();
HRESULT Func([in] VARIANT x); void Func(com.ms.com.Variant x); HRESULT Func([in] VARIANT* x); void Func(com.ms.com.Variant x); HRESULT Func([in,out] VARIANT* x); void Func(com.ms.com.Variant x); HRESULT Func([out,retval] VARIANT* x); com.ms.com.Variant Func(); HRESULT Func([in,out] VARIANT** x); void Func(com.ms.com.Variant[] x);
HRESULT Func([in] IBar* x); void Func(IBar x); HRESULT Func([in,out] IBar** x); void Func(IBar[] x); HRESULT Func([out,retval] IBar** x);IBar Func();
For more information on HRESULTs returned by COM functions, see Handling COM Errors in Java.