Click here to Skip to main content
15,890,932 members
Home / Discussions / COM
   

COM

 
GeneralLegacy COM calling .NET DLL: LPArray problem Pin
bad_english18-Jun-02 21:01
bad_english18-Jun-02 21:01 
GeneralCatching Events Pin
18-Jun-02 4:48
suss18-Jun-02 4:48 
GeneralRe: Catching Events Pin
Amit Dey18-Jun-02 11:14
Amit Dey18-Jun-02 11:14 
GeneralRe: Catching Events Pin
19-Jun-02 4:37
suss19-Jun-02 4:37 
GeneralRe: Catching Events Pin
20-Jun-02 6:32
suss20-Jun-02 6:32 
GeneralRe: Catching Events Pin
Anonymous27-Aug-02 9:15
Anonymous27-Aug-02 9:15 
GeneralRe: Catching Events Pin
Amit Dey27-Aug-02 13:52
Amit Dey27-Aug-02 13:52 
GeneralException Handling Error Pin
soup15-Jun-02 6:00
soup15-Jun-02 6:00 
Hi,

I have a very simple program that is going to use ADO as the interface to a database.

I imported ADO in a wrapper class using the following line:

#import "C:\Program Files\Common Files\System\Ado\msado15.dll" no_namespace rename("EOF", "adoEOF")

My code to connect to the selected database looks like:

try
{
m_objConn.CreateInstance(__uuidof(Connection));
m_objConn->Open(strConn, strUser, strPass, m_lngConnOptions);
}
catch(_com_error &errConn)
{
m_strLastError = (char *) errConn.Description();
m_objConn = NULL;
}

If everything is fine so ADO can connect all is good. Smile | :)

However, when the connection fails (for any reason, such as bad connection string, DSN doesn't exist etc), I get the following error:

First-chance exception in MyDBApp.exe (MSVCRTD.DLL): 0xE06D7363: Microsoft C++ Exception.

I traced through the code, into the import .tli/.tlh file and the exception occurs in the call (or around the call) to _com_issue_errorex(...).

Has anyone ever encountered a problem with COM error handling like this before? If so, what is the solution, because so far the problem seems to lie with COM/ADO, not my application.

Under debug, the code continues, under release, it invalid page faults.

Please help!

Thanks in advance,

Simon
GeneralRe: Exception Handling Error Pin
Tim Smith15-Jun-02 6:20
Tim Smith15-Jun-02 6:20 
GeneralRe: Exception Handling Error Pin
soup15-Jun-02 14:25
soup15-Jun-02 14:25 
GeneralRe: Exception Handling Error Pin
Tim Smith15-Jun-02 14:58
Tim Smith15-Jun-02 14:58 
QuestionHow to pass out an array from a com+ object? Pin
Lizp13-Jun-02 23:43
Lizp13-Jun-02 23:43 
AnswerRe: How to pass out an array from a com+ object? Pin
soptest14-Jun-02 9:40
soptest14-Jun-02 9:40 
GeneralRe: How to pass out an array from a com+ object? Pin
Lizp14-Jun-02 16:09
Lizp14-Jun-02 16:09 
GeneralPlease help (Events) Pin
Jason Troitsky (was Hattingh)13-Jun-02 21:30
Jason Troitsky (was Hattingh)13-Jun-02 21:30 
GeneralRe: Please help (Events) Pin
Amit Dey15-Jun-02 5:55
Amit Dey15-Jun-02 5:55 
GeneralRe: Please help (Events) Pin
Jason Troitsky (was Hattingh)15-Jun-02 6:19
Jason Troitsky (was Hattingh)15-Jun-02 6:19 
GeneralRe: Please help (Events) Pin
Amit Dey15-Jun-02 14:56
Amit Dey15-Jun-02 14:56 
GeneralRe: Please help (Events) Pin
Jason Troitsky (was Hattingh)15-Jun-02 22:28
Jason Troitsky (was Hattingh)15-Jun-02 22:28 
GeneralRe: Please help (Events) Pin
Amit Dey18-Jun-02 11:26
Amit Dey18-Jun-02 11:26 
GeneralRe: Please help (Events) Pin
Jason Troitsky (was Hattingh)18-Jun-02 11:42
Jason Troitsky (was Hattingh)18-Jun-02 11:42 
GeneralRe: Please help (Events) Pin
Amit Dey21-Jun-02 6:42
Amit Dey21-Jun-02 6:42 
GeneralRe: Please help (Events) Pin
Jason Troitsky (was Hattingh)27-Jun-02 0:09
Jason Troitsky (was Hattingh)27-Jun-02 0:09 
GeneralReminders in Outlook Pin
SHaroz13-Jun-02 6:12
SHaroz13-Jun-02 6:12 
GeneralRe: Reminders in Outlook Pin
SHaroz19-Jun-02 5:35
SHaroz19-Jun-02 5:35 

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.