1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

SendMessageTimeoutW result size fix, isExpanded for reg string GetValue

This commit is contained in:
Brian Fiete 2025-03-28 11:43:08 -04:00
parent 5c11c2271e
commit 46db1b61d4

View file

@ -369,11 +369,15 @@ namespace System
return .Ok;
}
public Result<void> GetValue(StringView name, String outData)
public Result<void> GetValue(StringView name, String outData, bool* isExpanded = null)
{
if (isExpanded != null)
*isExpanded = false;
bool gotData = false;
GetValue(name, scope [?] (regType, regData) =>
{
if (isExpanded != null)
*isExpanded = regType == Windows.REG_EXPAND_SZ;
if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ))
{
gotData = true;
@ -1773,7 +1777,7 @@ namespace System
public static extern int32 SendMessageW(HWnd hWnd, int32 msg, int wParam, int lParam);
[Import("user32.lib"), CLink, CallingConvention(.Stdcall)]
public static extern int32 SendMessageTimeoutW(HWnd hWnd, int32 msg, int wParam, int lParam, int32 flags, int32 timeout, int32* result);
public static extern int32 SendMessageTimeoutW(HWnd hWnd, int32 msg, int wParam, int lParam, int32 flags, int32 timeout, int* result);
[Import("user32.lib "), CLink, CallingConvention(.Stdcall)]
public static extern HWnd SetFocus(HWnd hWnd);