code style

This commit is contained in:
Lightczx
2024-06-05 16:15:46 +08:00
parent 32bdfe12af
commit 91c886befb
3 changed files with 24 additions and 24 deletions

View File

@@ -42,7 +42,7 @@ internal static class Kernel32
[DllImport("KERNEL32.dll", CallingConvention = CallingConvention.Winapi, ExactSpelling = true)]
public static extern BOOL FreeConsole();
[DllImport("KERNEL32.dll", CallingConvention = CallingConvention.Winapi, ExactSpelling = true, SetLastError = true)]
[DllImport("KERNEL32.dll", CallingConvention = CallingConvention.Winapi, ExactSpelling = true)]
[SupportedOSPlatform("windows5.1.2600")]
public static extern BOOL FreeLibrary(HMODULE hLibModule);

View File

@@ -1,23 +0,0 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
namespace Snap.Hutao.Win32.System.LibraryLoader;
[Flags]
internal enum LOAD_LIBRARY_FLAGS : uint
{
DONT_RESOLVE_DLL_REFERENCES = 1u,
LOAD_LIBRARY_AS_DATAFILE = 2u,
LOAD_WITH_ALTERED_SEARCH_PATH = 8u,
LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10u,
LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20u,
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40u,
LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80u,
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100u,
LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200u,
LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400u,
LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800u,
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000u,
LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x2000u,
LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x4000u
}

View File

@@ -0,0 +1,23 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
namespace Snap.Hutao.Win32.System.LibraryLoader;
[Flags]
internal enum LOAD_LIBRARY_FLAGS : uint
{
DONT_RESOLVE_DLL_REFERENCES = 1U,
LOAD_LIBRARY_AS_DATAFILE = 2U,
LOAD_WITH_ALTERED_SEARCH_PATH = 8U,
LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10U,
LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20U,
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40U,
LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80U,
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100U,
LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200U,
LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400U,
LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800U,
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000U,
LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x2000U,
LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x4000U,
}