Click here to Skip to main content
15,906,463 members
Home / Discussions / COM
   

COM

 
GeneralRe: DirectShow (DirectX) Pin
Chiew Heng Wah17-Nov-03 19:17
Chiew Heng Wah17-Nov-03 19:17 
GeneralRe: DirectShow (DirectX) Pin
TFB18-Nov-03 6:34
TFB18-Nov-03 6:34 
Generalmessage box Pin
Ritwik Sanyal14-Nov-03 21:03
Ritwik Sanyal14-Nov-03 21:03 
GeneralCasting IXMLDocument to VARIANT Pin
bariraniahmad14-Nov-03 11:19
bariraniahmad14-Nov-03 11:19 
GeneralPassing ADODB.Stream from ASP to C++ Pin
Jeremy Pullicino14-Nov-03 3:56
Jeremy Pullicino14-Nov-03 3:56 
GeneralClose AUTOMATION Process Pin
jerome_data12-Nov-03 23:35
jerome_data12-Nov-03 23:35 
GeneralRe: Close AUTOMATION Process Pin
FearlessBurner14-Nov-03 2:16
FearlessBurner14-Nov-03 2:16 
GeneralCoUninitialize causes access violation Pin
sagmam12-Nov-03 2:53
sagmam12-Nov-03 2:53 
Hi everyone,
I have an MFC app (with a CWinApp-derived object) that uses COM objects (Crystal Reports). The COM library is imported into my project via the #import directive. I'm using VStudio 6.0 sp5.


I've created a global object called _com_init:

struct ComInit {
ComInit() { ::CoInitialize(NULL); }
~ComInit() { ::CoUninitialize(); }
} _com_init_;

This way, I guarantee that COM will initialize before the _main() and terminate after the _main().

When my program reaches ~ComInit() and calls ::CoUninitialize(), I see the following message in my Debug Output Window:

First-chance exception in MyApp.exe (OLE32.DLL): 0xC0000005: Access Violation.


Any ideas? I've looked up other CoUninitialize threads in these forums, but couldn't figure out something that would solve my problem...

Thanks.

/=/=/=/=
Deus
/=/=/=/=
GeneralRe: CoUninitialize causes access violation Pin
geo_m12-Nov-03 3:27
geo_m12-Nov-03 3:27 
GeneralRe: CoUninitialize causes access violation Pin
sagmam12-Nov-03 3:49
sagmam12-Nov-03 3:49 
GeneralRe: CoUninitialize causes access violation Pin
geo_m12-Nov-03 4:24
geo_m12-Nov-03 4:24 
GeneralRe: CoUninitialize causes access violation Pin
sagmam12-Nov-03 23:06
sagmam12-Nov-03 23:06 
GeneralRe: CoUninitialize causes access violation Pin
geo_m14-Nov-03 8:00
geo_m14-Nov-03 8:00 
GeneralRe: CoUninitialize causes access violation Pin
yitzhak12-Nov-03 23:09
yitzhak12-Nov-03 23:09 
GeneralRe: CoUninitialize causes access violation Pin
Prakash Nadar14-Nov-03 3:09
Prakash Nadar14-Nov-03 3:09 
QuestionCCW viable for ADO.NET access? Pin
DavidQR11-Nov-03 22:59
DavidQR11-Nov-03 22:59 
AnswerRe: CCW viable for ADO.NET access? Pin
Nick Parker17-Nov-03 17:24
protectorNick Parker17-Nov-03 17:24 
AnswerRe: CCW viable for ADO.NET access? Pin
Nick Parker17-Nov-03 17:25
protectorNick Parker17-Nov-03 17:25 
GeneralhWnd in COM Question. Pin
Matt Gates11-Nov-03 15:24
Matt Gates11-Nov-03 15:24 
GeneralRe: hWnd in COM Question. Pin
Heath Stewart11-Nov-03 19:25
protectorHeath Stewart11-Nov-03 19:25 
GeneralRe: hWnd in COM Question. Pin
Matt Gates12-Nov-03 1:39
Matt Gates12-Nov-03 1:39 
GeneralRe: hWnd in COM Question. Pin
Heath Stewart12-Nov-03 3:05
protectorHeath Stewart12-Nov-03 3:05 
GeneralRe: hWnd in COM Question. Pin
Matt Gates12-Nov-03 14:06
Matt Gates12-Nov-03 14:06 
GeneralCAxDialogImpl Pin
Abhishek Srivastava12-Nov-03 17:19
Abhishek Srivastava12-Nov-03 17:19 
GeneralRe: CAxDialogImpl Pin
Matt Gates13-Nov-03 13:25
Matt Gates13-Nov-03 13:25 

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.