diff --git a/AppInstallerReset.sln b/AppInstallerReset.sln
index d5d1e22..cc8bcd7 100644
--- a/AppInstallerReset.sln
+++ b/AppInstallerReset.sln
@@ -5,12 +5,6 @@ VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkgread", "pkgread\pkgread.vcxproj", "{A7753282-AA16-43D9-8ACA-7065239DD702}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlltest", "dlltest\dlltest.vcxproj", "{F5CCB3AB-AC43-432A-862D-4F264760B09B}"
- ProjectSection(ProjectDependencies) = postProject
- {8EAC0230-4990-4E41-8E0F-D641D1561396} = {8EAC0230-4990-4E41-8E0F-D641D1561396}
- {33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "priformatcli", "..\priformatcli\priformatcli\priformatcli.vcxproj", "{33D91B58-1981-4A3C-B4D1-86EE406CDE12}"
ProjectSection(ProjectDependencies) = postProject
{EF4012D4-EF08-499C-B803-177739350B2D} = {EF4012D4-EF08-499C-B803-177739350B2D}
@@ -30,7 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "appinstaller", "appinstalle
{33D91B58-1981-4A3C-B4D1-86EE406CDE12} = {33D91B58-1981-4A3C-B4D1-86EE406CDE12}
{A7753282-AA16-43D9-8ACA-7065239DD702} = {A7753282-AA16-43D9-8ACA-7065239DD702}
{798ED492-EECE-457D-8FD8-129DA93CE126} = {798ED492-EECE-457D-8FD8-129DA93CE126}
- {F5CCB3AB-AC43-432A-862D-4F264760B09B} = {F5CCB3AB-AC43-432A-862D-4F264760B09B}
{E04CCAB9-35DB-495C-A279-5B483C707CD0} = {E04CCAB9-35DB-495C-A279-5B483C707CD0}
EndProjectSection
EndProject
@@ -54,16 +47,6 @@ Global
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x64.Build.0 = Release|x64
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.ActiveCfg = Release|Win32
{A7753282-AA16-43D9-8ACA-7065239DD702}.Release|x86.Build.0 = Release|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Debug|x64.ActiveCfg = Debug|x64
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Debug|x64.Build.0 = Debug|x64
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Debug|x86.ActiveCfg = Debug|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Debug|x86.Build.0 = Debug|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Release|Any CPU.ActiveCfg = Release|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Release|x64.ActiveCfg = Release|x64
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Release|x64.Build.0 = Release|x64
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Release|x86.ActiveCfg = Release|Win32
- {F5CCB3AB-AC43-432A-862D-4F264760B09B}.Release|x86.Build.0 = Release|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|Any CPU.ActiveCfg = Debug|Win32
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.ActiveCfg = Debug|x64
{33D91B58-1981-4A3C-B4D1-86EE406CDE12}.Debug|x64.Build.0 = Debug|x64
diff --git a/appinstaller/appinstaller.rc b/appinstaller/appinstaller.rc
index ca47be9..cb2caa6 100644
Binary files a/appinstaller/appinstaller.rc and b/appinstaller/appinstaller.rc differ
diff --git a/appinstaller/appinstaller.vcxproj b/appinstaller/appinstaller.vcxproj
index caf425b..b06a7bb 100644
--- a/appinstaller/appinstaller.vcxproj
+++ b/appinstaller/appinstaller.vcxproj
@@ -164,6 +164,7 @@
+
diff --git a/appinstaller/appinstaller.vcxproj.filters b/appinstaller/appinstaller.vcxproj.filters
index 9ac7b42..eebd9bc 100644
--- a/appinstaller/appinstaller.vcxproj.filters
+++ b/appinstaller/appinstaller.vcxproj.filters
@@ -90,6 +90,9 @@
头文件
+
+ 头文件
+
diff --git a/appinstaller/appxinfo.h b/appinstaller/appxinfo.h
index 13a94d5..e21a464 100644
--- a/appinstaller/appxinfo.h
+++ b/appinstaller/appxinfo.h
@@ -347,4 +347,4 @@ struct pkginfo
std::wstring_convert > conv;
return conv.from_bytes (utf8);
}
-};
\ No newline at end of file
+};
diff --git a/appinstaller/bridge.h b/appinstaller/bridge.h
new file mode 100644
index 0000000..e6b4fd1
--- /dev/null
+++ b/appinstaller/bridge.h
@@ -0,0 +1,87 @@
+#pragma once
+#include
+#include "mpstr.h"
+#include "nstring.h"
+using namespace System;
+using namespace System::Runtime::InteropServices;
+
+std::wstring HResultToMessage (HRESULT hr)
+{
+ _com_error err (hr);
+ auto msgptr = err.ErrorMessage ();
+ return msgptr ? msgptr : L"";
+}
+[ComVisible (true)]
+public ref class _I_HResult
+{
+ private:
+ HRESULT hr = S_OK;
+ String ^errorcode = "";
+ String ^detailmsg = "";
+ public:
+ _I_HResult (HRESULT hres)
+ {
+ hr = hres;
+ detailmsg = CStringToMPString (HResultToMessage (hres));
+ }
+ _I_HResult (HRESULT hres, String ^error, String ^message)
+ {
+ hr = hres;
+ errorcode = error;
+ detailmsg = message;
+ }
+ property HRESULT HResult { HRESULT get () { return hr; }}
+ property String ^ErrorCode { String ^get () { return errorcode; }}
+ property String ^Message { String ^get () { return detailmsg; }}
+ property bool Succeeded { bool get () { return SUCCEEDED (hr); }}
+ property bool Failed { bool get () { return FAILED (hr); }}
+};
+System::String ^FormatString (System::String ^fmt, ... array