Click here to Skip to main content
16,010,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBug with RichEdit2 and EM_FORMATRANGE? Pin
26-Mar-01 0:22
suss26-Mar-01 0:22 
Generaldumbass question... Pin
l a u r e n26-Mar-01 0:02
l a u r e n26-Mar-01 0:02 
GeneralRe: dumbass question... Pin
26-Mar-01 0:30
suss26-Mar-01 0:30 
GeneralRe: dumbass question... Pin
l a u r e n26-Mar-01 1:08
l a u r e n26-Mar-01 1:08 
GeneralRe: dumbass question... Pin
Christian Graus26-Mar-01 10:05
protectorChristian Graus26-Mar-01 10:05 
GeneralRe: dumbass question... Pin
Chris Meech26-Mar-01 10:35
Chris Meech26-Mar-01 10:35 
GeneralRe: dumbass question... Pin
l a u r e n26-Mar-01 11:32
l a u r e n26-Mar-01 11:32 
GeneralAcces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:11
suss25-Mar-01 23:11 
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,


CheicknaConfused | :confused:
GeneralRe: Acces Violation with oledb CoUninitialize() instruction Pin
25-Mar-01 23:34
suss25-Mar-01 23:34 
GeneralSome problem when hosting WebBrowser control in an application Pin
25-Mar-01 21:17
suss25-Mar-01 21:17 
QuestionHow resize dialog bar when it is in docked mode ? Pin
25-Mar-01 21:15
suss25-Mar-01 21:15 
QuestionHow resize dialog bar when it is in docked mode ? Pin
25-Mar-01 21:15
suss25-Mar-01 21:15 
QuestionHow to copy the value of _bstr_t into a BSTR variable?? Pin
25-Mar-01 20:56
suss25-Mar-01 20:56 
AnswerRe: How to copy the value of _bstr_t into a BSTR variable?? Pin
Erik Thompson25-Mar-01 21:21
sitebuilderErik Thompson25-Mar-01 21:21 
General1] OnKillFocus and RichEdit Ctrl - 2] Always on top Pin
25-Mar-01 20:37
suss25-Mar-01 20:37 
GeneralWeb Service Deployment problem Pin
Kannan Kalyanaraman25-Mar-01 19:10
Kannan Kalyanaraman25-Mar-01 19:10 
GeneralRe: Web Service Deployment problem Pin
Gerry25-Mar-01 21:02
Gerry25-Mar-01 21:02 
GeneralChanging the clock text Pin
Greg Hedlund25-Mar-01 13:59
Greg Hedlund25-Mar-01 13:59 
GeneralRecognizing a voice Pin
Antonio25-Mar-01 13:45
Antonio25-Mar-01 13:45 
GeneralDevStudio macro to open (and position) file Pin
Ravi Bhavnani25-Mar-01 10:48
professionalRavi Bhavnani25-Mar-01 10:48 
GeneralRe: DevStudio macro to open (and position) file Pin
Kannan Kalyanaraman25-Mar-01 22:07
Kannan Kalyanaraman25-Mar-01 22:07 
QuestionHow to work with an ACCESS database. Pin
Rafal25-Mar-01 7:17
Rafal25-Mar-01 7:17 
AnswerRe: How to work with an ACCESS database. Pin
25-Mar-01 9:42
suss25-Mar-01 9:42 
GeneralOpening New DIALOG Pin
Rafal25-Mar-01 6:10
Rafal25-Mar-01 6:10 
GeneralRe: Opening New DIALOG Pin
l a u r e n25-Mar-01 6:55
l a u r e n25-Mar-01 6:55 

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.