passing std::map from one dll to another

This is a discussion on passing std::map from one dll to another within the Windows Programming forums, part of the Platform Specific Boards category; Hello! I've run in a serious problem while I tried to pass an std::map from one DLL to another as ...

  1. #1
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463

    Angry passing std::map from one dll to another

    Hello!

    I've run in a serious problem while I tried to pass an std::map from one DLL to another as a reference.
    Let's call them DLL1 and DLL2.
    DLL1 is calling function func( (std::map*)& map_in ) from DLL2, passing to the function an std::map as reference

    func( map_in );

    When the finction from DLL2 tries to iterate through the received map values, comes an "Access violation"!

    Apparently, there are two static members in the _Tr member (type _Tree): _Nil es _Nilref, and these are different in the two DLL-s... ?

    Any ideas? Is this a known problem?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786

  3. #3
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Thank you very much! So, the static members were the problem!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Passing .Net Bitmap to C++ Dll
    By xJJx in forum C++ Programming
    Replies: 4
    Last Post: 01-30-2009, 04:16 AM
  2. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  3. Passing an Array of Strings from VB to a C DLL
    By mr_nice! in forum Windows Programming
    Replies: 9
    Last Post: 03-08-2005, 05:16 AM
  4. Passing UDTs from VBA to C DLL
    By Nelviticus in forum Windows Programming
    Replies: 0
    Last Post: 06-11-2003, 09:57 AM
  5. Passing parameters from VB to C++ through ActiveX DLL
    By torbjorn in forum Windows Programming
    Replies: 0
    Last Post: 12-10-2002, 02:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21