Anonymous
From technical point of view an Operation plug-in is a COM class placed in a category CATID_DocumentOperation and implementing an IDocumentOperation interface.
The IDocumentOperation interface is declared in the type library of RWProcessing.dll.
// "BC429154-A2B8-4808-A383-82517A57D209"
interface IDocumentOperation : IUnknown
{
HRESULT '''NameGet'''(
[in] IOperationManager* a_pManager,
[out] ILocalizedString** a_ppOperationName);
HRESULT '''ConfigCreate'''(
[in] IOperationManager* a_pManager,
[out] IConfig** a_ppDefaultConfig);
HRESULT '''CanActivate'''(
[in] IOperationManager* a_pManager,
[in] IDocument* a_pDocument,
[in] IConfig* a_pConfig,
[in] ISharedStateManager* a_pStates);
HRESULT '''Activate'''(
[in] IOperationManager* a_pManager,
[in] IDocument* a_pDocument,
[in] IConfig* a_pConfig,
[in] ISharedStateManager* a_pStates,
[in] RWHWND a_hParent,
[in] LCID a_tLocaleID);
};
Because the operation plug-ins follow the cooperating plug-ins pattern, each method has the operations manager as its first argument.
GUID CATID_DocumentOperation =
{0x902734f0, 0x00a5, 0x477c, {0xb3, 0x36, 0xb9, 0x22, 0x1d, 0x46, 0xa3, 0xdd}};