Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unhendled exception in MyService.exe: 0xC0000005: Access Violation.

0 views
Skip to first unread message

João Pereira

unread,
Aug 2, 2001, 8:02:39 AM8/2/01
to
Why I get this error when I call CoUnitialize??

Thanks.
João Pereira


sszelei

unread,
Aug 2, 2001, 10:25:07 AM8/2/01
to
Was the thread created successfully?
What are you doing inside the service? You may be doing something that is
trashing your memory.

Steven Szelei

"João Pereira" <jper...@criticalsoftware.com> wrote in message
news:Ojw4Ms0GBHA.1820@tkmsftngp03...

Chetan N Parmar

unread,
Aug 2, 2001, 4:58:10 PM8/2/01
to
HI,
Where is the CoInialize being called from? Did you use ATL to create the
service.

Regards
Chetan N Parmar

Alexander Nickolov

unread,
Aug 2, 2001, 5:41:23 PM8/2/01
to
I suppose you got this _after_ CoUninitialize(). This is usually the result
of storing interface pointers in global scope variables (usually in smart
pointers). You should Release those interfaces _before_ you call
CoUninitialize() and not rely on the destructors (which cause your
access violation).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@geocities.com
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"João Pereira" <jper...@criticalsoftware.com> wrote in message
news:Ojw4Ms0GBHA.1820@tkmsftngp03...

Tom K.

unread,
Aug 2, 2001, 8:08:36 PM8/2/01
to
You need to provide more info. Usually it's not the problem of
CoUninitialize.
For example:
1. Some COM/ActiveX components may have trouble releasing memory.
Perhaps, the ActiveX component does the CoUninitialize, so you don't do it!
Maybe try that and see if you have memory leak or COM referencing issues.
2. Where do you call CoInitialize ? And on which thread? It should be on
the same thread or class.
3. Sometimes there is confusion of who should release memory, it's between
your app. and the component. Types of BSTRs and SAFEARRAY is usually
involved.

gl...

Tom K.


"João Pereira" <jper...@criticalsoftware.com> wrote in message
news:Ojw4Ms0GBHA.1820@tkmsftngp03...

0 new messages