42 references to Kernel32
System.IO.FileSystem.AccessControl (42)
_generated\0\LibraryImports.g.cs (16)
7
private static unsafe partial global::Microsoft.Win32.SafeHandles.SafeFileHandle CreateFilePrivate(string lpFileName, int dwDesiredAccess, global::System.IO.FileShare dwShareMode, global::Interop.
Kernel32
.SECURITY_ATTRIBUTES* lpSecurityAttributes, global::System.IO.FileMode dwCreationDisposition, int dwFlagsAndAttributes, nint hTemplateFile)
44
static extern unsafe nint __PInvoke(ushort* __lpFileName_native, int __dwDesiredAccess_native, global::System.IO.FileShare __dwShareMode_native, global::Interop.
Kernel32
.SECURITY_ATTRIBUTES* __lpSecurityAttributes_native, global::System.IO.FileMode __dwCreationDisposition_native, int __dwFlagsAndAttributes_native, nint __hTemplateFile_native);
79
private static partial global::Microsoft.Win32.SafeHandles.SafeFindHandle FindFirstFileExPrivate(string lpFileName, global::Interop.
Kernel32
.FINDEX_INFO_LEVELS fInfoLevelId, ref global::Interop.
Kernel32
.WIN32_FIND_DATA lpFindFileData, global::Interop.
Kernel32
.FINDEX_SEARCH_OPS fSearchOp, nint lpSearchFilter, int dwAdditionalFlags)
90
fixed (global::Interop.
Kernel32
.WIN32_FIND_DATA* __lpFindFileData_native = &lpFindFileData)
117
static extern unsafe nint __PInvoke(ushort* __lpFileName_native, global::Interop.
Kernel32
.FINDEX_INFO_LEVELS __fInfoLevelId_native, global::Interop.
Kernel32
.WIN32_FIND_DATA* __lpFindFileData_native, global::Interop.
Kernel32
.FINDEX_SEARCH_OPS __fSearchOp_native, nint __lpSearchFilter_native, int __dwAdditionalFlags_native);
149
private static partial bool GetFileAttributesExPrivate(string name, global::Interop.
Kernel32
.GET_FILEEX_INFO_LEVELS fileInfoLevel, ref global::Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA lpFileInformation)
155
fixed (global::Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA* __lpFileInformation_native = &lpFileInformation)
169
static extern unsafe int __PInvoke(ushort* __name_native, global::Interop.
Kernel32
.GET_FILEEX_INFO_LEVELS __fileInfoLevel_native, global::Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA* __lpFileInformation_native);
260
private static unsafe partial bool CreateDirectoryPrivate(string path, global::Interop.
Kernel32
.SECURITY_ATTRIBUTES* lpSecurityAttributes)
279
static extern unsafe int __PInvoke(ushort* __path_native, global::Interop.
Kernel32
.SECURITY_ATTRIBUTES* __lpSecurityAttributes_native);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeFindHandle.Windows.cs (1)
15
return Interop.
Kernel32
.FindClose(handle);
src\runtime\src\libraries\Common\src\System\IO\FileSystem.Attributes.Windows.cs (9)
23
Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA data = default;
29
((data.dwFileAttributes & Interop.
Kernel32
.FileAttributes.FILE_ATTRIBUTE_DIRECTORY) != 0);
34
Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA data = default;
40
((data.dwFileAttributes & Interop.
Kernel32
.FileAttributes.FILE_ATTRIBUTE_DIRECTORY) == 0);
50
internal static int FillAttributeInfo(string? path, ref Interop.
Kernel32
.WIN32_FILE_ATTRIBUTE_DATA data, bool returnErrorOnNotFound)
59
if (!Interop.
Kernel32
.GetFileAttributesEx(path, Interop.
Kernel32
.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, ref data))
82
Interop.
Kernel32
.WIN32_FIND_DATA findData = default;
83
using (SafeFindHandle handle = Interop.
Kernel32
.FindFirstFile(path!, ref findData))
src\runtime\src\libraries\Common\src\System\IO\FileSystem.DirectoryCreation.Windows.cs (3)
80
Interop.
Kernel32
.SECURITY_ATTRIBUTES secAttrs = Interop.
Kernel32
.SECURITY_ATTRIBUTES.Create(pSecurityDescriptor);
87
r = Interop.
Kernel32
.CreateDirectory(name, &secAttrs);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DisableMediaInsertionPrompt.cs (3)
24
prompt._disableSuccess = Interop.
Kernel32
.SetThreadErrorMode(Interop.
Kernel32
.SEM_FAILCRITICALERRORS, out prompt._oldMode);
31
Interop.
Kernel32
.SetThreadErrorMode(_oldMode, out _);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PathHelper.Windows.cs (2)
78
while ((result = Interop.
Kernel32
.GetFullPathNameW(ref MemoryMarshal.GetReference(path), (uint)builder.Capacity, ref builder.GetPinnableReference(), IntPtr.Zero)) > builder.Capacity)
181
uint result = Interop.
Kernel32
.GetLongPathNameW(
System\IO\FileSystemAclExtensions.cs (8)
233
((int)rights & Interop.
Kernel32
.GenericOperations.GENERIC_READ) != 0)
245
((int)rights & Interop.
Kernel32
.GenericOperations.GENERIC_WRITE) != 0)
268
int flagsAndAttributes = (int)options | Interop.
Kernel32
.SecurityOptions.SECURITY_SQOS_PRESENT | Interop.
Kernel32
.SecurityOptions.SECURITY_ANONYMOUS;
272
Interop.
Kernel32
.SECURITY_ATTRIBUTES secAttrs = Interop.
Kernel32
.SECURITY_ATTRIBUTES.Create((share & FileShare.Inheritable) != 0);
289
static SafeFileHandle CreateFileHandleInternal(string fullPath, FileMode mode, FileSystemRights rights, FileShare share, int flagsAndAttributes, Interop.
Kernel32
.SECURITY_ATTRIBUTES* secAttrs)
296
handle = Interop.
Kernel32
.CreateFile(fullPath, (int)rights, (share & ~FileShare.Inheritable), secAttrs, mode, flagsAndAttributes, IntPtr.Zero);