fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (45)
492path = UnsafeNativeMethods.SafeGetFullPathName(path);
617int nDesiredAccess = UnsafeNativeMethods.FILE_READ_ATTRIBUTES | UnsafeNativeMethods.SYNCHRONIZE;
627nDesiredAccess |= UnsafeNativeMethods.FILE_READ_DATA;
629dwCreateDisposition = (uint) UnsafeNativeMethods.CreationDisposition.FILE_OPEN;
633nDesiredAccess |= UnsafeNativeMethods.FILE_WRITE_DATA;
635dwCreateDisposition = (uint) UnsafeNativeMethods.CreationDisposition.FILE_OVERWRITE;
643nDesiredAccess |= UnsafeNativeMethods.FILE_READ_DATA | UnsafeNativeMethods.FILE_WRITE_DATA;
645dwCreateDisposition = (uint) UnsafeNativeMethods.CreationDisposition.FILE_OVERWRITE;
651dwCreateOptions |= (uint) UnsafeNativeMethods.CreateOption.FILE_WRITE_THROUGH;
656dwCreateOptions |= (uint) UnsafeNativeMethods.CreateOption.FILE_SYNCHRONOUS_IO_NONALERT;
661dwCreateOptions |= (uint) UnsafeNativeMethods.CreateOption.FILE_SEQUENTIAL_ONLY;
666dwCreateOptions |= (uint) UnsafeNativeMethods.CreateOption.FILE_RANDOM_ACCESS;
673qos = new SecurityQualityOfService(UnsafeNativeMethods.SecurityImpersonationLevel.SecurityAnonymous,
682UnsafeNativeMethods.OBJECT_ATTRIBUTES oa;
683oa.length = Marshal.SizeOf(typeof(UnsafeNativeMethods.OBJECT_ATTRIBUTES));
685oa.attributes = (int)UnsafeNativeMethods.Attributes.CaseInsensitive;
690UnsafeNativeMethods.IO_STATUS_BLOCK ioStatusBlock;
695UnsafeNativeMethods.SetErrorModeWrapper ( UnsafeNativeMethods.SEM_FAILCRITICALERRORS, out oldMode );
701retval = UnsafeNativeMethods.NtCreateFile(out hFile, nDesiredAccess,
708UnsafeNativeMethods.SetErrorModeWrapper( oldMode, out oldMode );
716case UnsafeNativeMethods.STATUS_SHARING_VIOLATION:
719case UnsafeNativeMethods.STATUS_INVALID_PARAMETER:
722case UnsafeNativeMethods.STATUS_OBJECT_NAME_NOT_FOUND:
730uint error = UnsafeNativeMethods.RtlNtStatusToDosError ( retval );
731if ( error == UnsafeNativeMethods.ERROR_MR_MID_NOT_FOUND )
745System.ComponentModel.Win32Exception e = new System.ComponentModel.Win32Exception ( UnsafeNativeMethods.ERROR_INVALID_HANDLE );
750UnsafeNativeMethods.FileType fileType = UnsafeNativeMethods.GetFileType(hFile);
751if (fileType != UnsafeNativeMethods.FileType.Disk)
762uint ioControlCode = UnsafeNativeMethods.CTL_CODE ( UnsafeNativeMethods.FILE_DEVICE_FILE_SYSTEM,
763IoControlCodeFunctionCode, (byte) UnsafeNativeMethods.Method.METHOD_BUFFERED,
764(byte) UnsafeNativeMethods.Access.FILE_ANY_ACCESS);
767if ( !UnsafeNativeMethods.DeviceIoControl ( hFile, ioControlCode, IntPtr.Zero, 0, IntPtr.Zero, 0, out cbBytesReturned, IntPtr.Zero ) )
883UnsafeNativeMethods.UNICODE_STRING objectName;
933UnsafeNativeMethods.SECURITY_QUALITY_OF_SERVICE m_qos;
938UnsafeNativeMethods.SecurityImpersonationLevel impersonationLevel,
959UnsafeNativeMethods.SecurityImpersonationLevel impersonationLevel,
964m_qos.length = (uint)Marshal.SizeOf(typeof(UnsafeNativeMethods.SECURITY_QUALITY_OF_SERVICE));
1040UnsafeNativeMethods.FILE_FULL_EA_INFORMATION eaBuffer;
1082System.Diagnostics.Debug.Assert(Marshal.OffsetOf(typeof(UnsafeNativeMethods.FILE_FULL_EA_INFORMATION), "EaName").ToInt64() <= (Int64) Int32.MaxValue);
1083int cbOffset = Marshal.OffsetOf(typeof(UnsafeNativeMethods.FILE_FULL_EA_INFORMATION), "EaName").ToInt32();