Click here to Skip to main content
15,886,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having a ComServer, and its outlined functions are implemneted in C++. Below is the Cpp function.

HRESULT cIntuneServer::GetActiveProjectName(/*([out]*/ BSTR* nameOfProject)
{
        CComBSTR projectName(L"\\Default\\");

        *nameOfProject = projectName;
        return S_OK;
}



I tried to implement the same function in Java:

JIString outStr = new JIString("");
dispatch.callMethod("GetActiveProjectName", new Object[]{outStr});
System.out.println("Out String = "+outStr.toString();


OUTPUT:

Out String = [Type: 1 , []]

How do i implement this in java?, I knew i am doing something worng, how do i get the BSTR* value to the OutStr in Java?
Posted

1 solution

I guess you can use java.lang.String
 
Share this answer
 
Comments
amarasat 6-Dec-10 14:14pm    
How to use it, can you please let me know for above example, i have been searching online to use that class but i don't see any examples!!

The only info i was able to get is to use JIVariant.OUTPARAMforType(...) method, but i am new to jave so was not able to implement i to above example!!
«_Superman_» 6-Dec-10 14:17pm    
I do not have more information regarding this.
You could try a Java forum.
There is one on CP - http://www.codeproject.com/Forums/1643/Java.aspx
amarasat 6-Dec-10 14:34pm    
Thanks, posted there, should see what happens!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900