|
22 | 22 | * private static extern SafeFileHandle CreateFile(...);
|
23 | 23 | *
|
24 | 24 | * [DllImport(Interop.Libraries.Kernel32, SetLastError=true)]
|
25 |
| - * unsafe internal static extern int ReadFile(SafeFileHandle handle, ...); |
| 25 | + * internal unsafe static extern int ReadFile(SafeFileHandle handle, ...); |
26 | 26 | *
|
27 | 27 | * [DllImport(Interop.Libraries.Kernel32, SetLastError=true)]
|
28 | 28 | * internal static extern bool CloseHandle(IntPtr handle);
|
@@ -264,16 +264,16 @@ internal static bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX buffer)
|
264 | 264 | private static extern bool GlobalMemoryStatusExNative([In, Out] ref MEMORYSTATUSEX buffer);
|
265 | 265 |
|
266 | 266 | [DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
|
267 |
| - unsafe internal static extern UIntPtr VirtualQuery(void* address, ref MEMORY_BASIC_INFORMATION buffer, UIntPtr sizeOfBuffer); |
| 267 | + internal unsafe static extern UIntPtr VirtualQuery(void* address, ref MEMORY_BASIC_INFORMATION buffer, UIntPtr sizeOfBuffer); |
268 | 268 |
|
269 | 269 | // VirtualAlloc should generally be avoided, but is needed in
|
270 | 270 | // the MemoryFailPoint implementation (within a CER) to increase the
|
271 | 271 | // size of the page file, ignoring any host memory allocators.
|
272 | 272 | [DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
|
273 |
| - unsafe internal static extern void* VirtualAlloc(void* address, UIntPtr numBytes, int commitOrReserve, int pageProtectionMode); |
| 273 | + internal unsafe static extern void* VirtualAlloc(void* address, UIntPtr numBytes, int commitOrReserve, int pageProtectionMode); |
274 | 274 |
|
275 | 275 | [DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
|
276 |
| - unsafe internal static extern bool VirtualFree(void* address, UIntPtr numBytes, int pageFreeMode); |
| 276 | + internal unsafe static extern bool VirtualFree(void* address, UIntPtr numBytes, int pageFreeMode); |
277 | 277 |
|
278 | 278 | [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Ansi, ExactSpelling = true, EntryPoint = "lstrlenA")]
|
279 | 279 | internal static extern int lstrlenA(IntPtr ptr);
|
@@ -324,7 +324,7 @@ internal static bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX buffer)
|
324 | 324 | internal static extern bool CloseHandle(IntPtr handle);
|
325 | 325 |
|
326 | 326 | [DllImport(Interop.Libraries.Kernel32, SetLastError = true)]
|
327 |
| - internal static unsafe extern int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr mustBeZero); |
| 327 | + internal static extern unsafe int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr mustBeZero); |
328 | 328 |
|
329 | 329 | [DllImport(Interop.Libraries.Kernel32, SetLastError = true, CharSet = CharSet.Auto, BestFitMapping = false)]
|
330 | 330 | internal static extern SafeWaitHandle CreateSemaphoreEx(SECURITY_ATTRIBUTES lpSecurityAttributes, int initialCount, int maximumCount, string name, uint flags, uint desiredAccess);
|
@@ -371,10 +371,10 @@ internal static unsafe int GetEnvironmentVariable(string lpName, Span<char> lpVa
|
371 | 371 | }
|
372 | 372 |
|
373 | 373 | [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Unicode)]
|
374 |
| - internal static unsafe extern char* GetEnvironmentStrings(); |
| 374 | + internal static extern unsafe char* GetEnvironmentStrings(); |
375 | 375 |
|
376 | 376 | [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Unicode)]
|
377 |
| - internal static unsafe extern bool FreeEnvironmentStrings(char* pStrings); |
| 377 | + internal static extern unsafe bool FreeEnvironmentStrings(char* pStrings); |
378 | 378 |
|
379 | 379 | [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Auto, SetLastError = true)]
|
380 | 380 | internal static extern uint GetCurrentProcessId();
|
|
0 commit comments