Article ID: 173645
Article Last Modified on 10/15/2002
#define BUGFIX_RELEASE_IERRORINFO(error) \
IErrorInfo * pErr = error.ErrorInfo(); \
pErr->Release(); \
pErr->Release();
Here is an example of how you would use it:
try
{
//.... call a #import generated method
if ( m_connection == NULL ) {
if(S_OK == m_connection.CreateInstance("ADODB.Connection.1", NULL,
CLSCTX_INPROC_SERVER))
m_connection->Open(varDataSource, varUserId, varPwd);
}
}
catch(_com_error & err)
{
// Error handling code...
::MessageBox(NULL, (LPCSTR)err.Description(), _T("ADO Error"), MB_OK);
BUGFIX_RELEASE_IERRORINFO(err);
}
170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why
Additional query words: unhandled exception AV
Keywords: kbbug kbfix kbvc600fix kbvs97sp2fix KB173645