private static VssSnapshotProperties GetSnapshotProperties(IVssBackupComponents backupComponents, Guid snapshotId)
        {
            VssSnapshotProperties props = new VssSnapshotProperties();

            IntPtr buffer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VssSnapshotProperties)));

            backupComponents.GetSnapshotProperties(snapshotId, buffer);

            Marshal.PtrToStructure(buffer, props);

            NativeMethods.VssFreeSnapshotProperties(buffer);
            return(props);
        }
Example #2
0
        private static VssSnapshotProperties GetSnapshotProperties(IVssBackupComponents backupComponents, Guid snapshotId)
        {
            VssSnapshotProperties props = new VssSnapshotProperties();

            IntPtr buffer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VssSnapshotProperties)));

            backupComponents.GetSnapshotProperties(snapshotId, buffer);

            Marshal.PtrToStructure(buffer, props);

            NativeMethods.VssFreeSnapshotProperties(buffer);
            return props;
        }