mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
update cswin32
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<CompanyName>ppc</CompanyName>
|
||||
<AssemblyName>amnet</AssemblyName>
|
||||
<AssemblyTitle>AMNet Server</AssemblyTitle>
|
||||
<Copyright>Copyright 2024 (c) ppc</Copyright>
|
||||
<Copyright>Copyright (c) 2024-25 ppc</Copyright>
|
||||
<Description>Server component for the AMNet IC Card switcher</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -50,8 +50,15 @@ internal static class Config
|
||||
// +1 for null terminator
|
||||
var buffer = stackalloc char[(int)maxLength + 1];
|
||||
var bufferStr = new PWSTR(buffer);
|
||||
|
||||
fixed (char* pSection = section)
|
||||
fixed (char* pKey = key)
|
||||
fixed (char* pDefault = @default ?? string.Empty)
|
||||
fixed (char* pDefaultPath = ConfigFilePath)
|
||||
{
|
||||
PInvoke.GetPrivateProfileString(new PCWSTR(pSection), new PCWSTR(pKey), new PCWSTR(pDefault), bufferStr, maxLength + 1, new PCWSTR(pDefaultPath));
|
||||
}
|
||||
|
||||
PInvoke.GetPrivateProfileString(section, key, @default ?? string.Empty, bufferStr, maxLength + 1, ConfigFilePath);
|
||||
return bufferStr.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user