1
0
mirror of https://github.com/soarqin/DSP_Mods_TO.git synced 2025-12-12 01:23:31 +08:00
Files
DSP_Mods_TO/CompressSave/Wrapper/WinApi.cs
2024-12-01 15:32:20 +08:00

18 lines
639 B
C#

using System;
using System.Runtime.InteropServices;
namespace CompressSave.Wrapper;
public static class WinApi
{
// LoadLibrary, GetProcAddress, FreeLibrary
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern IntPtr LoadLibrary(string dllToLoad);
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi)]
public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool FreeLibrary(IntPtr hModule);
}