Passing std::set and std::map objects between 2 dlls 
Author Message
 Passing std::set and std::map objects between 2 dlls

Hi

I am creating a set (stl) in dll A and passing it to a method in dll B.
since MFC has implemented stl set with a Tree (which has got a static
member), the static member is re-intialised to 0x00000 upon entering
the method in dll 'B'. is there a way to prevent this or should I abandon
stl in a more than 1-dll case.

any help is appreciated
shankar
ps:Opinions are my own, and do not necessarily represent those of my
employer.



Fri, 06 Apr 2001 03:00:00 GMT  
 Passing std::set and std::map objects between 2 dlls

Quote:

>I am creating a set (stl) in dll A and passing it to a method in dll B.
>since mfc has implemented stl set with a Tree (which has got a static
>member), the static member is re-intialised to 0x00000 upon entering
>the method in dll 'B'. is there a way to prevent this or should I abandon
>stl in a more than 1-dll case.

You can get the fix for <xtree> from:

http://www.dinkumware.com/vc_fixes.html

It eliminates the static member.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com/hot_news.html



Fri, 06 Apr 2001 03:00:00 GMT  
 Passing std::set and std::map objects between 2 dlls
Hi

It really worked ; thanks;
1 real question. Is it possible for you to ask MS to incorporate your fix
atleast in the patch for vc 6.0 (as another poster observed, it is not done
in vc 6.0) as this would avoid getting ur fix from
ur website onceagain.

Thanks for your timely help once again
shankar

Quote:


>>I am creating a set (stl) in dll A and passing it to a method in dll B.
>>since mfc has implemented stl set with a Tree (which has got a static
>>member), the static member is re-intialised to 0x00000 upon entering
>>the method in dll 'B'. is there a way to prevent this or should I abandon
>>stl in a more than 1-dll case.

>You can get the fix for <xtree> from:

>http://www.dinkumware.com/vc_fixes.html

>It eliminates the static member.

>P.J. Plauger
>Dinkumware, Ltd.
>http://www.dinkumware.com/hot_news.html



Sun, 15 Apr 2001 03:00:00 GMT  
 Passing std::set and std::map objects between 2 dlls

Quote:
>It really worked ; thanks;
>1 real question. Is it possible for you to ask MS to incorporate your fix
>atleast in the patch for vc 6.0 (as another poster observed, it is not done
>in vc 6.0) as this would avoid getting ur fix from
>ur website onceagain.

Right now, I'm busy developing the most comprehensive update I can for
Microsoft. Once that's done, I'll discuss with them what we can do in the
way of an SP, or a more informal patch from Dinkumware.

Quote:
>Thanks for your timely help once again

Welcome.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com/hot_news.html



Sun, 15 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. passing std::map based objects from an app to a dll

2. Std::set and passing between DLLs

3. export classes using std namespace (ex std::vector) in a DLL

4. Exporting STL containers (specifically std::map) from DLL?

5. std::map.find() crashing in DLL

6. MFC Extension DLL and std::map

7. mem leaks when using std::map in a dll

8. std::map compiler stack overflow when DLL

9. std::vector passed to DLL class never arrives???

10. HELP: Passing std::list to a DLL

11. passing std::ofstream by reference to DLL

12. passing std::vector to a DLL by reference

 

 
Powered by phpBB® Forum Software