Discussion:
Custom Backups and Restores - Missing API libs/docs?
(too old to reply)
Hannes
2007-06-22 13:24:00 UTC
Permalink
I am trying to write a module that will restore the system state from a
previous backup under VSS. The problem I gave is locating the resources...

For instance: One of the things that need to be restored is the COM+ Class
Registration Database. I have read the article at
http://msdn2.microsoft.com/en-us/library/aa381499.aspx entitled Backup Up and
Restoring the COM+ Class Registration Database under VSS. At the bottom the
documents says the following:

--
The restore must then be completed by doing the following:

Stopping the COMSysApp service.
1. Loading the Catsvcut.dll library into memory (by calling LoadLibrary).
2. Calling RegDBRestore and passing in the location of the temporary file
containing the COM+ Registration Database as a WCHAR * string.
--

The problem is I cannot find the Catsvcut.dll library or the RegDBRestore
function anywhere? Where can I find these.

Also, the following article:
http://msdn2.microsoft.com/en-us/library/aa381639.aspx entitled "Handling FRS
and SYSVOL under VSS" says the following:

--
Directories containing replicated user and system data must be explicitly
located prior to a restore by doing the following:

1. Locating SYSVOL by using the NtFrsApiEnumBackupRestoreSets function to
enumerate all replicated directories on a system and determining whether each
is the system volume.
--

Where can I find the NtFrsApiEnumBackupRestoreSets function?

Thanks
IEURO
2007-06-29 09:56:04 UTC
Permalink
I have the same progblems , too. The Catsvcut.dll is located in
C:\Windows\System32.
Post by Hannes
I am trying to write a module that will restore the system state from a
previous backup under VSS. The problem I gave is locating the resources...
For instance: One of the things that need to be restored is the COM+ Class
Registration Database. I have read the article at
http://msdn2.microsoft.com/en-us/library/aa381499.aspx entitled Backup Up and
Restoring the COM+ Class Registration Database under VSS. At the bottom the
--
Stopping the COMSysApp service.
1. Loading the Catsvcut.dll library into memory (by calling LoadLibrary).
2. Calling RegDBRestore and passing in the location of the temporary file
containing the COM+ Registration Database as a WCHAR * string.
--
The problem is I cannot find the Catsvcut.dll library or the RegDBRestore
function anywhere? Where can I find these.
http://msdn2.microsoft.com/en-us/library/aa381639.aspx entitled "Handling FRS
--
Directories containing replicated user and system data must be explicitly
1. Locating SYSVOL by using the NtFrsApiEnumBackupRestoreSets function to
enumerate all replicated directories on a system and determining whether each
is the system volume.
--
Where can I find the NtFrsApiEnumBackupRestoreSets function?
Thanks
IEURO
2007-06-29 11:44:00 UTC
Permalink
This is my part of source code for you reference:
typedef BOOL (CALLBACK* LPFNDLLFUNC1)(WCHAR *);
HRESULT CVssClient::RestoreComPlusDatabase(void)
{
HRESULT hrInternal = S_OK;
BOOL retValue = FALSE;
HRESULT errorCode = 0x0;
char dbPath[MAX_PATH] = "C:\\Windows\\registration\\R000000000001.clb";
WCHAR dbPath[MAX_PATH];// =
WString2Buffer("C:\\Windows\\registration\\R000000000001.clb");
HINSTANCE hDLL;
LPFNDLLFUNC1 lpfnDllRegDBRestore; // Function pointer

MultiByteToWideChar(CP_ACP, 0,
buffer, (int) strlen(buffer),
dbPath,
MAX_PATH);

hDLL = LoadLibrary(L"Catsvcut.dll");
if (hDLL != NULL)
{
lpfnDllRegDBRestore = (LPFNDLLFUNC1)GetProcAddress(hDLL, "RegDBRestore");
if (!lpfnDllRegDBRestore)
{
// handle the error
FreeLibrary(hDLL);

// Error encountered; generate message and exit.
errorCode = GetLastError();
hrInternal = HRESULT_FROM_WIN32(errorCode);
if (errorCode != NOERROR)
return hrInternal;
}
else
{
// call the function
retValue = lpfnDllRegDBRestore(dbPath);
if(retValue != TRUE)
{
// Error encountered; generate message and exit.
errorCode = GetLastError();
hrInternal = HRESULT_FROM_WIN32(errorCode);
if (errorCode != NOERROR)
return hrInternal;
}
}
}

return hrInternal;
}
Post by IEURO
I have the same progblems , too. The Catsvcut.dll is located in
C:\Windows\System32.
Post by Hannes
I am trying to write a module that will restore the system state from a
previous backup under VSS. The problem I gave is locating the resources...
For instance: One of the things that need to be restored is the COM+ Class
Registration Database. I have read the article at
http://msdn2.microsoft.com/en-us/library/aa381499.aspx entitled Backup Up and
Restoring the COM+ Class Registration Database under VSS. At the bottom the
--
Stopping the COMSysApp service.
1. Loading the Catsvcut.dll library into memory (by calling LoadLibrary).
2. Calling RegDBRestore and passing in the location of the temporary file
containing the COM+ Registration Database as a WCHAR * string.
--
The problem is I cannot find the Catsvcut.dll library or the RegDBRestore
function anywhere? Where can I find these.
http://msdn2.microsoft.com/en-us/library/aa381639.aspx entitled "Handling FRS
--
Directories containing replicated user and system data must be explicitly
1. Locating SYSVOL by using the NtFrsApiEnumBackupRestoreSets function to
enumerate all replicated directories on a system and determining whether each
is the system volume.
--
Where can I find the NtFrsApiEnumBackupRestoreSets function?
Thanks
Loading...