2 * win32_vss.h - Declarations for managing VSS snapshots. This header should
3 * only be included by Windows-specific files.
6 #ifndef _WIMLIB_WIN32_VSS_H
7 #define _WIMLIB_WIN32_VSS_H
9 #include "wimlib/win32_common.h"
11 /* A reference counter for a VSS snapshot. This is embedded in another data
12 * structure only visible to win32_vss.c. */
18 vss_delete_snapshot(struct vss_snapshot *snapshot);
20 /* Acquire a reference to the specified VSS snapshot. */
21 static inline struct vss_snapshot *
22 vss_get_snapshot(struct vss_snapshot *snapshot)
29 /* Release a reference to the specified VSS snapshot. When the last reference
30 * is released, the snapshot is deleted. */
32 vss_put_snapshot(struct vss_snapshot *snapshot)
34 if (snapshot && --snapshot->refcnt == 0)
35 vss_delete_snapshot(snapshot);
39 vss_create_snapshot(const wchar_t *source, UNICODE_STRING *vss_path_ret,
40 struct vss_snapshot **snapshot_ret);
43 vss_global_cleanup(void);
45 #endif /* _WIMLIB_WIN32_VSS_H */