RE: GURUS HELP-->Backup API
From: Martin Platt (MartinPlatt_at_discussions.microsoft.com)
Date: 09/29/04
- Next message: methmath: "Threads and limited resource access"
- Previous message: Harry Potter: "clarify few points in windbg Please.."
- In reply to: Martin Platt: "GURUS HELP-->Backup API"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 28 Sep 2004 22:11:02 -0700
Guys,
Well, first first bit, I've managed to get working. I can create what I
think is a backup of a file... nice! What I can't now do is restore that
file. Here's my question now and this still needs tweaking to read the
WIN32STREAM stuff, then loop while there's data to be read - first of all, is
this flow of control the right way to do things:
if (ReadFile(hBackupFile, pBuffer, (uint)buffer.Length, ref bytesRead, 0))
{
ConvertBufferToWIN32STREAM(pBuffer, ref sid);
switch(sid.dwStreamID)
{
case Win32StreamType.BACKUP_DATA:
if (BackupWrite(hBackupFile, pBuffer, (uint)bytesRead, ref
lpBytesWritten, false, false, ref context)
{
throw new Exception ("BackupWrite failed....");
}
break;
case Win32StreamType.BACKUP_LINK:
// Handle Hard link ???
break;
}
}
And the second question - does BackupWrite handle the names of the files, as
it does the names of the streams, or would I have to create some sort of an
information file to store these items? At the moment the information out
there on this sort of thing is somewhat lacking, so I was hoping one of you
win32 gurus might have come across some of it, and could help me out.
Thanks for your help,
Martin Platt.
- Next message: methmath: "Threads and limited resource access"
- Previous message: Harry Potter: "clarify few points in windbg Please.."
- In reply to: Martin Platt: "GURUS HELP-->Backup API"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|