Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VSS SDK writer impossible to compile

31 views
Skip to first unread message

Mark S. Edwards

unread,
Feb 23, 2007, 8:16:47 AM2/23/07
to
I hope I'm in about the most appropriate group for this.

I need to create a simple VSS Writer for Windows 2003. For this I have the
VSS SDK Version 7.2 which seems to be the correct download from MSDN
downloads. I am using the Platform SDK for Win2K3 R2 and compliling with
nmake within a command window for Win2K3 32-bit debug.

The state of the TESTAPPS directory is awful, nothing actually compiles out
the box, especially the TestWriter sample which doesn't have a makefile or a
sources file with it.

Despite that, as a reference I actually looked at the TestWriter sample in
the Vista SDK which includes it under the WinBase samples. Yes, I know
things have changed a bit, so I have been very careful to only edit the
sample from the 7.2 SDK down to the bare bones.

Having done this and pointed my makefile at the correct SDK include and lib
paths I find that there are mismatches between the definition of the
CVssWriter class in the header file and what is in the library.

The link complains of 3 unresolved externals. Two are easy to fix because
they are place holder functions not actually implemented yet
(OnContinueIOOnVolume and OnBackOffIOOnVolume). The third is rather more of
a showstopper, apparently there is a mismatch between the
CVssWriter::Initialize() as declared in inc\win2003\vswriter.h and what is
in the library lib\win2003\obj\i396\vssapi.lib.

Can someone tell me if there is a newer release that 7.2 of the VSS SDK that
actually compiles ? Or what do I have to do to get this thing to compile ?
I can happily compile the testwriter sample from the Vista platform SDK, but
of course that will not load on Win2K3.

This was supposed to be the easy part of the project, now I've wasted
several days because no one bothered to check if the samples even compiled.
let alone worked before releasing this SDK. What's even more peturbing is
that the 7.2 SDK is atleast 2 years old - I pulled down a fresh copy today
and it was identical to the one I last pulled down 12th Feb, 2005 - so has
no-one else tried to create a VSS writer in all that time with this SDK ?

Any answer that solves the problem will be appreciated.

Thanks,

Mark.

Mark S. Edwards

unread,
Feb 26, 2007, 5:58:13 AM2/26/07
to
I've found where the mismatch is, but I could still do with some help in
actually getting it working.

If you look at the Linker message where it outputs the unresolved external
function, the important part is this bit;

Initialize@CVssWriter@@QAGJU_GUID@@PB_WW4VSS_USAGE_TYPE

Whereas, if I disassemble vssapi.dll on Win2K3, the same portion looks as
follows:

Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE


So it looks to be something related to a change in the usage of definition
of the VSS_USAGE_TYPE parameter.

Can anyone tell me what I might do to fix this ?

Thanks,

Mark.


"Mark S. Edwards" <MarkSE...@xommunity.nospam> wrote in message
news:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...

Mark S. Edwards

unread,
Feb 26, 2007, 5:03:54 PM2/26/07
to
OK, I guess I've sort of solved it at last. For the record in case others
have the same problem of a useless SDK, here is a solution that works.

In the end, it seems to be a compiler issue, the C/C++ compiler in VStudio
2005 create a different decorated name for CVssWriter:Initialize than is in
the LIB file.

After some messing about, I created a SOURCES file and compiled it with DDK
6000 as a Win2K3 console application. In this case, the compiler creates
the write decorated name to match the $(SDK_LIB_PATH)\vssapi.lib.

This is a real mess. I do hope that the next Platform SDK will include the
VSS samples and be able to compile them properly with VStudio 2005.

Mark.

"Mark S. Edwards" <MarkSE...@xommunity.nospam> wrote in message
news:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...

kom...@gmail.com

unread,
Apr 4, 2007, 7:14:36 PM4/4/07
to
I had similar problems and the fix is basically compiling with the
following option:

/Zc:wchar_t-

You can also set this in VS2005 by Project->properties->c/c++-
>language->Use wchar as built in type
to No (/Zc:wchar_t-)

Hope this helps.

Thanks,
Komal

On Feb 26, 3:58 am, "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam>
wrote:


> I've found where the mismatch is, but I could still do with some help in
> actually getting it working.
>
> If you look at the Linker message where it outputs the unresolved external
> function, the important part is this bit;
>
> Initialize@CVssWriter@@QAGJU_GUID@@PB_WW4VSS_USAGE_TYPE
>
> Whereas, if I disassemble vssapi.dll on Win2K3, the same portion looks as
> follows:
>
> Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE
>
> So it looks to be something related to a change in the usage of definition
> of the VSS_USAGE_TYPE parameter.
>
> Can anyone tell me what I might do to fix this ?
>
> Thanks,
>
> Mark.
>

> "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam> wrote in messagenews:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...>I hope I'm in about the most appropriate group for this.

kom...@gmail.com

unread,
Apr 4, 2007, 7:15:19 PM4/4/07
to
I had similar problems and the fix is basically compiling with the
following option:

/Zc:wchar_t-

You can also set this in VS2005 by Project->properties->c/c++-
>language->Use wchar as built in type
to No (/Zc:wchar_t-)

Hope this helps.

Thanks,
Komal

On Feb 26, 3:03 pm, "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam>
wrote:


> OK, I guess I've sort of solved it at last. For the record in case others
> have the same problem of a useless SDK, here is a solution that works.
>
> In the end, it seems to be a compiler issue, the C/C++ compiler in VStudio
> 2005 create a different decorated name for CVssWriter:Initialize than is in
> the LIB file.
>
> After some messing about, I created a SOURCES file and compiled it with DDK
> 6000 as a Win2K3 console application. In this case, the compiler creates
> the write decorated name to match the $(SDK_LIB_PATH)\vssapi.lib.
>
> This is a real mess. I do hope that the next Platform SDK will include the
> VSS samples and be able to compile them properly with VStudio 2005.
>
> Mark.
>

> "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam> wrote in messagenews:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...

> > Mark.- Hide quoted text -
>
> - Show quoted text -


XiaoxuMa

unread,
May 2, 2007, 10:01:25 PM5/2/07
to
I am a new man who learnt the VSS a few days agao. I encounter the problems
that VSS SDK writer is impossible to compile. Could you tell me how to solve
them? Thank you very much.

yours sincerely

Xiaoxu MA

XiaoxuMa

unread,
May 2, 2007, 11:09:45 PM5/2/07
to
I have encountered the same problem.And I can solve it.Could you help me? My
email is sunri...@gmail.com.Thans very much.

andrehpoffo

unread,
Nov 23, 2009, 2:01:43 PM11/23/09
to
Komal, this will really be solved by changing just this treatment, this should be specified in the MSDN!

komal wrote:

I had similar problems and the fix is basically compiling with thefollowing

04-Apr-07

I had similar problems and the fix is basically compiling with the
following option:

/Zc:wchar_t-

You can also set this in VS2005 by Project->properties->c/c++-

to No (/Zc:wchar_t-)

Hope this helps.

Thanks,
Komal

On Feb 26, 3:58 am, "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam>
wrote:

Previous Posts In This Thread:

On Friday, February 23, 2007 8:16 AM
Mark S. Edwards wrote:

VSS SDK writer impossible to compile

Thanks,

Mark.

On Monday, February 26, 2007 5:58 AM
Mark S. Edwards wrote:

I've found where the mismatch is, but I could still do with some help in
I've found where the mismatch is, but I could still do with some help in
actually getting it working.

If you look at the Linker message where it outputs the unresolved external
function, the important part is this bit;

Initialize@CVssWriter@@QAGJU_GUID@@PB_WW4VSS_USAGE_TYPE

Whereas, if I disassemble vssapi.dll on Win2K3, the same portion looks as
follows:

Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE


So it looks to be something related to a change in the usage of definition
of the VSS_USAGE_TYPE parameter.

Can anyone tell me what I might do to fix this ?

Thanks,

Mark.


"Mark S. Edwards" <MarkSE...@xommunity.nospam> wrote in message
news:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...

On Monday, February 26, 2007 5:03 PM
Mark S. Edwards wrote:

OK, I guess I've sort of solved it at last.
OK, I guess I've sort of solved it at last. For the record in case others
have the same problem of a useless SDK, here is a solution that works.

In the end, it seems to be a compiler issue, the C/C++ compiler in VStudio
2005 create a different decorated name for CVssWriter:Initialize than is in
the LIB file.

After some messing about, I created a SOURCES file and compiled it with DDK
6000 as a Win2K3 console application. In this case, the compiler creates
the write decorated name to match the $(SDK_LIB_PATH)\vssapi.lib.

This is a real mess. I do hope that the next Platform SDK will include the
VSS samples and be able to compile them properly with VStudio 2005.

Mark.

"Mark S. Edwards" <MarkSE...@xommunity.nospam> wrote in message
news:%23%23$epz0VH...@TK2MSFTNGP04.phx.gbl...

On Wednesday, April 04, 2007 7:14 PM
komal wrote:

I had similar problems and the fix is basically compiling with thefollowing
I had similar problems and the fix is basically compiling with the
following option:

/Zc:wchar_t-

You can also set this in VS2005 by Project->properties->c/c++-

to No (/Zc:wchar_t-)

Hope this helps.

Thanks,
Komal

On Feb 26, 3:58 am, "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam>
wrote:

On Wednesday, April 04, 2007 7:15 PM
komal wrote:

I had similar problems and the fix is basically compiling with thefollowing
I had similar problems and the fix is basically compiling with the
following option:

/Zc:wchar_t-

You can also set this in VS2005 by Project->properties->c/c++-

to No (/Zc:wchar_t-)

Hope this helps.

Thanks,
Komal

On Feb 26, 3:03 pm, "Mark S. Edwards" <MarkSEdwa...@xommunity.nospam>
wrote:

On Wednesday, May 02, 2007 10:01 PM
XiaoxuMa wrote:

Re:VSS SDK writer impossible to compile

yours sincerely

Xiaoxu MA

On Wednesday, May 02, 2007 11:09 PM
XiaoxuMa wrote:

Re:VSS SDK writer impossible to compile


I have encountered the same problem.And I can solve it.Could you help me? My
email is sunri...@gmail.com.Thans very much.

EggHeadCafe - Software Developer Portal of Choice
Retrieve Hardware Identifiers in C# with WMI
http://www.eggheadcafe.com/tutorials/aspnet/bb5160bf-3459-4397-bc59-d32bb8a1550b/retrieve-hardware-identif.aspx

0 new messages