1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Registry changes

This commit is contained in:
Brian Fiete 2020-07-28 05:58:00 -07:00
parent 40bd55fb93
commit a7ef265e0b

View file

@ -325,7 +325,7 @@ namespace System
default:
Runtime.NotImplemented();
}
});
}).IgnoreError();
if (!val.HasValue)
return .Err;
@ -342,7 +342,7 @@ namespace System
gotData = true;
outData.AddRange(regData);
}
});
}).IgnoreError();
if (!gotData)
return .Err;
return .Ok;
@ -351,7 +351,7 @@ namespace System
public Result<void> GetValue(StringView name, String outData)
{
bool gotData = false;
Try!(GetValue(name, scope [&] (regType, regData) =>
GetValue(name, scope [&] (regType, regData) =>
{
if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ))
{
@ -361,7 +361,7 @@ namespace System
span.RemoveFromEnd(1);
outData.Append(span);
}
}));
}).IgnoreError();
if (!gotData)
return .Err;
return .Ok;
@ -371,14 +371,14 @@ namespace System
{
bool gotData = false;
int sizeofT = sizeof(T);
Try!(GetValue(name, scope [&] (regType, regData) =>
GetValue(name, scope [&] (regType, regData) =>
{
if ((regType == Windows.REG_BINARY) && (regData.Length == sizeofT))
{
Internal.MemCpy(&data, regData.Ptr, sizeofT);
gotData = true;
}
}));
}).IgnoreError();
if (!gotData)
return .Err;
return .Ok;