Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help in making italic a static field Pin
Hamid_RT3-Dec-08 19:38
Hamid_RT3-Dec-08 19:38 
QuestionProgram for Active directory, compile error Pin
eth0q3-Dec-08 14:23
eth0q3-Dec-08 14:23 
QuestionA Question about Virtual Functions Pin
BobInNJ3-Dec-08 12:33
BobInNJ3-Dec-08 12:33 
AnswerRe: A Question about Virtual Functions Pin
Maximilien3-Dec-08 12:42
Maximilien3-Dec-08 12:42 
GeneralRe: A Question about Virtual Functions Pin
BobInNJ3-Dec-08 12:44
BobInNJ3-Dec-08 12:44 
AnswerRe: A Question about Virtual Functions Pin
Jijo.Raj3-Dec-08 21:20
Jijo.Raj3-Dec-08 21:20 
QuestionActive Directory Pin
BI0sSt@R3-Dec-08 7:57
BI0sSt@R3-Dec-08 7:57 
Questionruns in debug, crashes in release.... Pin
Member 36942703-Dec-08 7:38
Member 36942703-Dec-08 7:38 
Hi folks,
I'm in a bit of a pickle here. I have been working on a dll that runs in debug and also runs in release mode when the executable is started from Visual Studio, but it causes a crash when invoked from the command prompt.
I have did my homework and read a lot of useful information on this site as well as others but failed to find the culprit.
I can go as far as dumbing down the code so much that commenting a single line makes it run. I'm using a map container.
I can also post the header file, but first I thought that someone might be able to offer some insight about map containers gotchas...

Here is the code:
typedef std::map<int,> ObjectMap;

ObjectMap s_objectMap;
CLINKAGE

DLLFUNC void STDCALL SOMEFUNCTION(int *id, int *init)
{
    // Find the object in the map based on its id...
    ObjectMap::const_iterator it = s_objectMap.find(*id);

    // if we are initializing... add the new object and 
    if (*init)
    {
        if ( it == s_objectMap.end()) // map is empty... 
        {
            int ti = (int)s_objectMap.size()+1;
            // the following line seems to crash release... 
            mbdObject *pTheObject = new mbdObject(ti, id);
            // I'm omitting adding the new object to the map... 
        }
    }
}


basically if I comment out the creation of the new object the code would not do anything useful but it would run. As soon as the 'new' operator is back in. BOOM....
Any help *greatly* appreciated!
Andrea.
AnswerRe: runs in debug, crashes in release.... Pin
Code-o-mat3-Dec-08 7:52
Code-o-mat3-Dec-08 7:52 
GeneralRe: runs in debug, crashes in release.... Pin
Member 36942703-Dec-08 8:00
Member 36942703-Dec-08 8:00 
GeneralRe: runs in debug, crashes in release.... [modified] Pin
Jijo.Raj3-Dec-08 8:21
Jijo.Raj3-Dec-08 8:21 
QuestioncapCreateCaptureWindow - change window title after creation? [modified] - SOLVED Pin
Vaclav_3-Dec-08 7:28
Vaclav_3-Dec-08 7:28 
AnswerRe: capCreateCaptureWindow - change window title after creation? Pin
Mark Salsbery3-Dec-08 7:32
Mark Salsbery3-Dec-08 7:32 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Vaclav_3-Dec-08 7:43
Vaclav_3-Dec-08 7:43 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Mark Salsbery3-Dec-08 9:20
Mark Salsbery3-Dec-08 9:20 
GeneralRe: capCreateCaptureWindow - change window title after creation? Pin
Vaclav_3-Dec-08 10:51
Vaclav_3-Dec-08 10:51 
QuestionMultiByteWideChar and € (Euro sign) Pin
BadJerry3-Dec-08 6:35
BadJerry3-Dec-08 6:35 
AnswerRe: MultiByteWideChar and € (Euro sign) Pin
YoungJin Shin3-Dec-08 18:58
YoungJin Shin3-Dec-08 18:58 
QuestionGina and TSE Pin
Narfix3-Dec-08 5:51
professionalNarfix3-Dec-08 5:51 
QuestionRe: Gina and TSE Pin
Narfix4-Dec-08 5:27
professionalNarfix4-Dec-08 5:27 
Questionzmouse.h and prsht.h errors in BOTH my afx projects for no reason... Pin
CalvinB3-Dec-08 5:30
CalvinB3-Dec-08 5:30 
AnswerRe: zmouse.h and prsht.h errors in BOTH my afx projects for no reason... Pin
CalvinB5-Dec-08 2:30
CalvinB5-Dec-08 2:30 
QuestionCan't receive broadcast UDP at the socket [modified] Pin
fizzoxx3-Dec-08 5:16
fizzoxx3-Dec-08 5:16 
QuestionRe: Can't receive broadcast UDP at the socket Pin
led mike3-Dec-08 6:49
led mike3-Dec-08 6:49 
AnswerRe: Can't receive broadcast UDP at the socket Pin
fizzoxx3-Dec-08 21:18
fizzoxx3-Dec-08 21:18 

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.