|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Asen Mihalev (asen
SOLARIS.TECHNO-LINK.COM)Date: Wed Apr 18 2001 - 08:28:00 CDT
1. Create an out-of-process free threaded server that should implement your device control code in some C++ class - lets call it CMyDevice.
2. Use and STL container owned by the _Module to store your instances of devices, i.e. CMyDevice. A good idea is to identify which CMyDevice instance to use by the LPT port. So the use an STL map container.
3. Use the ATL wizard to create a free threaded component with a free threaded marshaller. Lets call it IMyDevice.
- the IMyDevice interface that is exposed from this component is your device interface that should be used by your clients.
- IMyDevice should have a local member pointer that points to the CMyDevice instance. Provide functions in your _Module to get/create an instance of CMyDevice and store a reference pointer to it in your IMyDevice CoClass.
4. Protect your functions manipulating the STL container in _Module with a critical section /the fastest/.
5. Protect your IMyDevice methods with critical section(s) as well.
6. To make sure when you run the server on a remote machine that all clients use the same instance of the server you should instantiate IMyDevice from your clients with the same identity. I guess you can use the DCOMCNFG to set-up that.
----- Original Message -----
From: M.Frikel
To: DCOM
DISCUSS.MICROSOFT.COM
Sent: Wednesday, April 18, 2001 4:01 PM
Subject: DCOM vs. Devices
Hi all,
Thanks for your helpful contributions.
Just to ask if someone has an idea (better a sample) how to control a device
connected to
a server machine from the client side? (using dcom technologies), e.g. the
parallel port ...
Thanks for your assistance and good continuation!
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]