const char* szValue=szRegTable[i];
if(szValue==(const char*)-1)
szValue=szDllPath;
HKEY hKey;
LONG ret=RegCreateKey(HKEY_CLASSES_ROOT,szKeyName,&hKey);
if(ret==ERROR_SUCCESS){
RegSetValueEx(hKey,szValueName,0,REG_SZ,(const BYTE*)szValue,
strlen(szValue)+1);
RegCloseKey(hKey);
}
if(ret!=ERROR_SUCCESS){
hr=SELFREG_E_CLASS;
DllUnregisterServer();
}
}
return hr;
}
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, void** ppvObj) {
HRESULT hr = E_OUTOFMEMORY;
*ppvObj = NULL;
CClassFactory *pClassFactory = new CClassFactory;
if (pClassFactor