inst->QueryInterface(kIFactoryIID, (void **) &iFactory);
inst->QueryInterface(NS_GET_IID(nsIFactory), (void **) &iFactory);
int main(int argc, char *argv[]){  nsTestComFactory *inst = new nsTestComFactory();  IClassFactory *iFactory;  inst->QueryInterface(kIFactoryIID, (void **) &iFactory);  IUnknown *iUnknown;    nsITestCom *iTestCom;  nsresult res;  iFactory->LockServer(TRUE);  res = iFactory->CreateInstance(NULL,				 IID_IUnknown, 				 (void **) &iUnknown);  iFactory->LockServer(FALSE);  GUID testGUID = NS_ITEST_COM_IID;  HRESULT hres;  hres= iUnknown->QueryInterface(testGUID, 				 (void **) &iTestCom);  iTestCom->Test();  iUnknown->Release();  iTestCom->Release();  iFactory->Release();  return 0;}