Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Interfaces to other applications Pin
User 988521-Feb-03 3:06
User 988521-Feb-03 3:06 
General"Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:39
Anton A. Loukine20-Feb-03 11:39 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Dave Bryant20-Feb-03 11:51
Dave Bryant20-Feb-03 11:51 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:58
Anton A. Loukine20-Feb-03 11:58 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Gary R. Wheeler20-Feb-03 14:36
Gary R. Wheeler20-Feb-03 14:36 
GeneralRephrasing the question Pin
Anonymous21-Feb-03 3:18
Anonymous21-Feb-03 3:18 
GeneralRe: Rephrasing the question Pin
jhwurmbach21-Feb-03 3:34
jhwurmbach21-Feb-03 3:34 
GeneralRe: Rephrasing the question Pin
Gary R. Wheeler21-Feb-03 11:22
Gary R. Wheeler21-Feb-03 11:22 
Try looking up "structured exception handling" in the MSDN. From what I can see, this lets you catch the access violation.

Another way to get around this problem would be to modify your library interface. Suppose your current routine is like this:
void OperateOnArray(int array[], int array_size);

You could change the interface to something like the following:
void StartOperation();
void SetOperationItem(int index,int item);
void DoOperation()

In this case, the array is managed by your library. StartOperation(); initializes the array to the empty condition. SetOperationItem() sets an item in the array, growing it as necessary. Finally, DoOperation() does the operation the original function OperateOnArray(...) did, except it does it on the array your code is managing. If the caller needs to get the array back as part of the results, you could add a corresponding function like:
void GetOperationResult(int index,int *result);



Software Zen: delete this;
GeneralRe: "Try" to "Catch" without "Throw" Pin
Chris Losinger20-Feb-03 12:06
professionalChris Losinger20-Feb-03 12:06 
GeneralRe: "Try" to "Catch" without "Throw" Pin
markkuk20-Feb-03 12:32
markkuk20-Feb-03 12:32 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 12:44
Anton A. Loukine20-Feb-03 12:44 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach20-Feb-03 21:00
jhwurmbach20-Feb-03 21:00 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anonymous21-Feb-03 3:19
Anonymous21-Feb-03 3:19 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach21-Feb-03 3:49
jhwurmbach21-Feb-03 3:49 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Christian Graus20-Feb-03 16:08
protectorChristian Graus20-Feb-03 16:08 
GeneralCopy opened files (read protected files) Pin
JGranborg20-Feb-03 11:37
JGranborg20-Feb-03 11:37 
GeneralCannot run MFC-compiled application on Win98se Pin
Valera24117620-Feb-03 11:21
Valera24117620-Feb-03 11:21 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
PJ Arends20-Feb-03 11:45
professionalPJ Arends20-Feb-03 11:45 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
Anonymous20-Feb-03 13:37
Anonymous20-Feb-03 13:37 
GeneralCString Array and Inserting Elements Pin
John W Hagen20-Feb-03 11:17
John W Hagen20-Feb-03 11:17 
GeneralRe: CString Array and Inserting Elements Pin
User 665820-Feb-03 11:29
User 665820-Feb-03 11:29 
GeneralRe: CString Array and Inserting Elements Pin
John W Hagen20-Feb-03 14:00
John W Hagen20-Feb-03 14:00 
GeneralCapturing 'Enter' key Pin
Toni7820-Feb-03 10:49
Toni7820-Feb-03 10:49 
GeneralRe: Capturing 'Enter' key Pin
Joaquín M López Muñoz20-Feb-03 11:30
Joaquín M López Muñoz20-Feb-03 11:30 
GeneralI don't have an IDC_OK hadle Pin
Toni7820-Feb-03 11:47
Toni7820-Feb-03 11:47 

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.