mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-10-01 11:17:58 +03:00
update cswin32
This commit is contained in:
@@ -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