Export (0) Print
Expand All

CVssWriterEx2::GetSessionId method

Returns the writer's session identifier.

Syntax


HRESULT GetSessionId(
  [out]  VSS_ID *idSession
);

Parameters

idSession [out]

A pointer to a variable that receives the session identifier.

Return value

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

Remarks

The session identifier is an opaque value that uniquely identifies a backup or restore session. It is used to distinguish the current session among multiple parallel backup or restore sessions.

As a best practice, writers and requesters should include the session ID in all diagnostics messages used for event logging and tracing.

If a writer's event handler (such as CVssWriter::OnFreeze) calls this method, it must do so in the same thread that called the event handler. For more information, see Writer Event Handling.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

VsWriter.h (include Vss.h or VsWriter.h)

Library

VssApi.lib

See also

CVssWriterEx2
IVssBackupComponentsEx3::GetSessionId

 

 

Community Additions

ADD
Show:
© 2014 Microsoft