Tuesday, January 30, 2007

Hard working

It's been a while since I've updated my blog. I am new to blog. It's not easy to keep the blog updated. I'm trying to update as often as I can, but I'm lazy. T.T

From last friday, I started my java porting work on Windows Mobile. It has been delayed about a month. I have only a month before the Lab Entry. I have to work hard. There are lots of obstacles to deal with. I hope everything goes well. Cross my finger to myself. ^^

Tuesday, January 16, 2007

COM (Common Object Model)

To summarize, COM defines several basic fundamentals that provide the underpinnings of the object model. The binary standard allows components written in different languages to call each other's functions. Interfaces are logical groups of related functions—functions that together provide some well-defined capability. IUnknown is the interface that COM defines to allow components to control their own life span and to dynamically determine another component's capabilities. A component object implements IUnknown to control its life span and to provide access to the interfaces it supports. A component object does not provide direct access its data. GUIDs provide a unique identifier for each class and interface, thereby preventing naming conflicts. And finally, the Component Object Library is implemented as part of the operating system and provides the "legwork" associated with finding and launching component objects.

The core of the Component Object Model is a specification for how components and their clients interact. As a specification, it defines a number of other standards for interoperability of software components:

  • A binary standard for function calling between components
  • A provision for strongly-typed groupings of functions into interfaces
  • A base IUnknown interface providing:
    • A way for components to dynamically discover the interfaces supported by other components (QueryInterface)
    • Reference counting to encapsulate component lifetime (AddRef and Release)
  • A mechanism to uniquely identify components and their interfaces (GUIDs)