API UpdateRegistryFromResource fails with error 0x8007007e



I have a COM service created using the ATL wizard.
It works fine on few systems and on 1 system it fails to register.
System has,
OS Name Microsoft(R) Windows(R) Server 2003 Enterprise x64 Edition
Version 5.2.3790 Service Pack 1 Build 3790

(Same version other systems it is working fine)

The API, UpdateRegistryFromResource returns error 0x8007007e.

After manually copying the interface registry entries the service
registers fine and works fine.

Has anyone come across such issue ?

Code snippet of the register part is,
------------------
inline HRESULT CServiceModule::RegisterServer(BOOL bRegTypeLib, BOOL
bService)
{
HRESULT hr = CoInitialize(NULL);
if (FAILED(hr))
return hr;

// Remove any previous service since it may point to
// the incorrect file
//Uninstall();

// Add service entries
UpdateRegistryFromResource(IDR_XYService, TRUE);

// Adjust the AppID for Local Server or Service
CRegKey keyAppID;
LONG lRes = keyAppID.Open(HKEY_CLASSES_ROOT, _T("AppID"),
KEY_WRITE);
if (lRes != ERROR_SUCCESS)
return lRes;

CRegKey key;
lRes = key.Open(keyAppID,
_T("{14437033-2F7E-45E1-91F1-683172AC3683}"), KEY_WRITE);
if (lRes != ERROR_SUCCESS)
return lRes;
key.DeleteValue(_T("LocalService"));

if (bService)
{
key.SetValue(_T("XY Service"), _T("LocalService"));
key.SetValue(_T("-Service"), _T("ServiceParameters"));

// Create service
Install();
SetDescription();
}

// Add object entries
hr = CComModule::RegisterServer(bRegTypeLib);

CoUninitialize();
return hr;
}
------------------
.



Relevant Pages

  • Re: Plague
    ... Kirkburton was a rural parish but, although extensive as northern parishes often were, was not on the scale of Halifax. ... Another possible explanation is that the vicar died and his duties were ... The transcriber comments that 15 entries about this time are in the hand of some of the earliest entries thought to be of 1541 and ascribes this to the his illness & death. ... She doesn't, however, comment that a new hand takes up after these entries so it's not clear as to whether the entries prior to March were by the curate or by some other person who resumed the writing of the register after the upset due to the loss of Wylsone. ...
    (soc.genealogy.britain)
  • IE 6 Will not open inside specific User Profile
    ... I restarted WinXP in Safe Mode and searched regedit for any strange ... unable to register it because whenever I tried to register it, ... After spending hours looking at registry entries and searching the net, ... I was able to register Norton Antivirus. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Authenticated Users in DNS
    ... We need the computers to be able to register themselves, ... It used to be that only domain admins could manually add DNS entries. ...
    (microsoft.public.windows.server.active_directory)
  • Re: St. Neots Regatta (UK)
    ... meant to register but OARA unaccountably refused to process online ... registration until three days after entries closed ... club who put three entries in, paid for three, and complained that ... their fourth crew hadn't been accepted ...
    (rec.sport.rowing)
  • Re: St. Neots Regatta (UK)
    ... meant to register but OARA unaccountably refused to process online ... registration until three days after entries closed ... club who put three entries in, paid for three, and complained that ... their fourth crew hadn't been accepted ...
    (rec.sport.rowing)