#define P6_IMPLEMENT_CREATEINSTANCE_NO_AGG ( classname   ) 
Value:
P6R::P6ERR  classname::createInstance(P6R::p6ICom *pOuter,const P6R::IID &iid,P6R::P6VOID **ppNewComponent) \
{                                                                          \
   P6R::P6ERR err;                                                         \
   classname *pObj = NULL;                                                 \
   if(NULL != pOuter)                                                      \
      return P6R::eNoAgregation;                                           \
   if(NULL == ppNewComponent)                                              \
      return P6R::eAccessFault;                                            \
   *ppNewComponent = NULL;                                                 \
   if(NULL == (pObj = new classname())) {                                  \
      *ppNewComponent = NULL;                                              \
      return P6R::eNoMemory;                                               \
   }                                                                       \
   pObj->addref();                                                         \
   if(1 == pObj->m_cRef) {                                                 \
      err = pObj->queryInterface(iid,ppNewComponent);                      \
   }                                                                       \
   else {                                                                  \
      err = eInvalidRefcount;                                              \
   }                                                                       \
   pObj->release();                                                        \
   return err;                                                             \
}

Definition at line 41 of file p6comhlpr.h.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.