mirror of
https://github.com/quasar/Quasar.git
synced 2026-10-22 00:15:56 +08:00
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace xServer.Core.Utilities
|
|
{
|
|
/// <summary>
|
|
/// Provides access to Win32 API and Microsoft C Runtime Library (msvcrt.dll).
|
|
/// </summary>
|
|
public static class NativeMethods
|
|
{
|
|
[DllImport("user32.dll")]
|
|
public static extern IntPtr SendMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
|
|
|
|
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
|
|
public extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);
|
|
|
|
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern unsafe int memcmp(byte* ptr1, byte* ptr2, uint count);
|
|
|
|
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern int memcmp(IntPtr ptr1, IntPtr ptr2, uint count);
|
|
|
|
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern int memcpy(IntPtr dst, IntPtr src, uint count);
|
|
|
|
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
public static extern unsafe int memcpy(void* dst, void* src, uint count);
|
|
}
|
|
}
|