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. COM
  4. How to deal with such situation?(Need pass STL vector to dll under vs2008) [modified]

How to deal with such situation?(Need pass STL vector to dll under vs2008) [modified]

Scheduled Pinned Locked Moved COM
questionc++comgraphicsdesign
2 Posts 2 Posters 2 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.
  • F Offline
    F Offline
    fantasy1215
    wrote on last edited by
    #1

    I have a COM dll, the dll expose a method BOOL Open(const wchar_t* filename, OUT std::vector<MyStruct>& dataout); The function 'Open' take the parameter filename, to open the file, and construct the data from the file to pass it out to outside world. But of course the client crash in runtime because the CRT problem, I googled and the link give me answer, http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/83a026d8-09b1-4d57-8c4a-ab2d139624b4[^] So if I don't want pass STL vector as out parameter, then How can I design my COM dll to deal with such situation(open read the file and pass out the data)?

    modified on Tuesday, August 24, 2010 2:02 AM

    K 1 Reply Last reply
    0
    • F fantasy1215

      I have a COM dll, the dll expose a method BOOL Open(const wchar_t* filename, OUT std::vector<MyStruct>& dataout); The function 'Open' take the parameter filename, to open the file, and construct the data from the file to pass it out to outside world. But of course the client crash in runtime because the CRT problem, I googled and the link give me answer, http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/83a026d8-09b1-4d57-8c4a-ab2d139624b4[^] So if I don't want pass STL vector as out parameter, then How can I design my COM dll to deal with such situation(open read the file and pass out the data)?

      modified on Tuesday, August 24, 2010 2:02 AM

      K Offline
      K Offline
      KingsGambit
      wrote on last edited by
      #2

      You can check if a safe array helps instead of vector.

      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