Custom Backups and Restores - Missing API libs/docs?

Custom Backups and Restores - Missing API libs/docs?

Post by SGFubmV » Sat, 23 Jun 2007 22:24:00


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://www.yqcomputer.com/
Restoring the COM+ Class Registration Database under VSS. At the bottom the
documents says 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://www.yqcomputer.com/ "Handling FRS
and SYSVOL under VSS" says 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
 
 
 

Custom Backups and Restores - Missing API libs/docs?

Post by SUVVUk » Sat, 30 Jun 2007 18:56:04

I have the same progblems , too. The Catsvcut.dll is located in
C:\Windows\System32.

 
 
 

Custom Backups and Restores - Missing API libs/docs?

Post by SUVVUk » Sat, 30 Jun 2007 20:44:00

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;
}