MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / CreateFile

Method CreateFile

loader/Main/Symlink.cs:66–74  ·  view source on GitHub ↗
(
                [MarshalAs(UnmanagedType.LPWStr)] string filename,
                [MarshalAs(UnmanagedType.U4)] uint access,
                [MarshalAs(UnmanagedType.U4)] FileShare share,
         

Source from the content-addressed store, hash-verified

64 private static extern bool CloseHandle(IntPtr hObject);
65
66 [DllImport("kernel32.dll", EntryPoint = "CreateFileW", CharSet = CharSet.Unicode)]
67 private static extern IntPtr CreateFile(
68 [MarshalAs(UnmanagedType.LPWStr)] string filename,
69 [MarshalAs(UnmanagedType.U4)] uint access,
70 [MarshalAs(UnmanagedType.U4)] FileShare share,
71 IntPtr securityAttributes, // optional SECURITY_ATTRIBUTES struct or IntPtr.Zero
72 [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
73 [MarshalAs(UnmanagedType.U4)] uint flagsAndAttributes,
74 IntPtr templateFile);
75
76 [DllImport("kernel32.dll", EntryPoint = "CreateSymbolicLinkW", CharSet = CharSet.Unicode)]
77 [return: MarshalAs(UnmanagedType.Bool)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected