|Read Nick Parker's article, Creating a CCW...[^]. You should also read the
System.Runtime.InteropServices documentation so you understand what's going on. Knowledge of COM is also helpful, such as understand the difference between
IDispatch (for automation), knowing which
IPersist* interfaces that Word supports (it is a typical ActiveX container), knowing what ActiveX containers are, and the like. You should also NEVER use auto-generated class interfaces (as I asked Nick to add to his article) and NEVER change your class interface after releasing your component (instead, create a new interface by appending 2, 3, etc. for each version) that derives from the first and adds methods with new
DispIdAttributes for automation objects).
As far as OLE is concerned (for hosting toolbars, merging menus, hosting status bars, etc.), you'd really be best writing your component(s) in C++ as opposed to some .NET language like C# because you'll have to define LOTS of COM interfaces with the appropriate
InterfaceTypeAttributes, and so on.
System.Runtime.InteropServices provides a few managed definitions (the interfaces that start with
-----BEGIN GEEK CODE BLOCK-----
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----