RE: GURUS HELP-->Backup API

From: Martin Platt (MartinPlatt_at_discussions.microsoft.com)
Date: 09/29/04


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.



Relevant Pages

  • Re: GURUS HELP-->Backup API
    ... The streams bit - I haven't really progressed that far. ... enumeration would be the next bit. ... >> it does the names of the streams, or would I have to create some sort of ... >> information file to store these items? ...
    (microsoft.public.win32.programmer.kernel)
  • Re: File Recovery on ext2/3?
    ... > Always maintain a complete backup of all files you don't care to lose. ... that's the sort of repy I really appreciate. ... and I could tell that I never lost any byte of information the whole time. ... any filesystem and you cannot save any computer and electronics related ...
    (alt.os.linux.redhat)
  • Re: File Saving Strategies
    ... > here because it seems sort of like the right place and I respect what ... > backup, where both the binary format of the file and a plain text ... stored data was corrupted would be lost. ... reason why IT is still dominated by transaction processing even though ...
    (comp.object)
  • Re: OT: backup topic
    ... I run a small office network. ... What I have found is that any sort of backup that requires manual ... We have a couple of USB disk drives hidden on the premises, ...
    (uk.comp.homebuilt)
  • Re: Locking rows (not columns)?
    ... You could record a macro that sorts your range. ... And backup, backup, backup. ... > I download and store my bank statements in an Excel spreadsheet. ... > However, it's very easy to use the 'sort' function incorrectly, so ...
    (microsoft.public.excel.misc)

Quantcast