{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, ExactSpelling = true)]
+ [GeneratedDllImport(Libraries.Kernel32, ExactSpelling = true)]
[SuppressGCTransition]
- public static extern int GetCurrentThreadId();
+ public static partial int GetCurrentThreadId();
}
}
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, EntryPoint = "GetModuleHandleW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern IntPtr GetModuleHandle(string? moduleName);
+ [GeneratedDllImport(Libraries.Kernel32, EntryPoint = "GetModuleHandleW", CharSet = CharSet.Unicode, SetLastError = true)]
+ internal static partial IntPtr GetModuleHandle(string? moduleName);
}
}
{
internal static partial class Kernel32
{
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Ansi, BestFitMapping = false)]
- public static extern IntPtr GetProcAddress(SafeLibraryHandle hModule, string lpProcName);
+ [GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Ansi)]
+ public static partial IntPtr GetProcAddress(SafeLibraryHandle hModule, string lpProcName);
- [DllImport(Libraries.Kernel32, CharSet = CharSet.Ansi, BestFitMapping = false)]
- public static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
+ [GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Ansi)]
+ public static partial IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
}
}
{
internal delegate bool ConsoleCtrlHandlerRoutine(int controlType);
- [DllImport(Libraries.Kernel32, SetLastError = true)]
- internal static extern bool SetConsoleCtrlHandler(ConsoleCtrlHandlerRoutine handler, bool addOrRemove);
+ [GeneratedDllImport(Libraries.Kernel32, SetLastError = true)]
+ internal static partial bool SetConsoleCtrlHandler(ConsoleCtrlHandlerRoutine handler, bool addOrRemove);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
- public static extern IntPtr CreateWindowExW(
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ public static partial IntPtr CreateWindowExW(
int exStyle,
string lpszClassName,
string lpszWindowName,
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr DefWindowProcW(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr DefWindowProcW(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern bool DestroyWindow(IntPtr hWnd);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial bool DestroyWindow(IntPtr hWnd);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern int DispatchMessageW([In] ref MSG msg);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial int DispatchMessageW(ref MSG msg);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet=CharSet.Auto, ExactSpelling = true)]
- public static extern IntPtr FindWindowW(string lpClassName, string lpWindowName);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr FindWindowW(string lpClassName, string lpWindowName);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern bool GetClassInfoW(IntPtr hInst, string lpszClass, ref WNDCLASS wc);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial bool GetClassInfoW(IntPtr hInst, string lpszClass, ref WNDCLASS wc);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- internal static extern IntPtr GetProcessWindowStation();
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ internal static partial IntPtr GetProcessWindowStation();
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern unsafe bool GetUserObjectInformationW(IntPtr hObj, int nIndex, void* pvBuffer, uint nLength, ref uint lpnLengthNeeded);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ public static unsafe partial bool GetUserObjectInformationW(IntPtr hObj, int nIndex, void* pvBuffer, uint nLength, ref uint lpnLengthNeeded);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern bool IsWindow(IntPtr hWnd);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial bool IsWindow(IntPtr hWnd);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern bool KillTimer(IntPtr hwnd, IntPtr idEvent);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial bool KillTimer(IntPtr hwnd, IntPtr idEvent);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern int MsgWaitForMultipleObjectsEx(int nCount, IntPtr pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial int MsgWaitForMultipleObjectsEx(int nCount, IntPtr pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern bool PeekMessageW([In, Out] ref MSG msg, IntPtr hwnd, int msgMin, int msgMax, int remove);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial bool PeekMessageW(ref MSG msg, IntPtr hwnd, int msgMin, int msgMax, int remove);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
- public static extern short RegisterClassW(ref WNDCLASS wc);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ public static partial short RegisterClassW(ref WNDCLASS wc);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern int RegisterWindowMessageW(string msg);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial int RegisterWindowMessageW(string msg);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr SendMessageW(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr SendMessageW(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
public static extern IntPtr SendMessageW(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam);
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr SetClassLongW(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr SetClassLongW(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr SetClassLongPtrW(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr SetClassLongPtrW(IntPtr hwnd, int nIndex, IntPtr dwNewLong);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern IntPtr SetTimer(IntPtr hWnd, IntPtr nIDEvent, int uElapse, IntPtr lpTimerProc);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial IntPtr SetTimer(IntPtr hWnd, IntPtr nIDEvent, int uElapse, IntPtr lpTimerProc);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr SetWindowLongW(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr SetWindowLongW(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
- public static extern IntPtr SetWindowLongPtrW(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true)]
+ public static partial IntPtr SetWindowLongPtrW(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, ExactSpelling = true)]
- public static extern bool TranslateMessage([In, Out] ref MSG msg);
+ [GeneratedDllImport(Libraries.User32, ExactSpelling = true)]
+ public static partial bool TranslateMessage(ref MSG msg);
}
}
{
internal static partial class User32
{
- [DllImport(Libraries.User32, CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
- public static extern short UnregisterClassW(string lpClassName, IntPtr hInstance);
+ [GeneratedDllImport(Libraries.User32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
+ public static partial short UnregisterClassW(string lpClassName, IntPtr hInstance);
}
}
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetFrameworkMinimum)</TargetFrameworks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"