Added support to run apps in development mode (#4217)

This commit is contained in:
Divyansh Srivastava 2020-06-11 18:24:45 -07:00 committed by GitHub
parent ccfc4d68f3
commit 302df56ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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