Click here to Skip to main content
15,917,005 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: 64 bit MFC application failed to create mdb and mdw files ? Pin
Richard MacCutchan12-Feb-13 4:57
mveRichard MacCutchan12-Feb-13 4:57 
GeneralATL how get the name of the target class inside of a template? Pin
Frank Thielemann12-Feb-13 3:16
Frank Thielemann12-Feb-13 3:16 
GeneralRe: ATL how get the name of the target class inside of a template? Pin
Richard MacCutchan12-Feb-13 4:55
mveRichard MacCutchan12-Feb-13 4:55 
GeneralRe: ATL how get the name of the target class inside of a template? Pin
Frank Thielemann15-Feb-13 19:51
Frank Thielemann15-Feb-13 19:51 
Questionadd sys dsn failed on windows 7 64 Pin
MrKBA11-Feb-13 5:59
MrKBA11-Feb-13 5:59 
QuestionSQL Server Compact Edition Pin
Haakon S.11-Feb-13 4:23
Haakon S.11-Feb-13 4:23 
AnswerRe: SQL Server Compact Edition Pin
Richard MacCutchan11-Feb-13 4:42
mveRichard MacCutchan11-Feb-13 4:42 
GeneralRe: SQL Server Compact Edition Pin
Haakon S.11-Feb-13 5:37
Haakon S.11-Feb-13 5:37 
GeneralRe: SQL Server Compact Edition Pin
Richard MacCutchan11-Feb-13 5:58
mveRichard MacCutchan11-Feb-13 5:58 
Questionerror while trying to uplaod the file in current directory using c language Pin
raghvendrapanda30-Jan-13 19:34
raghvendrapanda30-Jan-13 19:34 
AnswerRe: error while trying to uplaod the file in current directory using c language Pin
Richard MacCutchan30-Jan-13 22:03
mveRichard MacCutchan30-Jan-13 22:03 
AnswerRe: error while trying to uplaod the file in current directory using c language Pin
«_Superman_»1-Feb-13 20:34
professional«_Superman_»1-Feb-13 20:34 
QuestionTCP/IP CAsyncSocket and pointers to same Pin
bkelly1324-Jan-13 15:16
bkelly1324-Jan-13 15:16 
Answerclasses don't call upwards Pin
bkelly1326-Jan-13 8:55
bkelly1326-Jan-13 8:55 
QuestionATL and exceptions Pin
imagiro14-Jan-13 8:10
imagiro14-Jan-13 8:10 
AnswerRe: ATL and exceptions Pin
Jonathan Davies18-Jan-13 9:39
Jonathan Davies18-Jan-13 9:39 
I used a combination. A colleague and I developed an exception object with various constructors that could, for example, be thrown with parameters of: a HRESULT, a string describing what failed, the file name it was thrown in, and the line number of the file it was thrown in.

for example:

C++
HRESULT hr = somefunc();
if(FAILED(hr))
{
    throw _abc_error(hr, L"Somefunc failed", FILE_AND_LINENO);
}
...
catch(_abc_error& err)
{
    MessageBox(err.ErrorMessage(), L"App Name", MB_ICONWARNING | MB_OK);
}


The exception object constructor then took care of writing the error as an event to the System Event log as well as looking up any messages from the HRESULT, or accessing any other error handling mechanism needed.
This resulted in code unclutered with complicated error handling and a standard way of making sure that the log showed not only an error code or message, but a comment on what was being attemted, which .cpp file this was detected in and the line number of the file.
Jonathan

AnswerRe: ATL and exceptions Pin
bkelly1324-Jan-13 15:24
bkelly1324-Jan-13 15:24 
GeneralRe: ATL and exceptions Pin
Jonathan Davies6-Feb-13 7:23
Jonathan Davies6-Feb-13 7:23 
GeneralRe: ATL and exceptions Pin
Albert Holguin11-Feb-13 5:12
professionalAlbert Holguin11-Feb-13 5:12 
Questionunicode and non-unicode Pin
bkelly1314-Jan-13 3:45
bkelly1314-Jan-13 3:45 
AnswerRe: unicode and non-unicode Pin
Richard MacCutchan14-Jan-13 6:24
mveRichard MacCutchan14-Jan-13 6:24 
GeneralRe: unicode and non-unicode Pin
bkelly1314-Jan-13 8:43
bkelly1314-Jan-13 8:43 
GeneralRe: unicode and non-unicode Pin
Richard MacCutchan14-Jan-13 22:13
mveRichard MacCutchan14-Jan-13 22:13 
GeneralRe: unicode and non-unicode Pin
Richard MacCutchan20-Jan-13 22:08
mveRichard MacCutchan20-Jan-13 22:08 
AnswerRe: unicode and non-unicode Pin
pasztorpisti20-Jan-13 1:33
pasztorpisti20-Jan-13 1:33 

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.