IVssExpressWriter::CreateMetadata method

Creates an express writer metadata object and returns an IVssCreateExpressWriterMetadata interface pointer to it.

Syntax

HRESULT CreateMetadata(
  VSS_ID                          writerId,
  LPCWSTR                         writerName,
  VSS_USAGE_TYPE                  usageType,
  DWORD                           versionMajor,
  DWORD                           versionMinor,
  DWORD                           reserved,
  IVssCreateExpressWriterMetadata **ppMetadata
);

Parameters

writerId

The globally unique identifier (GUID) of the writer class.

writerName

A null-terminated wide character string that contains the name of the writer class. This string is not localized.

usageType

A VSS_USAGE_TYPE enumeration value that indicates how the data that is managed by the writer is used on the host system. The only valid values for this parameter are VSS_UT_BOOTABLESYSTEMSTATE, VSS_UT_SYSTEMSERVICE, and VSS_UT_USERDATA.

versionMajor

The major version of the writer application. For more information, see the Remarks section.

versionMinor

The minor version of the writer application. For more information, see the Remarks section.

reserved

This parameter is reserved for system use.

ppMetadata

A pointer to a variable that receives an IVssCreateExpressWriterMetadata interface pointer to the newly created express writer metadata.

Return Value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The versionMajor and versionMajor parameters are used to specify the writer's major and minor version numbers according to the following VSS conventions:

  • A writer's minor version number should be incremented by one whenever a released version of the writer contains minor changes that affect the writer's interaction with requesters. For example, a correction to a file specification in a writer QFE or service pack would justify incrementing the minor version number. However, a change between beta or release candidate versions of a writer would not justify the changing of the minor version number.
  • A writer's major version number should be incremented by one whenever a released version of the writer contains a significant change. For example, if data that is backed up with a new version of a writer cannot be restored using the previous version of the writer, the new writer's major version number should be incremented.
  • Whenever the major version number is incremented, the minor version number should be reset to zero.
If a writer does not specify a version number, VSS will assign a default version number of 0.0.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header vswriter.h

See Also

CreateVssExpressWriter

IVssExpressWriter