mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Registry changes
This commit is contained in:
parent
40bd55fb93
commit
a7ef265e0b
1 changed files with 6 additions and 6 deletions
|
@ -325,7 +325,7 @@ namespace System
|
||||||
default:
|
default:
|
||||||
Runtime.NotImplemented();
|
Runtime.NotImplemented();
|
||||||
}
|
}
|
||||||
});
|
}).IgnoreError();
|
||||||
|
|
||||||
if (!val.HasValue)
|
if (!val.HasValue)
|
||||||
return .Err;
|
return .Err;
|
||||||
|
@ -342,7 +342,7 @@ namespace System
|
||||||
gotData = true;
|
gotData = true;
|
||||||
outData.AddRange(regData);
|
outData.AddRange(regData);
|
||||||
}
|
}
|
||||||
});
|
}).IgnoreError();
|
||||||
if (!gotData)
|
if (!gotData)
|
||||||
return .Err;
|
return .Err;
|
||||||
return .Ok;
|
return .Ok;
|
||||||
|
@ -351,7 +351,7 @@ namespace System
|
||||||
public Result<void> GetValue(StringView name, String outData)
|
public Result<void> GetValue(StringView name, String outData)
|
||||||
{
|
{
|
||||||
bool gotData = false;
|
bool gotData = false;
|
||||||
Try!(GetValue(name, scope [&] (regType, regData) =>
|
GetValue(name, scope [&] (regType, regData) =>
|
||||||
{
|
{
|
||||||
if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ))
|
if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ))
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,7 @@ namespace System
|
||||||
span.RemoveFromEnd(1);
|
span.RemoveFromEnd(1);
|
||||||
outData.Append(span);
|
outData.Append(span);
|
||||||
}
|
}
|
||||||
}));
|
}).IgnoreError();
|
||||||
if (!gotData)
|
if (!gotData)
|
||||||
return .Err;
|
return .Err;
|
||||||
return .Ok;
|
return .Ok;
|
||||||
|
@ -371,14 +371,14 @@ namespace System
|
||||||
{
|
{
|
||||||
bool gotData = false;
|
bool gotData = false;
|
||||||
int sizeofT = sizeof(T);
|
int sizeofT = sizeof(T);
|
||||||
Try!(GetValue(name, scope [&] (regType, regData) =>
|
GetValue(name, scope [&] (regType, regData) =>
|
||||||
{
|
{
|
||||||
if ((regType == Windows.REG_BINARY) && (regData.Length == sizeofT))
|
if ((regType == Windows.REG_BINARY) && (regData.Length == sizeofT))
|
||||||
{
|
{
|
||||||
Internal.MemCpy(&data, regData.Ptr, sizeofT);
|
Internal.MemCpy(&data, regData.Ptr, sizeofT);
|
||||||
gotData = true;
|
gotData = true;
|
||||||
}
|
}
|
||||||
}));
|
}).IgnoreError();
|
||||||
if (!gotData)
|
if (!gotData)
|
||||||
return .Err;
|
return .Err;
|
||||||
return .Ok;
|
return .Ok;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue