MSDN Documentation

Windows API Reference

Component Object Model (COM) Functions

This section provides a comprehensive reference for the functions used in Windows Component Object Model (COM) programming.

Core COM Functions

  • CoCreateInstance
    Creates a single uninitialized object of the specified class.
  • CoInitializeEx
    Initializes the COM library on the current thread.
  • CoUninitialize
    Closes the COM library on the current thread.
  • CoGetClassObject
    Obtains a pointer to an object's class factory.
  • CoGetInterfaceAndReleaseStream
    Retrieves an interface pointer from a marshalled interface.
  • CoMarshalInterface
    Marshals an interface pointer into a stream.
  • CoReleaseMarshalData
    Releases data that was previously marshalled by CoMarshalInterface.
  • CoTaskMemAlloc
    Allocates memory that the COM library can use.
  • CoTaskMemFree
    Frees memory that was previously allocated by CoTaskMemAlloc.
  • StringFromGUID2
    Converts a GUID structure to its equivalent string representation.

Reference Counting Functions

  • IUnknown::AddRef
    Increments the reference count for an interface on an object.
  • IUnknown::Release
    Decrements the reference count for an interface on an object.

Type Information Functions

  • ITypeLib::GetTypeInfoCount
    Retrieves the number of type descriptions in a type library.
  • ITypeLib::GetTypeInfo
    Retrieves a pointer to a type description.

Error Handling Functions

  • GetErrorInfo
    Retrieves the current error object.
  • SetErrorInfo
    Associates an error object with the current thread.