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); }
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; }