Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
The P6R Component Object Model

Introduction

P6COM Component Object Rules

https://www.p6r.com/articles/2009/02/10/p6com-component-object-rules/

Rules for designing binary compatible interfaces.

The [p6]COM runtime allows you to create compiler independent components. In order to do this, you must follow several rules when designing your component's interfaces. Doing so will allow components compiled with any C++ compiler to be loaded, executed and used by components built with a different compiler.

All interfaces should be completely abstract meaning that all methods MUST be pure virtual.
Interfaces are not allowed to have any implementation. They are a binary definition of how methods are layed out.
Don't use overloaded methods.
Different compilers will order the methods differently in the vtable.
Do not pass std C++ library or other C++ types (STL, class pointers etc.) across interfaces.
Use only native "C" types, or other interfaces as argments.
Never pass allocated memory directly across component DLL boundaries.
DLL's and executables can be built using different heaps which can result in hard to find crashes if memory allocated by one heap is freed by another,