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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. Passing of Array

Passing of Array

Scheduled Pinned Locked Moved COM
questioncsharpjavacomdata-structures
3 Posts 2 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.
  • L Offline
    L Offline
    Logan from Singapore
    wrote on last edited by
    #1

    Hi, I had been trying to find methods to pass array from a COM DLL and had come across 2 ways of doing it. method(SafeArray(Type) **pVal); method(Variant *pVal); What is the different between passing the array out as a SafeArray and as a Variant? What is the advantage of using either of them? Are both methods supported by all technologies like .Net, Java, etc...?

    J 1 Reply Last reply
    0
    • L Logan from Singapore

      Hi, I had been trying to find methods to pass array from a COM DLL and had come across 2 ways of doing it. method(SafeArray(Type) **pVal); method(Variant *pVal); What is the different between passing the array out as a SafeArray and as a Variant? What is the advantage of using either of them? Are both methods supported by all technologies like .Net, Java, etc...?

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #2

      w_logan wrote: Are both methods supported by all technologies like .Net, Java, etc...? SafeArray(Type) is not supported by VB if my memory serves me right. It requires to stuff the array inside a variant.

      L 1 Reply Last reply
      0
      • J Jorgen Sigvardsson

        w_logan wrote: Are both methods supported by all technologies like .Net, Java, etc...? SafeArray(Type) is not supported by VB if my memory serves me right. It requires to stuff the array inside a variant.

        L Offline
        L Offline
        Logan from Singapore
        wrote on last edited by
        #3

        Thanks for replying. I also happened to read about this in your interest exchange below after I had posted the thread. This had cleared my doubts on why people are passing it as a Variant:-D.

        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