Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

amarasat

@amarasat
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?)
    A amarasat

    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.

    Java c++ question java tutorial

  • Equivalent Java Function - having a return type of BSTR (How to implement BSTR* in JAVA?)
    A amarasat

    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?

    Java c++ question java tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups