42 references to Kernel32
System.IO.FileSystem.AccessControl (42)
_generated\0\LibraryImports.g.cs (16)
7private 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) 44static 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); 79private 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) 90fixed (global::Interop.Kernel32.WIN32_FIND_DATA* __lpFindFileData_native = &lpFindFileData) 117static 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); 149private static partial bool GetFileAttributesExPrivate(string name, global::Interop.Kernel32.GET_FILEEX_INFO_LEVELS fileInfoLevel, ref global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA lpFileInformation) 155fixed (global::Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA* __lpFileInformation_native = &lpFileInformation) 169static 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); 260private static unsafe partial bool CreateDirectoryPrivate(string path, global::Interop.Kernel32.SECURITY_ATTRIBUTES* lpSecurityAttributes) 279static 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)
15return Interop.Kernel32.FindClose(handle);
src\runtime\src\libraries\Common\src\System\IO\FileSystem.Attributes.Windows.cs (9)
23Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data = default; 29((data.dwFileAttributes & Interop.Kernel32.FileAttributes.FILE_ATTRIBUTE_DIRECTORY) != 0); 34Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data = default; 40((data.dwFileAttributes & Interop.Kernel32.FileAttributes.FILE_ATTRIBUTE_DIRECTORY) == 0); 50internal static int FillAttributeInfo(string? path, ref Interop.Kernel32.WIN32_FILE_ATTRIBUTE_DATA data, bool returnErrorOnNotFound) 59if (!Interop.Kernel32.GetFileAttributesEx(path, Interop.Kernel32.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, ref data)) 82Interop.Kernel32.WIN32_FIND_DATA findData = default; 83using (SafeFindHandle handle = Interop.Kernel32.FindFirstFile(path!, ref findData))
src\runtime\src\libraries\Common\src\System\IO\FileSystem.DirectoryCreation.Windows.cs (3)
80Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs = Interop.Kernel32.SECURITY_ATTRIBUTES.Create(pSecurityDescriptor); 87r = Interop.Kernel32.CreateDirectory(name, &secAttrs);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DisableMediaInsertionPrompt.cs (3)
24prompt._disableSuccess = Interop.Kernel32.SetThreadErrorMode(Interop.Kernel32.SEM_FAILCRITICALERRORS, out prompt._oldMode); 31Interop.Kernel32.SetThreadErrorMode(_oldMode, out _);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PathHelper.Windows.cs (2)
78while ((result = Interop.Kernel32.GetFullPathNameW(ref MemoryMarshal.GetReference(path), (uint)builder.Capacity, ref builder.GetPinnableReference(), IntPtr.Zero)) > builder.Capacity) 181uint 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) 268int flagsAndAttributes = (int)options | Interop.Kernel32.SecurityOptions.SECURITY_SQOS_PRESENT | Interop.Kernel32.SecurityOptions.SECURITY_ANONYMOUS; 272Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs = Interop.Kernel32.SECURITY_ATTRIBUTES.Create((share & FileShare.Inheritable) != 0); 289static SafeFileHandle CreateFileHandleInternal(string fullPath, FileMode mode, FileSystemRights rights, FileShare share, int flagsAndAttributes, Interop.Kernel32.SECURITY_ATTRIBUTES* secAttrs) 296handle = Interop.Kernel32.CreateFile(fullPath, (int)rights, (share & ~FileShare.Inheritable), secAttrs, mode, flagsAndAttributes, IntPtr.Zero);