List of Figures
Table of content
Chapter 1: COM and .NET
Figure 1-1: The Runtime Callable Wrapper (RCW) bridges managed and unmanaged code.
Figure 1-2: The COM Callable Wrapper (CCW) exposes .NET objects to COM clients .
Figure 1-3: Same-apartment and cross-apartment marshaling in COM interop
Figure 1-4: Adding a reference to a COM component in Visual Studio .NET
Figure 1-5: Adding a reference to an ActiveX control in Visual Studio .NET
Figure 1-6: Displaying the Add Reference dialog box in Visual Studio .NET
Figure 1-7: An entry for the Convert component appears in the list.
Figure 1-8: The RCW for the Convert component in the Object Browser
Figure 1-9: Adding an ActiveX control to the Visual Studio .NET Toolbox
Figure 1-10: The Microsoft Calendar ActiveX control installed in the Visual Studio .NET Toolbox
Figure 1-11: A Microsoft Calendar ActiveX control in use in a Windows Forms application
Chapter 2: COM+ and .NET
Figure 2-1: Component Services is the main utility that youll use for installing and managing COM+ components .
Figure 2-2: The Select Computer dialog box allows you to choose another computer to view.
Figure 2-3: Component Services will allow you to work with more than one machine at a time.
Figure 2-4: Use the COM+ Application Install Wizard to give your application a name and define the application type.
Figure 2-5: Youll use the Set Application Identity page to determine the identity the application uses while running.
Figure 2-6: Windows will ask for the location of the component you want to install.
Figure 2-7: Make sure you have all the required parts before you consider the component installation complete.
Figure 2-8: The Component Services window will contain the new components youve installed once you complete the COM+ Component Install Wizard.
Figure 2-9: The Select Users Or Groups dialog box allows you to choose which users or groups will perform the task specified by the role.
Figure 2-10: Role-based security allows you to define the access a user gets to the methods within a component based on the role that user performs .
Figure 2-11: You must set security at the application level before you can use role-based security.
Figure 2-12: Windows will automatically display any roles youve created for a COM+ application at all application levels.
Figure 2-13: Windows will allow you to export your COM+ applications in several formatsincluding as a proxy application.
Figure 2-14: Each snap-in for the .NET Framework Configuration console provides a help screen as the starting point.
Figure 2-15: Use this list of assemblies to learn more about the content of the GAC.
Chapter 3: Using COM Components in .NET Code
Figure 3-1: The Global Assembly Cache (GAC) viewed in Windows Explorer
Figure 3-2: Properties of an assembly in the GAC as viewed in Windows Explorer
Figure 3-3: The interop assembly for shdocvw.dll, viewed in the Object Browser
Figure 3-4: The Customize Toolbox dialog, used to add controls to the Visual Studio .NET Toolbox
Chapter 4: Using .NET Components in COM Applications
Figure 4-1: A COM Callable Wrapper (CCW) can be used by multiple COM clients.
Figure 4-2: A COM Callable Wrapper (CCW) implements a number of standard COM interfaces.
Figure 4-3: Setting the Register For COM Interop option to True will cause a component to be registered for use by COM clients.
Figure 4-4: A correctly registered class will appear in the References dialog box.
Figure 4-5: The Object Browser shows added classes and their related events.
Chapter 5: An Overview of COM+ Coding for .NET
Figure 5-1: Youll need the Application ID to locate the components for the COM+ application on your local drive.
Figure 5-2: Creating a component based on the
class adds the
Figure 5-3: Creating a component based on the
class adds a number of additional interfaces.
Figure 5-4: Use the Distributed Transaction Coordinator folder elements to manage transactions on a server.
Figure 5-5: Manage the queues for an application using the Message Queuing folder features.
Figure 5-6: Use Server Explorer to access local and remote queues.
Figure 5-7: Attempting to directly import a managed component thats part of a COM+ application into your application will generate an error message.
Figure 5-8: Use the DCOM Config folder options to configure components if you use Windows XP.
Figure 5-9: A simplified DCOM connection overview block diagram
Figure 5-10: The Registry holds the key to understanding how DCOM calls the component.
Chapter 6: Attributed Programming
Figure 6-1: An attribute provider works with the compiler to generate code at compile time.
Figure 6-2: The Attributed check box governs whether attributed code will be produced by the ATL Project Wizard.
Figure 6-3: The ATL Simple Object Wizard lets you set the names of files, classes, and COM identifiers.
Figure 6-4: The Options pane lets you specify COM properties for the coclass.
Figure 6-5: Adding a method to an ATL class using the Add Method Wizard
Figure 6-6: Setting IDL attributes using the Add Method Wizard
Figure 6-7: COM delegation does not expose the delegated object to the client.
Figure 6-8: COM aggregation exposes aggregated interfaces to the client.
Chapter 7: ATL and ATL Server
Figure 7-1: The architecture of an ATL Server application
Figure 7-2: Creating an ATL Server Web application project
Figure 7-3: The Project Wizard Overview page for an ATL Server Web application project
Figure 7-4: The Project Settings page lets you specify how the DLLs will be generated, as well as deployment details.
Figure 7-5: The output from the test SRF page that is included in every ATL Server Web application project
Figure 7-6: Creating an ATL Server Web Service project
Figure 7-7: Adding a reference to a Web service to a Visual Studio .NET project
Figure 7-8: The dialog displays the WSDL description of a Web service
Chapter 8: A Simple COM+ Example
Figure 8-1: Make sure you select the correct export options for your application.
Figure 8-2: The sample application presents the output youd expect when one of the buttons is pressed.
Figure 8-3: Use the entries in the Component Services console to verify COM+ application responses.
Figure 8-4: A component based on the
class displays four interfaces within the COM+ environment.
Figure 8-5: Typical output from the application shows a single computer name or all the available names.
Figure 8-6: Components based on the
class show a minimum of six interfaces.
Figure 8-7: You should define a constructor string for this class to see the functionality this feature can provide.
Figure 8-8: This example returns the COM+ application constructor string.
Chapter 9: Working with Disconnected Applications
Figure 9-1: MSMQ helps the user continue working even when no connection between the client and server exists.
Figure 9-2: Create a queue using the New ObjectPublic Queue dialog box.
Figure 9-3: The new queue will appear as part of the Public Queues folder.
Figure 9-4: Creating a queue connection in Visual Studio .NET is as easy as finding it in Server Explorer.
Figure 9-5: The layout of the sample recorder application
Figure 9-6: After the application sends the message, youll see it appear in the message queue.
Figure 9-7: The body of the message will appear in XML format rather than the custom format used by older versions of MSMQ.
Figure 9-8: Retrieving the content of a message queue requires a little formatting.
Figure 9-9: Rules rely on conditions to determine when they become true.
Figure 9-10: Define the application or COM component you want to invoke when the rule is true.
Figure 9-11: Use this dialog box to create a new trigger for a queue.
Figure 9-12: Activate the trigger by associating one or more rules with it.
Figure 9-13: The example application creates an Event Log entry similar to the one shown here.
Figure 9-14: Make sure you check the message for proper Label, Body, and Priority entries.
Figure 9-15: The OrderEntryApp Properties dialog box helps you created a queued environment for the application.
Figure 9-16: The data for a disconnected application resides in the Outgoing Queues folder until MSMQ can send it to the server
Chapter 10: Creating Subscriptions
Figure 10-1: The COM+ 1.0 Admin Type Library contains a vast number of classes and interfaces used for COM+ development.
Figure 10-2: The Import Or Install A Component dialog box allows you to install a number of component types.
Figure 10-3: The Install New Components page will allow you to check the event object you want to install.
Figure 10-4: The publisher relies on a simple interface to fire an event that broadcasts a message to the subscribers.
Figure 10-5: The first step is to select the methods you want to receive events.
Figure 10-6: Make sure the event object appears in the dialog.
Figure 10-7: Always enable the subscription as part of the configuration process.
Figure 10-8: The subscription should appear in the Subscription folder once you create it successfully.
Figure 10-9: Use this client to add and remove subscriptions programmatically.
Figure 10-10: Add the COM+ 1.0 Admin Type Library to your application to obtain access to the required management functions.
Figure 10-11: Use the SimpleEventObject.SendMsg Properties dialog box to obtain a GUID for your application if no other approach is available.
Figure 10-12: Creating a permanent subscription enables you to view and compare the automated and manual subscription methods.
Chapter 11: Web Application Scenarios
Figure 11-1: Adding support for SOAP to your COM+ application is relatively easy.
Figure 11-2: Setting the SOAP support options automatically creates some application files for your IIS setup.
Figure 11-3: The WSDL output of the Web page describes the class and the functionality it provides.
Figure 11-4: The Add Web Reference dialog box can help you locate and use services.
Figure 11-5: You can also view the features provided by an application by using the same URL that the browser provides on the Web site.
Figure 11-6: The SOAP form of the application has additional functionality not provided by the COM+ version.
Figure 11-7: Use the Dump tab to save a copy of your application to disk.
Figure 11-8: Some versions of Windows provide a separate Script Debugger option you can install.
Figure 11-9: IIS provides a script debugger that helps in locating potential problems in your Web-based application scripts.
Figure 11-10: The HelpMe database will use most of the default settings provided by SQL Server.
Figure 11-11: A simple table for storing help topics.
Figure 11-12: Use the Manage Indexes dialog box to add new indexes to the HelpInformation table.
Figure 11-13: Creating the content for this example means including HTML tags.
Figure 11-14: The browser test shows the final output of the Web-based application.
Chapter 12: Interacting with Unmanaged Code
Figure 12-1: The application roots link all the memory used by an application.
Figure 12-2: Objects 2, 7, and 9 on the managed heap cannot be reached from the applications roots, so they are candidates for garbage collection.
Figure 12-3: After a collection, the heap has been compacted .
Chapter 13: Advanced Interaction
Figure 13-1: Using explicit layout lets a developer control exactly how a structure is laid out in memory.
Chapter 14: Working with Predefined Interfaces
Figure 14-1: The OLE/COM Object Viewer sorts the various COM servers into easily understood categories.
Figure 14-2: The
class contains a number of interfaces you might not have seen before.
Figure 14-3: Component services generally shows only the interfaces that COM+ thinks youll need to know about.
Figure 14-4: Viewing the type library information tells you a lot about a component.
Figure 14-5: The OLE/COM Object Viewer shows a hierarchical view of objects, starting with the object type, proceeding to the name, and then showing the interfaces the object supports.
Figure 14-6: Selecting a specific interface will allow you to see the registry entries for that interface, along with details such as the number of methods it supports.
Figure 14-7: Sometimes one interface is actually built out of several interfacesinheritance will play a role in how you view components.
Figure 14-8: The unmanaged form of the
Figure 14-9: Youll use the
interface to mark components and controls as safe for scripting.
Figure 14-10: The sample control implements and exposes the
interface, which makes it possible to use the control in a scripting scenario.
Table of content
COM Programming with Microsoft .NET
John Paul Mueller
BUY ON AMAZON
Similar book on Amazon
Oracle SQL*Plus: The Definitive Guide (Definitive Guides)
.NET and COM: The Complete Interoperability Guide (2 Volume set)
Inside Com (Microsoft Programming Series)
Developer's Workshop to COM and ATL 3.0
Understanding ActiveX and OLE: A Guide for Developers and Managers (Strategic Technology)
The CISSP and CAP Prep Guide: Platinum Edition
CISSP Exam Cram 2
BUSINESS CONTINUITY PLANNING
Multiple-Choice Question Format
Answers to Exam Prep Questions
Law, Investigations, and Ethics
Identifying and Managing Project Risk: Essential Tools for Failure-Proofing Your Project
Why Project Risk Management?
Planning for Risk Management
Identifying Project Schedule Risk
Identifying Project Resource Risk
Managing Project Constraints and Documenting Risks
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
Building a Complex Application with GNU make
Strings and Text
Sorting a Range
Removing a Directory
Microsoft WSH and VBScript Programming for the Absolute Beginner
Overview of the Windows Script Host
Constants, Variables, and Arrays
Using Procedures to Organize Scripts
Oracle SQL*Plus: The Definitive Guide (Definitive Guides)
Executing the Statement in the Buffer
Saving and Retrieving the Buffer
Working with PL/SQL
Totals and Subtotals
Python Standard Library (Nutshell Handbooks) with
The tempfile Module
The getopt Module
The binascii Module
The socket Module
The sunau Module
flylib.com © 2008-2017.
If you may any questions please contact us: email@example.com
to find out more.