Use COM + Parametric Object Structure Programming Technology

zhaozj2021-02-08  243

Use COM Parametric Object Structure Programming Technology

Keywords: Delphi controls miscellaneous

Using COM Parameterized Object Structure Programming Technology 1. Introduction, a core concept of COM service technology is that the system itself provides a general basic module for enterprises to apply developers (such as thread, object resource pool management, transaction service management, event service management Wait, allow system designers to concentrate on business logic on enterprise application itself. Com provides many new services and consistent management running environments, which also supports the declarative programming model, that is, developers can develop components as much as possible, keep some details to the configuration Always determine. For example, in the development of a COM component, it supports the transaction processing characteristics, but we are in developing components, do not determine if it uses transaction processing characteristics, and supports whether the transaction feature is left to leave the configuration time. Some applications may require transaction processing characteristics, and some applications may not require, we can determine whether the components support transaction feature through the COM management program. The MTS security model is actually a typical strategy programming technology that leaves the component's security role information to the configuration time and gives the exact definition, not the programming time. COM inherits the security model of MTS. Using COM service and management tools, developing a COM component is much easier than developing a COM component, because the COM component is actually an application based on COM system services, we can avoid the underlying cumbersome details, such as more The concurrent processing of threads. With COM system services, while obtaining reliability, the components and applications are also standardized, and the polymorphisms of components or applications are embodied in a broader range. The introduction of Com has finally organically unified COM / DCOM / MTS programming mode, so that we don't need to distinguish what type of COM object we have written, the object written is both COM objects and COM objects; in COM object environment and interception (Intercept) technology is incorporated into a standard COM proxy / stub, so you can create items by standard CoCreateInstance methods, and the MTS components created by the CreateInstance method can also operate and fully compatible with COM . Second, the parameterized COM object structure introduces many new services in COM , and the parameterized object structure is one of the features. This feature is used to implement a string parameter for COM object creation, and component objects query the string parameters configured by administrator via the IObjectConstruct interface. A typical purpose of the parameterized object structure is that it can be applied to the connection string parameters for the ADO. IObjectConstruct allows methods or objects to control related object processing functions by parameters. We must use interface objects to implement this interface. When administrators are valid when the administrator is set, COM will call IOBJECTCONSTRUCT.CONSTRUCT to get through IObjectConstructString. Parametric COM object structure in the string parameters. The IObjectConstructString interface is used to access the builder string. This object is an Automation COM object, but does not need to implement him through an interface object, COM supports exposes this object when calling IOBJECTCONSTRUCT.CONSTRUCT. How to enter object structure strings for components. 1. Select the corresponding components in the Component Manager, right-click the shortcut menu, then click Properties 2, click the Component Properties dialog box, click the activation property page.

转载请注明原文地址:https://www.9cbs.com/read-1562.html

New Post(0)