<< Click to Display Table of Contents >> RayPack > 7.3 u6 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Advanced Mode > Components > Edit a Component Tab: COM |
A COM class is an implementation of a group of interfaces in code executed whenever you interact with a given object.
On each computer, COM maintains a database of all the CLSIDs for the servers installed on the system. This is a mapping between each CLSID and the location of the DLL or EXE that houses the code for that CLSID. COM consults this database whenever a client wants to create an instance of a COM class and use its services.
The COM tab contains a listing of COM classes registered to be organized within the current component, and beholds all controls required to add, edit, and remove such objects. Internally, the properties of COM class objects are stored within the Class table of the Installer database. The number of COM classes that are currently organized within the component is displayed at the right-hand side of the COM tab label.
With a right-click on any COM class item, the context menu is displayed, revealing a substantial set of manipulation options along with the Go to Row option. Clicking this option loads the TABLES view, with the Class table displayed and the row of the originally selected file marked for swift orientation.
Within the COM tab of the Advanced mode view COMPONENTS, users click the NEW CLASS button to generate a COM class object, by default equipped with an unique CLSID and some other vital properties.
As soon as the class object is created, the default values have to be adjusted to the actually required settings. Please refer to the Edit a COM class section for further details.
Users trigger COM class deletion by:
•Right-clicking a COM class object, and selecting Remove from the context menu.
•Left-clicking a COM class object, and hitting Delete on the keyboard.
Either way, a confirm dialog is displayed, requesting the user to confirm the irrevocable key deletion:
•With a click on the REMOVE button, the object is actually deleted
•With a click on the DO NOT REMOVE or CANCEL button, the deletion procedure is aborted.
Note: It is possible to suppress the confirm dialog by activating the "In future do not show this confirmation for delete operations" checkbox. However, deleting objects accidentally may cause serious consequences for the packaging project. Therefore, it is recommended to keep the confirmation as active part of the regular deletion procedure. |
Users have to call the COM class property details to access all relevant object properties for manipulation. To do so, users may:
•Right-click a COM class object displayed in the list, and select Edit from the context-menu.
or
•Left-click a COM class object displayed in the list, and hit Alt + Enter on the keyboard.
The CLASS PROPERTIES dialog is displayed, revealing a tabbed interface with three groups of properties for manipulation:
Each COM class is identified by a CLSID, a unique 128-bit GUID, which the server must register. COM uses this CLSID, at the request of a client, to associate specific data with the DLL or EXE containing the code that implements the class, thus creating an instance of the object.
A textual description of the class.
The file type mask has to follow the standard format [offset, cb, mask, value]:
•offset - If a positive integer value is given, it represents the number of offset bytes until the byte range begins. A negative integer indicates the same offset counted from the end of the file.
•cb - Counted from the position defined by the offset, this integer defines the number of bytes which define the logical AND operation on the mask.
•mask - Once the start position and length of the mask are defined, here is the actual mask definition, used to decide which parts of the file have to be considered for the execution of the a logical AND operation.
•value - The value must equal the AND operation result in order to recognize the relation between a file and a specific class on the target device.
If a fitting icon is already available within the stock of icons stored within the current packaging project, it is possible to simply select it from the catalog. To do so, users have to click on the downwards arrow and pick the desired icon from the displayed dialog.
If a new icon object has to be created, users have to click on load from disk and select a .ico, .exe, or .dll file to use as new icon.
The AppID has to be a GUID that has already been added to the packaging project. It will be registered under HKEY_CLASSES_ROOT\AppID, and is designed to group security and configuration options of COM objects.
Use relative paths to be able to define flexible COM objects with their bare file name used for COM server definition. Internally, the option is reflected within the Attributes column of the Class table.
Each COM class may be equipped with a default ProgId, defining the version independent identifier for a program. Internally, ProgId objects are stored within the ProgId table of the Installer database. RayPack allows users to handle several ProgId objects within this dialog, but only defines a relation to the current COM object for the id that is marked as default.
To add a new ProgId, users simply hit the Create new ProgId button, visible in the upper area of the PROGID tab. A new ProgId object is automatically created and added to the ProgId database table. Users have to edit the default settings to define the actually intended ProgId information.
Name
The string defining the name of the ProgId.
Parent
Select one of the other already existing ProgIds stored within the ProgId table as parent for the current one. When the ProgId is selected for installation, the corresponding version-independent ProgIds associated through the this parent relation are also selected for registration.
Description
A textual description of the ProgId.
Icon
If a fitting icon is already available within the stock of icons stored within the current packaging project, it is possible to simply select it from the catalog. To do so, users have to click on the downwards arrow and pick the desired icon from the displayed dialog.
If a new icon object has to be created, users have to click on load from disk and select a .ico, .exe, or .dll file to use as new icon.
Users trigger ProgId deletion by:
•Right-clicking a ProgId, and selecting Remove from the context menu.
•Left-clicking a ProgId, and hitting Delete on the keyboard.
Either way, a confirm dialog is displayed, requesting the user to confirm the irrevocable object deletion:
•With a click on the REMOVE button, the ProgId is actually deleted
•With a click on the DO NOT REMOVE or CANCEL button, the deletion procedure is aborted.
Note: It is possible to suppress the confirm dialog by activating the "In future do not show this confirmation for delete operations" checkbox. However, deleting objects accidentally may cause serious consequences for the packaging project. Therefore, it is recommended to keep the confirmation as active part of the regular deletion procedure. |
Be aware: Removing a ProgId from a component actually removes it from the whole packaging project! |
Please note the following restrictions and conditions for components context management.
•Each class has at least 1 context
•Each class has maximum 1 instance of each type:
oInprocServer32
oInprocServer
oLocalServer
oLocalServer32
•The custom InprocServer names may not be the same as one of the four above
•Inproc and InprocServer32 may not have editable default handler or arguments
Users may add a new custom context at any time, whilst adding any other type may be unavailable due to already existing contexts of the same type. To add a new context, users hit the NEW CONTEXT button above the list of already created context objects. The options menu contains all context types, but offers only those for active selection, which have not already been added to the COM object.
Please note that new contexts are always added with default settings, which usually may only be manipulated partially.
Name
The context name may only be edited for custom type contexts. Internally, the name is stored as string value.
Default Handler
This property may be edited for local and custom context types. If editable, users may select one of the following four options:
•None - representing an DefInprocHandler value of NULL
•16 bit - representing an DefInprocHandler value of 1
•32 bit - representing an DefInprocHandler value of 2
•16/32 bit - representing an DefInprocHandler value of 3
Arguments
If a LocalServer or LocalServer32 CLSID key appears in the Context field, the text in this field is registered as the argument against the server and is used by COM to invoke the server. The DefInprocHandler and Argument fields can both be Null if LocalServer or LocalServer32 types are selected.
Users trigger context deletion by:
•Right-clicking a context, and selecting Remove from the context menu.
•Left-clicking a context, and hitting Delete on the keyboard.
Either way, a confirm dialog is displayed, requesting the user to confirm the irrevocable object deletion:
•With a click on the REMOVE button, the context is actually deleted
•With a click on the DO NOT REMOVE or CANCEL button, the deletion procedure is aborted.
Since each COM class object requires at least one context, it is not allowed to delete all context objects via the dialog based user interface. To manually modify the context values, users have to call the Class table in the TABLES editor.
Note: It is possible to suppress the confirm dialog by activating the "In future do not show this confirmation for delete operations" checkbox. However, deleting objects accidentally may cause serious consequences for the packaging project. Therefore, it is recommended to keep the confirmation as active part of the regular deletion procedure. |
Be aware: Removing a context from COM object and component actually removes it from the whole packaging project! |