public static bool VerifyGACDependencyXP(ReferenceIdentity refId, string tempDir) { if (!PlatformSpecific.OnXPOrAbove) { return(false); } using (TempFile file = new TempFile(tempDir, ".manifest")) { ManifestGenerator.GenerateGACDetectionManifest(refId, file.Path); System.Deployment.Application.NativeMethods.ACTCTXW actCtx = new System.Deployment.Application.NativeMethods.ACTCTXW(file.Path); IntPtr hActCtx = System.Deployment.Application.NativeMethods.CreateActCtxW(actCtx); if (hActCtx != System.Deployment.Application.NativeMethods.INVALID_HANDLE_VALUE) { System.Deployment.Application.NativeMethods.ReleaseActCtx(hActCtx); return(true); } return(false); } }
public static bool VerifyGACDependencyXP(ReferenceIdentity refId, string tempDir) { if (!PlatformSpecific.OnXPOrAbove) { return false; } using (TempFile file = new TempFile(tempDir, ".manifest")) { ManifestGenerator.GenerateGACDetectionManifest(refId, file.Path); System.Deployment.Application.NativeMethods.ACTCTXW actCtx = new System.Deployment.Application.NativeMethods.ACTCTXW(file.Path); IntPtr hActCtx = System.Deployment.Application.NativeMethods.CreateActCtxW(actCtx); if (hActCtx != System.Deployment.Application.NativeMethods.INVALID_HANDLE_VALUE) { System.Deployment.Application.NativeMethods.ReleaseActCtx(hActCtx); return true; } return false; } }