Article ID: 178560
Article Last Modified on 6/14/2006
........
interface ITest : IDispatch
{
[id(1), helpstring("Hello")] HRESULT TestMethod(BSTR* strGUID);
};
..........
............. public: STDMETHOD(TestMethod)(BSTR* a);Following are its implementation:
// Test.cpp : Implementation of CTes
..................
STDMETHODIMP CTest::TestMethod(BSTR* a)
{
USES_CONVERSION;
*a = SysAllocString(T2OLE("This is a test!"));
return S_OK;
}
import atlserv.*; //This is your ATl Server Object
//created in Step 1.
public class Main
{
public static void main(String args[])
{
ITest a = (ITest) new Test();
String result[]=new String[1];
a.TestMethod(result);
System.out.println(result[0]);
}
}
interface ITest : IDispatch
{
[id(1), helpstring("Hello")] HRESULT TestMethod([out]BSTR*
strGUID);
};
Additional query words: NoClassDefFoundError atl server com
Keywords: kbprb KB178560