Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Accès rapide :






Vous êtes un professionnel et vous avez besoin d'une formation ?

Programmation avec
le langage PHP


Voir le programme détaillé
ESN Inovelya : Nous recrutons
<h1>Implémentation du serveur COM - Implémentation de la fabrique 1/2</h1> <p>extern long g_nComObjsInUse; // Pour maintenir le conteur d'instances COM et vue de pouvoir détacher la DLL du process CAddFactory::CAddFactory() { this->m_nRefCount=0; InterlockedIncrement( &g_nComObjsInUse ); } CAddFactory::~CAddFactory() { InterlockedDecrement( &g_nComObjsInUse ); } // Prise en charge de la création d'instances d'objets COM HRESULT __stdcall CAddFactory::CreateInstance( IUnknown* pUnknownOuter, const IID& iid, void** ppv ) { if ( pUnknownOuter != NULL ) { return CLASS_E_NOAGGREGATION; } CAddObj* pObject = new CAddObj(); if ( pObject == NULL ) { return E_OUTOFMEMORY; } return pObject->QueryInterface( iid, ppv ); } HRESULT __stdcall CAddFactory::LockServer( BOOL bLock ) { return E_NOTIMPL; }</p> Diapositive précédente Diapositive suivante