//FsctlSetEncryption //FsctlSetObjectId //FsctlSetObjectIdExtended //FsctlSetReparsePoint /// <summary><see cref="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364596(v=vs.85).aspx"/></summary> public void FileSystemSetSparseFile(bool setSparse) { FILE_SET_SPARSE_BUFFER input = new FILE_SET_SPARSE_BUFFER(); input.SetSparse = setSparse; DeviceIoControlHelper.InvokeIoControl(Handle, IOControlCode.FsctlSetSparse, input); }
private static extern Boolean DeviceIoControl( IntPtr hDevice, UInt32 dwIoControlCode, ref FILE_SET_SPARSE_BUFFER lpInBuffer, UInt32 nInBufferSize, IntPtr lpOutBuffer, UInt32 nOutBufferSize, out UInt32 lpBytesReturned, IntPtr Overlapped);