Click here to Skip to main content
15,909,205 members
Home / Discussions / COM
   

COM

 
GeneralRe: Help with Unusal Debug Error. Pin
Joseph Dempsey2-Apr-01 5:39
Joseph Dempsey2-Apr-01 5:39 
GeneralActiveX Controls and Downloading Pin
31-Mar-01 11:49
suss31-Mar-01 11:49 
GeneralMessage Map in ATL Server Pin
28-Mar-01 5:04
suss28-Mar-01 5:04 
QuestionHow to add New ATL-object to MFC Application? Pin
27-Mar-01 18:21
suss27-Mar-01 18:21 
AnswerRe: How to add New ATL-object to MFC Application? Pin
pba_11-Apr-01 1:04
pba_11-Apr-01 1:04 
QuestionHow to add New ATL-object to MFC Application? Pin
27-Mar-01 18:15
suss27-Mar-01 18:15 
GeneralPlease help me! I'm lost! (Again!) Pin
26-Mar-01 10:17
suss26-Mar-01 10:17 
GeneralAcces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:14
suss25-Mar-01 23:14 
Hi,

I use Visual C++ 6.0 SP 4 , SQL Server and oledb

I create a class to connect to my database. In my constructor i initialize com library like this :

CoInitialize(NULL);

In my destructor i release com library like this :

CoUninitialize();


If i use this class to execute for exemple an sql query ( store procedure), my functions open, execute, close,... work.
But if i close my application ( OnOK ) , two seconds later i obtain the following acces violation message :

EXCEPTION(c0000005 acces,@40f919) EBP184f0b8 EIP40f919)
ASM 45 fc 8b 08 8b 01 52 ff 50 08 8b e5 5d c3 cc cc cc cc cc cc
EAX:184f618 EBX:dc0110 ECX:383439 EDX:383439 ESI:dc0064 EDI:184f664 ESP:184f0b4

The suspect function is _Release() throw() which is in a Visual C++ include file ( in Include\COMIP.H )

// Releases only if the interface is not null.
// The interface is not set to NULL.
void _Release() throw()
{
if (m_pInterface != NULL) {
m_pInterface->Release();
}
}

But if i comment out CoUninitialize() instruction, my code work without acces violation.


Can anybody help me?


Best regards,


Cheickna

Confused | :confused:
GeneralVB ActiveX DLL with VC question Pin
Amit Dey25-Mar-01 9:51
Amit Dey25-Mar-01 9:51 
GeneralDCOM Service problem Pin
yamini22-Mar-01 23:25
yamini22-Mar-01 23:25 
GeneralRe: DCOM Service problem Pin
2-Apr-01 2:01
suss2-Apr-01 2:01 
QuestionHow do I add a menu/toolbar to my atl activex control? Pin
Timothy A. Anderson19-Mar-01 13:34
Timothy A. Anderson19-Mar-01 13:34 
GeneralCustomizing Intellisense Information Tooltips Pin
19-Mar-01 12:20
suss19-Mar-01 12:20 
GeneralIntegrating two applicaiton Pin
17-Mar-01 2:38
suss17-Mar-01 2:38 
GeneralPassing MFC derived Objects back from COM to Application Pin
16-Mar-01 4:58
suss16-Mar-01 4:58 
GeneralTLB problem !!! Pin
14-Mar-01 0:50
suss14-Mar-01 0:50 
GeneralRe: TLB problem !!! Pin
Joseph Dempsey27-Mar-01 3:50
Joseph Dempsey27-Mar-01 3:50 
GeneralCOM with CGI's Pin
Steven Gregg12-Mar-01 23:37
Steven Gregg12-Mar-01 23:37 
QuestionBSTR or Structure ? Pin
11-Mar-01 16:32
suss11-Mar-01 16:32 
AnswerRe: BSTR or Structure ? Pin
13-Mar-01 7:25
suss13-Mar-01 7:25 
QuestionDatasource - how to make? Pin
11-Mar-01 4:37
suss11-Mar-01 4:37 
Generalcontrol dynamic proeprties. Pin
8-Mar-01 4:13
suss8-Mar-01 4:13 
GeneralIShellFolder - Network Attribute Pin
7-Mar-01 0:58
suss7-Mar-01 0:58 
GeneralRe: IShellFolder - Network Attribute Pin
18-Mar-01 5:35
suss18-Mar-01 5:35 
GeneralIShellFolder Pin
6-Mar-01 2:13
suss6-Mar-01 2:13 

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.