*aResult = NULL; if (NULL != aOuter)
*aResult = nsnull; if (aOuter)
static nsresult nsImageManagerConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult){    nsresult rv;  if ( NULL == aResult )  {    rv = NS_ERROR_NULL_POINTER;    return rv;  }  *aResult = NULL;  if (NULL != aOuter)  {    rv = NS_ERROR_NO_AGGREGATION;    return rv;  }  // this will return an image manager with a count of 1  rv = NS_NewImageManager((nsIImageManager **)aResult);  return rv;}