Re: COM Object (singleton) in an ATL Service
- From: "Brian Muth" <bmuth@xxxxxxxx>
- Date: Thu, 9 Mar 2006 09:15:29 -0800
"John" <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:88617A86-05B9-4EAF-A5F4-1C70D2413F26@xxxxxxxxxxxxxxxx
Brian,
Thanks for the input and in effect that is what I've done. I have created
a
global
class that interacts with the hardware, then when the client creates an
object
it acts as a wrapper and forwards the calls to the global class. I was
just
wondering if there was a "cleaner" approach.
This is pretty clean, IMHO. Remember that you probably will need to
synchronize access to the global data, so that one client doesn't
inadvertently change the values at the same time another client reads the
values (leading to garbage). This implies using perhaps critical sections or
semaphores.
Brian
.
- References:
- Re: COM Object (singleton) in an ATL Service
- From: Brian Muth
- Re: COM Object (singleton) in an ATL Service
- Prev by Date: Re: ATL71.dll cound not be found even if i selected static link to ATL dll
- Next by Date: Re: How to keep my com exe alive?
- Previous by thread: Re: COM Object (singleton) in an ATL Service
- Next by thread: Office add-in question
- Index(es):
Relevant Pages
|