From: David F. on
Hi,

Trying some basic VSS stuff from VS 2008 Studio and it doesn't seem to want
to work on this Vista x32 Ultimate machine, yet I can run the backup tool in
Vista and says it's creating a volume shadow copy just fine. Here's the
basic part of the program:

-------------
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);

IVssBackupComponents *pBackup = NULL;
HRESULT result = CreateVssBackupComponents(&pBackup);
if (result == S_OK) {
result = pBackup->InitializeForBackup();
// ^^^^ This fails
}

------------

Looking in the event view as to why it failed it shows two items:

Item 1:

Volume Shadow Copy Service error: Unexpected error calling routine
CoCreateInstance. hr = 0x800401f0.

Operation:
Initialize For Backup


Item 2:

Volume Shadow Copy Service information: The COM Server with CLSID
{f5078f32-c551-11d3-89b9-0000f81fe221} and name MSXML30 cannot be started.
[0x800401f0]

Operation:
Initialize For Backup

------------

So now I search the internet and a couple things (most have to do with
sharepoints use of VSS). One is to manually start the Volume Shadow Copy,
COM+ System Application, and the "Distribute Transaction Coordinator". So I
do that, but still having problems so stop them like they were before (even
when the MS backup seemed to work). Found a MSFT message to do this:

Net stop vss
Net stop swprv
cd C:\windows\system32\
regsvr32 ole32.dll
regsvr32 vss_ps.dll
Vssvc /Register
regsvr32 /i swprv.dll
regsvr32 /i eventcls.dll
regsvr32 es.dll
regsvr32 stdprov.dll
regsvr32 vssui.dll
regsvr32 msxml.dll
regsvr32 msxml3.dll
regsvr32 msxml4.dll


So I do this (from command prompt started as administrator) and this is what
I get:

C:\Windows\system32>regsvr32 ole32.dll
The module "ole32.dll" was loaded but the call to DllRegisterServer failed
with error code 0x80070005.

C:\Windows\system32>regsvr32 vss_ps.dll
DllRegisterServer in vss_ps.dll succeeded.

C:\Windows\system32>Vssvc /Register

C:\Windows\system32>regsvr32 /i swprv.dll
DllRegisterServer and DllInstall in swprv.dll succeeded.

C:\Windows\system32>regsvr32 /i eventcls.dll
The module "eventcls.dll" was loaded but the call to DllInstall failed with
error code 0x8000ffff.

C:\Windows\system32>regsvr32 es.dll
The module "es.dll" was loaded but the entry-point DllRegisterServer was not
found.

Make sure that "es.dll" is a valid DLL or OCX file and then try again.

C:\Windows\system32>regsvr32 stdprov.dll
DllRegisterServer in stdprov.dll succeeded.

C:\Windows\system32>regsvr32 vssui.dll
The module "vssui.dll" failed to load.

Make sure the binary is stored at the specified path or debug it to check
for problems with the binary or dependent .DLL files.

The specified module could not be found.

C:\Windows\system32>regsvr32 msxml.dll
The module "msxml.dll" failed to load.

Make sure the binary is stored at the specified path or debug it to check
for problems with the binary or dependent .DLL files.

The specified module could not be found.

C:\Windows\system32>regsvr32 msxml3.dll
DllRegisterServer in msxml3.dll succeeded.

C:\Windows\system32>regsvr32 msxml4.dll
DllRegisterServer in msxml4.dll succeeded.


So -- Anyone know what the heck is going on??

TIA!!

From: nick on
Hi

Where do you cocreate the MSXML object? The error is saying that you did no
CoInitialize the thread that cocreate the msxml object. You code snippet
creates vss backup component (CreateVssBackupComponents). It's not related
to MSXML.


"David F." <df2705(a)community.nospam> wrote in message
news:797AEB46-FB22-42EE-8225-F2E10FAD97F3(a)microsoft.com...
> Hi,
>
> Trying some basic VSS stuff from VS 2008 Studio and it doesn't seem to
> want to work on this Vista x32 Ultimate machine, yet I can run the backup
> tool in Vista and says it's creating a volume shadow copy just fine.
> Here's the basic part of the program:
>
> -------------
> CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
>
> IVssBackupComponents *pBackup = NULL;
> HRESULT result = CreateVssBackupComponents(&pBackup);
> if (result == S_OK) {
> result = pBackup->InitializeForBackup();
> // ^^^^ This fails
> }
>
> ------------
>
> Looking in the event view as to why it failed it shows two items:
>
> Item 1:
>
> Volume Shadow Copy Service error: Unexpected error calling routine
> CoCreateInstance. hr = 0x800401f0.
>
> Operation:
> Initialize For Backup
>
>
> Item 2:
>
> Volume Shadow Copy Service information: The COM Server with CLSID
> {f5078f32-c551-11d3-89b9-0000f81fe221} and name MSXML30 cannot be started.
> [0x800401f0]
>
> Operation:
> Initialize For Backup
>
> ------------
>
> So now I search the internet and a couple things (most have to do with
> sharepoints use of VSS). One is to manually start the Volume Shadow Copy,
> COM+ System Application, and the "Distribute Transaction Coordinator". So
> I do that, but still having problems so stop them like they were before
> (even when the MS backup seemed to work). Found a MSFT message to do
> this:
>
> Net stop vss
> Net stop swprv
> cd C:\windows\system32\
> regsvr32 ole32.dll
> regsvr32 vss_ps.dll
> Vssvc /Register
> regsvr32 /i swprv.dll
> regsvr32 /i eventcls.dll
> regsvr32 es.dll
> regsvr32 stdprov.dll
> regsvr32 vssui.dll
> regsvr32 msxml.dll
> regsvr32 msxml3.dll
> regsvr32 msxml4.dll
>
>
> So I do this (from command prompt started as administrator) and this is
> what I get:
>
> C:\Windows\system32>regsvr32 ole32.dll
> The module "ole32.dll" was loaded but the call to DllRegisterServer failed
> with error code 0x80070005.
>
> C:\Windows\system32>regsvr32 vss_ps.dll
> DllRegisterServer in vss_ps.dll succeeded.
>
> C:\Windows\system32>Vssvc /Register
>
> C:\Windows\system32>regsvr32 /i swprv.dll
> DllRegisterServer and DllInstall in swprv.dll succeeded.
>
> C:\Windows\system32>regsvr32 /i eventcls.dll
> The module "eventcls.dll" was loaded but the call to DllInstall failed
> with error code 0x8000ffff.
>
> C:\Windows\system32>regsvr32 es.dll
> The module "es.dll" was loaded but the entry-point DllRegisterServer was
> not found.
>
> Make sure that "es.dll" is a valid DLL or OCX file and then try again.
>
> C:\Windows\system32>regsvr32 stdprov.dll
> DllRegisterServer in stdprov.dll succeeded.
>
> C:\Windows\system32>regsvr32 vssui.dll
> The module "vssui.dll" failed to load.
>
> Make sure the binary is stored at the specified path or debug it to check
> for problems with the binary or dependent .DLL files.
>
> The specified module could not be found.
>
> C:\Windows\system32>regsvr32 msxml.dll
> The module "msxml.dll" failed to load.
>
> Make sure the binary is stored at the specified path or debug it to check
> for problems with the binary or dependent .DLL files.
>
> The specified module could not be found.
>
> C:\Windows\system32>regsvr32 msxml3.dll
> DllRegisterServer in msxml3.dll succeeded.
>
> C:\Windows\system32>regsvr32 msxml4.dll
> DllRegisterServer in msxml4.dll succeeded.
>
>
> So -- Anyone know what the heck is going on??
>
> TIA!!
>

From: David F. on
Thanks Nick - that was it - it was in a different thread!

Now I wonder if the handle returned by VSS can be used in other threads that
don't CoInitialize? I'll find out.. Thanks again!


"nick" <nick.guz(a)nospam.com> wrote in message
news:elP0y$HsKHA.1352(a)TK2MSFTNGP06.phx.gbl...
> Hi
>
> Where do you cocreate the MSXML object? The error is saying that you did
> no CoInitialize the thread that cocreate the msxml object. You code
> snippet creates vss backup component (CreateVssBackupComponents). It's not
> related to MSXML.
>
>
> "David F." <df2705(a)community.nospam> wrote in message
> news:797AEB46-FB22-42EE-8225-F2E10FAD97F3(a)microsoft.com...
>> Hi,
>>
>> Trying some basic VSS stuff from VS 2008 Studio and it doesn't seem to
>> want to work on this Vista x32 Ultimate machine, yet I can run the backup
>> tool in Vista and says it's creating a volume shadow copy just fine.
>> Here's the basic part of the program:
>>
>> -------------
>> CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
>>
>> IVssBackupComponents *pBackup = NULL;
>> HRESULT result = CreateVssBackupComponents(&pBackup);
>> if (result == S_OK) {
>> result = pBackup->InitializeForBackup();
>> // ^^^^ This fails
>> }
>>
>> ------------
>>
>> Looking in the event view as to why it failed it shows two items:
>>
>> Item 1:
>>
>> Volume Shadow Copy Service error: Unexpected error calling routine
>> CoCreateInstance. hr = 0x800401f0.
>>
>> Operation:
>> Initialize For Backup
>>
>>
>> Item 2:
>>
>> Volume Shadow Copy Service information: The COM Server with CLSID
>> {f5078f32-c551-11d3-89b9-0000f81fe221} and name MSXML30 cannot be
>> started. [0x800401f0]
>>
>> Operation:
>> Initialize For Backup
>>
>> ------------
>>
>> So now I search the internet and a couple things (most have to do with
>> sharepoints use of VSS). One is to manually start the Volume Shadow
>> Copy, COM+ System Application, and the "Distribute Transaction
>> Coordinator". So I do that, but still having problems so stop them like
>> they were before (even when the MS backup seemed to work). Found a MSFT
>> message to do this:
>>
>> Net stop vss
>> Net stop swprv
>> cd C:\windows\system32\
>> regsvr32 ole32.dll
>> regsvr32 vss_ps.dll
>> Vssvc /Register
>> regsvr32 /i swprv.dll
>> regsvr32 /i eventcls.dll
>> regsvr32 es.dll
>> regsvr32 stdprov.dll
>> regsvr32 vssui.dll
>> regsvr32 msxml.dll
>> regsvr32 msxml3.dll
>> regsvr32 msxml4.dll
>>
>>
>> So I do this (from command prompt started as administrator) and this is
>> what I get:
>>
>> C:\Windows\system32>regsvr32 ole32.dll
>> The module "ole32.dll" was loaded but the call to DllRegisterServer
>> failed with error code 0x80070005.
>>
>> C:\Windows\system32>regsvr32 vss_ps.dll
>> DllRegisterServer in vss_ps.dll succeeded.
>>
>> C:\Windows\system32>Vssvc /Register
>>
>> C:\Windows\system32>regsvr32 /i swprv.dll
>> DllRegisterServer and DllInstall in swprv.dll succeeded.
>>
>> C:\Windows\system32>regsvr32 /i eventcls.dll
>> The module "eventcls.dll" was loaded but the call to DllInstall failed
>> with error code 0x8000ffff.
>>
>> C:\Windows\system32>regsvr32 es.dll
>> The module "es.dll" was loaded but the entry-point DllRegisterServer was
>> not found.
>>
>> Make sure that "es.dll" is a valid DLL or OCX file and then try again.
>>
>> C:\Windows\system32>regsvr32 stdprov.dll
>> DllRegisterServer in stdprov.dll succeeded.
>>
>> C:\Windows\system32>regsvr32 vssui.dll
>> The module "vssui.dll" failed to load.
>>
>> Make sure the binary is stored at the specified path or debug it to check
>> for problems with the binary or dependent .DLL files.
>>
>> The specified module could not be found.
>>
>> C:\Windows\system32>regsvr32 msxml.dll
>> The module "msxml.dll" failed to load.
>>
>> Make sure the binary is stored at the specified path or debug it to check
>> for problems with the binary or dependent .DLL files.
>>
>> The specified module could not be found.
>>
>> C:\Windows\system32>regsvr32 msxml3.dll
>> DllRegisterServer in msxml3.dll succeeded.
>>
>> C:\Windows\system32>regsvr32 msxml4.dll
>> DllRegisterServer in msxml4.dll succeeded.
>>
>>
>> So -- Anyone know what the heck is going on??
>>
>> TIA!!
>>
>
>