You are right jschell, i posted it at oracle forums too, the thing is no one was actually helping at the J-Interop forum, so i have been posting at some other good forums for help etc... My only aim is to read a string from a cpp function, doesn't matter if i am using a wrapper. At least if someone could help me how to do this using Native or Standard Java without a wrapper like an example or something. Maybe i can proceed from there.
A
amarasat
@amarasat
Posts
-
Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?) -
Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?)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?