Guest vishy Posted July 28, 2008 Posted July 28, 2008 Hi All, First of all, I am new to both windows server 2008 and Volume shadow copy services. I am writing an requestor application to take backup of active directory. So following "Overview of Processing a Backup Under VSS"(http://msdn.microsoft.com/en-us/library/aa384589(VS.85).aspx) link. I freshly installed Windows server 2008, and wrote sample code to list the writes to begin with. But function GatherWriterMetadata of IVssBackupComponents returning with 0x80042301(VSS_E_BAD_STATE) value. So can anyone suggest me how do i rectify this problem. code snippet: HRESULT hRet = S_OK; IVssBackupComponents *pBackupComp = NULL; IVssAsync* sync = NULL; do { hRet = CreateVssBackupComponents(&pBackupComp); if(hRet != S_OK) break; printf("CreateVssBackupComponents Successful\n"); hRet = pBackupComp->GatherWriterMetadata(&sync); if(hRet == S_OK) { printf("GatherWriterMetadata Successful"); if ( sync ) { printf("Gathering the wrtiter metadata"); sync->Wait(); sync->Release(); } } else { printf("GatherWriterMetadata Failed : Hex : %x, Decimal : %d\n", hRet, hRet); break; } printf("Gathered the wrtiter metadata"); And another question, Is VSS only the solution for developers for taking backup and recovery for Windows Server 2008? Previous version API's are not compatible with Windows Server 2008? _____ Vishy
Guest vishy Posted July 29, 2008 Posted July 29, 2008 Re: GatherWriterMetaData 80042301 I think i posted in wrong groups it seems. On Jul 28, 9:47 am, vishy <vishwanath.kine...@gmail.com> wrote: > Hi All, > > First of all, I am new to both windows server 2008 and Volume shadow > copy services. I am writing an requestor application to take backup of > active directory. So following "Overview of Processing a Backup Under > VSS"(http://msdn.microsoft.com/en-us/library/aa384589(VS.85).aspx) > link. > > I freshly installed Windows server 2008, and wrote sample code to list > the writes to begin with. But function GatherWriterMetadata of > IVssBackupComponents returning with 0x80042301(VSS_E_BAD_STATE) value. > So can anyone suggest me how do i rectify this problem. > > code snippet: > > HRESULT hRet = S_OK; > IVssBackupComponents *pBackupComp = NULL; > IVssAsync* sync = NULL; > do > { > hRet = CreateVssBackupComponents(&pBackupComp); > > if(hRet != S_OK) > break; > printf("CreateVssBackupComponents Successful\n"); > > hRet = pBackupComp->GatherWriterMetadata(&sync); > > if(hRet == S_OK) > { > printf("GatherWriterMetadata Successful"); > if ( sync ) > { > printf("Gathering the wrtiter metadata"); > sync->Wait(); > sync->Release(); > } > } > else > { > printf("GatherWriterMetadata Failed : Hex : %x, Decimal : > %d\n", hRet, hRet); > break; > } > printf("Gathered the wrtiter metadata"); > > And another question, Is VSS only the solution for developers for > taking backup and recovery for Windows Server 2008? Previous version > API's are not compatible with Windows Server 2008? > > _____ > Vishy
Recommended Posts