Component object model interface to C++ type...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S124000, C717S116000, C717S164000, C717S165000, C717S167000, C719S329000

Reexamination Certificate

active

06721942

ABSTRACT:

FIELD OF THE INVENTION
The present invention generally relates to the Component Object Model (COM), and more particularly to the conversion of COM interfaces to underlying C++ objects.
BACKGROUND OF THE INVENTION
The Component Object Model (COM) is a software architecture that supports reuse of software components between different application programs written in different languages. Reusing software components, where appropriate, reduces the cost of creating a new application as compared to creating an application from scratch. COM addresses the issues of interoperability where reuse is desirable for binary executables that are created by different entities in different languages.
In COM, a “component” is a piece of compiled code that provides one or more services. It will be appreciated that even though a component is also an object in object oriented programming (OOP) terms, the term “component” will be used herein to avoid confusion with other objects in general. An “interface” is the mechanism through which components interact and through which software in general accesses the services of a component. The interface defines the behavior and responsibilities of the component. In other words, the interface is a group of related functions and forms the binary standard or contract through which the component is accessed.
A COM interface is not a class and cannot be instantiated by itself. A COM component must implement the interface, and the component must be instantiated for the interface to exist. It will be appreciated that the same interface can be implemented in different ways by different components with the restriction that each component must satisfy the interface's behavior and responsibilities.
In some applications there is an active relationship between COM objects. For example, a first COM interface method may take a reference to another COM object as input. This reference is used to identify the COM object against which direct action will take place. In addition, a method of a first interface of a first COM object may be accessed in an interface method of a second COM object. It will be appreciated, however, that there may be certain classes of clients for which access to the method of the first interface is undesirable.
One solution to protect attributes of the COM object (for example, the method of the first interface) is to implement a third COM interface that includes the desired attributes. This third COM interface wouldn't be documented to normal clients and would only be used internally. This solution, however, suffers from the fact that industrious COM clients could get access to the third COM interface. The rules of COM dictate that an object must indicate, on demand, whether or not it supports a given interface. An object cannot discriminate between types of clients over time when deciding what interfaces it supports. Thus, the third COM interface could be discovered and used by client for which its use was unintended.
A method that addresses the aforementioned problems, as well as other related problems, is therefore desirable.
SUMMARY OF THE INVENTION
In various embodiments, the invention provides methods and apparatus for converting from a COM interface pointer to an underlying C++ object. In the various embodiments, classes are constructed in support of the underlying C++ object. The classes are used to enforce rules that allow one to safely convert a COM interface pointer. One rule is that a COM interface to be converted cannot be marshaled. A second rule is that an object requesting a C++ object must have legal access to the COM interface (for example, the same execution unit). A third rule is that the object type of the COM interface must be in the inheritance hierarchy of the C++ object.
In one embodiment, a COM object is instantiated having a first interface referenced with a first interface pointer and a raw interface. The COM object is implemented as a first object of a C++ class that has a public conversion method. The conversion method, responsive to an input of the first interface pointer, returns a resultant pointer to the first object if the COM object supports the raw interface, the raw interface has not been marshaled, and the execution unit that implements the COM object referenced by the first interface pointer is the same execution unit performing the conversion method.
In another embodiment, a COM object is instantiated having a first interface pointer. The COM object is implemented as a first object of a first C++ class, which has a public conversion method and a private registry attribute. The private registry attribute maps an interface pointer of the COM object to an associated pointer to the first object. Responsive to an interface pointer of the COM object that is input to the conversion method, the associated pointer to the first object is returned.
The above summary of the present invention is not intended to describe each disclosed embodiment of the present invention. The figures and detailed description that follow provide additional example embodiments and aspects of the present invention.


REFERENCES:
patent: 5732270 (1998-03-01), Foody et al.
patent: 6134559 (2000-10-01), Brumme et al.
patent: 6167565 (2000-12-01), Kanamori
patent: 6347342 (2002-02-01), Marcos et al.
David Button, Interfacing Ada 95 to Microsoft COM and DCOM Technologies, pp. 9-14.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Component object model interface to C++ type... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Component object model interface to C++ type..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Component object model interface to C++ type... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3239153

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.