Learning DCOM by Thai Thuan

Learning DCOM by Thai Thuan

Author:Thai, Thuan [Thuan L. Thai]
Language: eng
Format: epub
Tags: COMPUTERS / Programming / Object Oriented
ISBN: 9781449308681
Publisher: O'Reilly Media, Inc.
Published: 2011-04-03T16:00:00+00:00


Add COM objects into your component. These are the objects that can be used by external clients.

Add the necessary interfaces to a COM object and implement them.

Build and register the component.

Creating a Component

Since you’ve already learned how to create dynamic linked library and normal executable components, we’re going to do something different in this chapter. You’ll create an NT service that acts as an OCR server. Recall that an NT service can start up by itself when the machine is powered up. This can be an advantage after a power outage, at which time the machine powers itself back up, allowing your service to automatically come back to life. This is nice since it can happen without the need of an administrator.

However, this problem doesn’t apply to COM components, because components can be dynamically activated. In other words, the SCM will launch the correct component upon client request even if the component was not an NT service. From the COM perspective, there is really no reason why we’re creating an NT service other than the fact that the ATL COM AppWizard allows us to create this kind of component by simply checking a box. By checking this option, all the necessary code for an NT service is generated for you. Knowing this, even if you don’t want to use COM, you can take advantage of this option to generate the underlining code for a regular NT service executable.

Before you build this component, you should take note that the screen shots shown throughout this book may differ slightly from the ones that you see on your computer monitors. This is because new features will continue to be added as ATL and MFC evolve.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.