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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Passing Array of Strings as BSTR*

Passing Array of Strings as BSTR*

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++javavisual-studiodata-structures
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arun1405
    wrote on last edited by
    #1

    Hi Folks, I am trying to access a java webservice from Visual C++ .NET. This java webservice has following method. public void CreateDoc(String[][] values); When I add webreference to this webservice in my visual studio .net environment, it changes the method to look like as following. HRESULT CreateDoc(BSTR* arrayOfarrayOfString_1, int arrayOfarrayOfString_1_nSizeIs); So, now in my visual c++ code, I have to pass a string array in this above format of BSTR*. I have tried a lot achieving this but no success ! Can anyone give me some idea how to do that ? Thanks in advance, Arun.

    A E 2 Replies Last reply
    0
    • A arun1405

      Hi Folks, I am trying to access a java webservice from Visual C++ .NET. This java webservice has following method. public void CreateDoc(String[][] values); When I add webreference to this webservice in my visual studio .net environment, it changes the method to look like as following. HRESULT CreateDoc(BSTR* arrayOfarrayOfString_1, int arrayOfarrayOfString_1_nSizeIs); So, now in my visual c++ code, I have to pass a string array in this above format of BSTR*. I have tried a lot achieving this but no success ! Can anyone give me some idea how to do that ? Thanks in advance, Arun.

      A Offline
      A Offline
      Antony M Kancidrowski
      wrote on last edited by
      #2

      Are you using SafeArrayAccessData before manipulation the BSTR* array? Ant. I'm hard, yet soft.
      I'm coloured, yet clear.
      I'm fruity and sweet.
      I'm jelly, what am I? Muse on it further, I shall return!
      - David Williams (Little Britain)

      1 Reply Last reply
      0
      • A arun1405

        Hi Folks, I am trying to access a java webservice from Visual C++ .NET. This java webservice has following method. public void CreateDoc(String[][] values); When I add webreference to this webservice in my visual studio .net environment, it changes the method to look like as following. HRESULT CreateDoc(BSTR* arrayOfarrayOfString_1, int arrayOfarrayOfString_1_nSizeIs); So, now in my visual c++ code, I have to pass a string array in this above format of BSTR*. I have tried a lot achieving this but no success ! Can anyone give me some idea how to do that ? Thanks in advance, Arun.

        E Offline
        E Offline
        eight
        wrote on last edited by
        #3

        Arun, did you manage to find a way to do it?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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