ProCOM Infrastructure

From MPSWiki
Revision as of 15:45, 19 March 2019 by Svan (talk | contribs) (Created page with "=Introduction= ProCOM application is using '''PROMainDLL.dll''' as the interfaces factory library. '''PROMainDLL.dll''' is providing '''IProMain''' interface accessible by ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

ProCOM application is using PROMainDLL.dll as the interfaces factory library. PROMainDLL.dll is providing IProMain interface accessible by calling GetProMainInterface export function. IProMain interface is the interface providing GetInterface method that is the key method for creating instances of other interfaces. GetIProMain inline function defined in inthelpr.h is the common function used for accessing IProMain interface. GetPROInterface inline function is the common function used for creating interfaces instances. Next example shows how to create some instance of some interface:

_com_ptr(ISomeInterface);
if (FAILED(GetPROInterface(IID_ ISomeInterface, (void**)(& ISomeInterface)), 0, 0, pParameters))
     return E_FAIL;