Exemple #1
0
        private void ChangePicturesSaveLocation(SaveLocation saveLocation)
        {
            this.CheckDisposed();

            this.EnsureOpenSession();

            Util.Assert(Edsdk.EdsSetPropertyData(this.Handle, Edsdk.PropID_SaveTo, 0, Marshal.SizeOf(typeof(int)),
                                                 (int)saveLocation), "Failed to set SaveTo location.");

            if (!this.IsLegacy)
            {
                this.LockAndExceute(() =>
                {
                    var capacity = new Edsdk.EdsCapacity {
                        NumberOfFreeClusters = 0x7FFFFFFF, BytesPerSector = 0x1000, Reset = 1
                    };
                    Util.Assert(Edsdk.EdsSetCapacity(this.Handle, capacity), "Failed to set capacity.");
                });
            }
        }