Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with GetAdaptersAddresses in Windows Vista Pin
Mark Salsbery12-Nov-08 6:28
Mark Salsbery12-Nov-08 6:28 
GeneralRe: Problem with GetAdaptersAddresses in Windows Vista Pin
Hector_M12-Nov-08 21:31
Hector_M12-Nov-08 21:31 
GeneralRe: Problem with GetAdaptersAddresses in Windows Vista Pin
David Crow11-Nov-08 7:20
David Crow11-Nov-08 7:20 
Questionproblem in Creating a FILE Pin
m_mun10-Nov-08 23:58
m_mun10-Nov-08 23:58 
AnswerRe: problem in Creating a FILE Pin
sashoalm11-Nov-08 0:26
sashoalm11-Nov-08 0:26 
AnswerRe: problem in Creating a FILE Pin
CPallini11-Nov-08 0:37
mveCPallini11-Nov-08 0:37 
GeneralRe: problem in Creating a FILE Pin
m_mun11-Nov-08 0:50
m_mun11-Nov-08 0:50 
QuestionIs it good practice to use TRY-CATCH in this way? Pin
paresh_joe10-Nov-08 23:33
paresh_joe10-Nov-08 23:33 
I am writing block which throws com exception and i have written code in following way.
GetDate() & SetDate(d) both throws exception.

Date d;
try
{
// Many statements can throws exception
d = GetDate();
SetDate(somedate);
// calculate some "value"
}
catch(_com_exception &)
{
// set value = 0;
}

try
{
SetDate(d); // reset date
}
catch(_com_exception &)
{
// set value = 0;
}

Even if both block throws same exception i cant put them in one try for the reason that in any case either it throws exception or not i want to reset date at the end.

Is this code looks good with consideration of good coding practices?

Thanks,
Perry
AnswerRe: Is it good practice to use TRY-CATCH in this way? Pin
Hector_M11-Nov-08 0:34
Hector_M11-Nov-08 0:34 
AnswerRe: Is it good practice to use TRY-CATCH in this way? Pin
bulg11-Nov-08 7:42
bulg11-Nov-08 7:42 
QuestionProblem occur to access dll dialog box Pin
ShilpiP10-Nov-08 23:20
ShilpiP10-Nov-08 23:20 
AnswerRe: Problem occur to access dll dialog box Pin
SandipG 10-Nov-08 23:26
SandipG 10-Nov-08 23:26 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP10-Nov-08 23:49
ShilpiP10-Nov-08 23:49 
AnswerRe: Problem occur to access dll dialog box Pin
CPallini10-Nov-08 23:27
mveCPallini10-Nov-08 23:27 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP10-Nov-08 23:47
ShilpiP10-Nov-08 23:47 
GeneralRe: Problem occur to access dll dialog box Pin
Mark Salsbery11-Nov-08 6:24
Mark Salsbery11-Nov-08 6:24 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP11-Nov-08 18:11
ShilpiP11-Nov-08 18:11 
GeneralRe: Problem occur to access dll dialog box Pin
Mark Salsbery11-Nov-08 18:15
Mark Salsbery11-Nov-08 18:15 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP11-Nov-08 18:45
ShilpiP11-Nov-08 18:45 
GeneralRe: Problem occur to access dll dialog box Pin
Mark Salsbery11-Nov-08 18:52
Mark Salsbery11-Nov-08 18:52 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP11-Nov-08 19:18
ShilpiP11-Nov-08 19:18 
GeneralRe: Problem occur to access dll dialog box Pin
Mark Salsbery11-Nov-08 20:28
Mark Salsbery11-Nov-08 20:28 
GeneralRe: Problem occur to access dll dialog box Pin
ShilpiP12-Nov-08 18:04
ShilpiP12-Nov-08 18:04 
GeneralRe: Problem occur to access dll dialog box Pin
Mark Salsbery12-Nov-08 20:47
Mark Salsbery12-Nov-08 20:47 
QuestionHow to return multiple values in MFC ActiveX? Pin
followait10-Nov-08 22:51
followait10-Nov-08 22:51 

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.