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. Returning an array of strings

Returning an array of strings

Scheduled Pinned Locked Moved COM
questioncomdata-structureshelp
1 Posts 1 Posters 4 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.
  • P Offline
    P Offline
    Pros Chum
    wrote on last edited by
    #1

    How do I return an array of strings in IDL and COM? E.g. I would like a function that does something like this: struct StringListType { long m_lNumStrings; [string, size_is(lNumStrings)] wchar_t ** pStrings; // Is this correct??? }; void GetStrings( [out] struct StringListType * pStringList ) { wchar_t Str1[] = "A silly string!"; wchar_t Str2[] = "You're da bomb :)"; // What goes here to put Str1 and Str2 into pStringList??? } I know I have to do some TaskMemAlloc() but am not sure of the correct way to do it. Also, I'm not sure of the proper way to specify an array of strings in the IDL above. Thanxs for any help! ;)

    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