Click here to Skip to main content
16,005,138 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Slicing in C++ Pin
Milton Karimbekallil17-Apr-06 5:00
Milton Karimbekallil17-Apr-06 5:00 
GeneralRe: Slicing in C++ Pin
Krishnatv17-Apr-06 19:35
Krishnatv17-Apr-06 19:35 
QuestionNEED HELP Pin
malik20017-Apr-06 2:31
malik20017-Apr-06 2:31 
AnswerRe: NEED HELP Pin
David Crow17-Apr-06 3:31
David Crow17-Apr-06 3:31 
QuestionCan I do this? Pin
ewighell17-Apr-06 2:20
ewighell17-Apr-06 2:20 
AnswerRe: Can I do this? Pin
Stephen Hewitt17-Apr-06 2:53
Stephen Hewitt17-Apr-06 2:53 
AnswerRe: Can I do this? Pin
YaronNir17-Apr-06 4:18
YaronNir17-Apr-06 4:18 
QuestionImporting class containing STL map from DLL Pin
Marko Budisic17-Apr-06 1:37
Marko Budisic17-Apr-06 1:37 
Hi!

In my project, I am importing a class which contains a STL map as a member from a DLL (not written by me). My goal is to inherit a class and then add function that needs to access the map directly, i.e. there are no functions that return reference to this map so I could avoid map's protected scope. Class already contains similar functions that work properly.

(To demistify things a bit, the class is used for communication and uses TCP protocol via its own functions. I would like to inherit from the class and override some of the functions to make them use UDP protocol).

The problem is when my function is trying to access the map (at run-time), the whole thing crashes. Using VS2005 debugger, I have detected that in my function, the map object seems to be invalid (it still appears to be of map type but its size and content do not make any sense). If I try to log the content of the map (instead of accessing it) using functions which are already in the class, everything passes OK.

What puzzles me is that I managed to achieve the same thing a few months ago in another project, but I can't retrace my steps or reproduce the same result. I never changed and/or recompiled the library.

TIA for your help (and I apologize for the length)

Marko

P.S. Class header file looks in short like this:

#include ...

class OriginalClass {

public:
...
_declspec(dllimport) Function();
...

protected:
map<string, unsigned="" int=""> myMap;

};
AnswerRe: Importing class containing STL map from DLL Pin
Roland Pibinger17-Apr-06 6:18
Roland Pibinger17-Apr-06 6:18 
GeneralRe: Importing class containing STL map from DLL Pin
Marko Budisic17-Apr-06 6:28
Marko Budisic17-Apr-06 6:28 
QuestionZooming with SetViewportExt and SetWindowExt Pin
Cosescu Bogdan17-Apr-06 1:16
Cosescu Bogdan17-Apr-06 1:16 
QuestionRepainting a child window Pin
Sarvan AL17-Apr-06 1:12
Sarvan AL17-Apr-06 1:12 
AnswerRe: Repainting a child window Pin
YaronNir17-Apr-06 4:25
YaronNir17-Apr-06 4:25 
AnswerRe: Repainting a child window Pin
Hamid_RT17-Apr-06 19:32
Hamid_RT17-Apr-06 19:32 
GeneralRe: Repainting a child window Pin
Sarvan AL17-Apr-06 21:07
Sarvan AL17-Apr-06 21:07 
QuestionWhere has it gone?? Pin
Smith#17-Apr-06 0:49
Smith#17-Apr-06 0:49 
AnswerRe: Where has it gone?? Pin
Jim Jim17-Apr-06 1:52
Jim Jim17-Apr-06 1:52 
QuestionVariable Y-Axis Pin
RockyJames17-Apr-06 0:30
RockyJames17-Apr-06 0:30 
AnswerRe: Variable Y-Axis Pin
Nishad S17-Apr-06 0:47
Nishad S17-Apr-06 0:47 
GeneralRe: Variable Y-Axis Pin
RockyJames17-Apr-06 1:01
RockyJames17-Apr-06 1:01 
GeneralRe: Variable Y-Axis Pin
Nishad S17-Apr-06 1:13
Nishad S17-Apr-06 1:13 
QuestionRotation of multiline text Pin
Shailesh Ha17-Apr-06 0:16
Shailesh Ha17-Apr-06 0:16 
AnswerRe: Rotation of multiline text Pin
Stephen Hewitt17-Apr-06 4:15
Stephen Hewitt17-Apr-06 4:15 
Questioncolor button Pin
himuskanhere16-Apr-06 23:55
himuskanhere16-Apr-06 23:55 
AnswerRe: color button Pin
Nishad S17-Apr-06 0:02
Nishad S17-Apr-06 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.