Click here to Skip to main content
15,889,861 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeIndeed... Pin
CPallini21-Dec-07 2:52
mveCPallini21-Dec-07 2:52 
JokeRe: Indeed... Pin
Matthew Faithfull21-Dec-07 3:04
Matthew Faithfull21-Dec-07 3:04 
GeneralRe: Indeed... Pin
CPallini21-Dec-07 3:15
mveCPallini21-Dec-07 3:15 
GeneralRe: Extra bytes between struct elements spoiling match between structs and binary file formats: cure found Pin
Mark Salsbery21-Dec-07 8:14
Mark Salsbery21-Dec-07 8:14 
Questionis such exception handling approach good? Pin
George_George21-Dec-07 1:42
George_George21-Dec-07 1:42 
AnswerRe: is such exception handling approach good? Pin
Matthew Faithfull21-Dec-07 2:05
Matthew Faithfull21-Dec-07 2:05 
QuestionThread using COleDispatchDriver always causes exception on second execution Pin
Streifenhoernchen21-Dec-07 1:42
Streifenhoernchen21-Dec-07 1:42 
GeneralRe: Thread using COleDispatchDriver always causes exception on second execution Pin
Nathan Holt at EMOM21-Dec-07 7:43
Nathan Holt at EMOM21-Dec-07 7:43 
Member 4760200 wrote:
In general, what the thread does is: Creating and sending an e-mail containing a file attachment using an Outlook or Lotus Notes client (if installed on the system).
Running the thread once always works fine, and it terminates correctly. However, when i try to run it for a second time, it throws an exception in MFC42.DLL, unfortunately not always at the same code line, but more or less randomly, esp. during manual debugging:


I would look up the MFC implementation of the send mail command in CDocument, and adapt the code to my purposes, rather than sending it through Outlook or Lotus Notes. If I did need to do it that way, one of the first questions I'd ask is "What exception is being thrown?" Also, in general returning 1 is not adequate for handling unknown exceptions. Terminating the whole program is more reasonable. Finally, the random nature of the exception sounds like a race condition, and since it doesn't go away when you debug, I would guess that you are calling functions that are intended to be called from only one thread for the duration of the process. I'm sorry I can't be more helpful.

Nathan
GeneralSubclassing (using MFC) a wndow under explorer process Pin
Nishad S21-Dec-07 1:38
Nishad S21-Dec-07 1:38 
QuestionReference are always lvalue? Pin
George_George21-Dec-07 1:11
George_George21-Dec-07 1:11 
AnswerRe: Reference are always lvalue? Pin
Budric B.21-Dec-07 5:09
Budric B.21-Dec-07 5:09 
GeneralRe: Reference are always lvalue? Pin
George_George21-Dec-07 19:16
George_George21-Dec-07 19:16 
Questionhow to get the number of lines shown in editbox Pin
rajneshmalik21-Dec-07 1:06
rajneshmalik21-Dec-07 1:06 
AnswerRe: how to get the number of lines shown in editbox Pin
CPallini21-Dec-07 3:05
mveCPallini21-Dec-07 3:05 
GeneralDatashowing problem want to get rid of from if-else statement Pin
Y_Kaushik20-Dec-07 23:53
Y_Kaushik20-Dec-07 23:53 
GeneralRe: Datashowing problem want to get rid of from if-else statement Pin
Hamid_RT21-Dec-07 0:02
Hamid_RT21-Dec-07 0:02 
GeneralRe: Datashowing problem want to get rid of from if-else statement Pin
Cedric Moonen21-Dec-07 0:13
Cedric Moonen21-Dec-07 0:13 
GeneralRe: Datashowing problem want to get rid of from if-else statement Pin
Cedric Moonen21-Dec-07 0:11
Cedric Moonen21-Dec-07 0:11 
GeneralRe: Datashowing problem want to get rid of from if-else statement Pin
Matthew Faithfull21-Dec-07 0:11
Matthew Faithfull21-Dec-07 0:11 
GeneralRe: Datashowing problem want to get rid of from if-else statement Pin
Y_Kaushik21-Dec-07 19:08
Y_Kaushik21-Dec-07 19:08 
GeneralDynamically providing version information to a exe Pin
neha.agarwal2720-Dec-07 22:50
neha.agarwal2720-Dec-07 22:50 
GeneralRe: Dynamically providing version information to a exe Pin
jhwurmbach20-Dec-07 23:08
jhwurmbach20-Dec-07 23:08 
GeneralRe: Dynamically providing version information to a exe Pin
Chris Losinger21-Dec-07 5:45
professionalChris Losinger21-Dec-07 5:45 
GeneralChecking the camera is connecte or not Pin
Deepu Antony20-Dec-07 22:26
Deepu Antony20-Dec-07 22:26 
General"imapi.h" file missing - SDK version Pin
palanirajan20-Dec-07 22:04
palanirajan20-Dec-07 22:04 

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.