mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 09:28:03 +08:00
Added support to run apps in development mode (#4217)
This commit is contained in:
parent
ccfc4d68f3
commit
302df56ee1
@ -62,7 +62,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
|
|
||||||
IStream stream;
|
IStream stream;
|
||||||
const uint noAttribute = 0x80;
|
const uint noAttribute = 0x80;
|
||||||
const Stgm exclusiveRead = Stgm.Read | Stgm.ShareExclusive;
|
const Stgm exclusiveRead = Stgm.Read | Stgm.DenyWrite;
|
||||||
var hResult = SHCreateStreamOnFileEx(path, exclusiveRead, noAttribute, false, null, out stream);
|
var hResult = SHCreateStreamOnFileEx(path, exclusiveRead, noAttribute, false, null, out stream);
|
||||||
|
|
||||||
if (hResult == Hresult.Ok)
|
if (hResult == Hresult.Ok)
|
||||||
@ -198,9 +198,8 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var f = p.IsFramework;
|
var f = p.IsFramework;
|
||||||
var d = p.IsDevelopmentMode;
|
|
||||||
var path = p.InstalledLocation.Path;
|
var path = p.InstalledLocation.Path;
|
||||||
valid = !f && !d && !string.IsNullOrEmpty(path);
|
valid = !f && !string.IsNullOrEmpty(path);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -653,7 +652,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
private enum Stgm : uint
|
private enum Stgm : uint
|
||||||
{
|
{
|
||||||
Read = 0x0,
|
Read = 0x0,
|
||||||
ShareExclusive = 0x10,
|
DenyWrite = 0x20,
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum Hresult : uint
|
private enum Hresult : uint
|
||||||
|
Loading…
Reference in New Issue
Block a user