Update Toast Notice Features

This commit is contained in:
Bruce
2025-11-10 23:24:00 +08:00
parent 978f9b6a45
commit a5d8981528
15 changed files with 848 additions and 30 deletions

View File

@@ -142,7 +142,9 @@ HRESULT AddAppxPackageFromURI (LPCWSTR lpPkgFileUri, PCREGISTER_PACKAGE_DEFENDEN
}
}
if (depuris->Size > 0) depuris = nullptr;
auto ope = pkgmgr->AddPackageAsync (ref new Uri (ref new String (lpPkgFileUri)), depuris, (DeploymentOptions)dwDeployOption);
auto pkguri = ref new Uri (ref new String (lpPkgFileUri));
auto pkguristr = pkguri->ToString ();
auto ope = pkgmgr->AddPackageAsync (pkguri, depuris, (DeploymentOptions)dwDeployOption);
return ope;
}, pfCallback, pCustom, pErrorCode, pDetailMsg);
}
@@ -426,7 +428,7 @@ HRESULT RegisterAppxPackageByPath (LPCWSTR lpManifestPath, PCREGISTER_PACKAGE_DE
{
std::wstring fullpath = GetFullPathName (lpManifestPath ? lpManifestPath : L"");
if (fullpath.empty ()) fullpath = lpManifestPath ? lpManifestPath : L"";
return RegisterAppxPackageByPath (fullpath.c_str (), alpDependencyUriList, dwDeployOption, pfCallback, pCustom, pErrorCode, pDetailMsg);
return RegisterAppxPackageByUri (fullpath.c_str (), alpDependencyUriList, dwDeployOption, pfCallback, pCustom, pErrorCode, pDetailMsg);
}
[MTAThread]
HRESULT RegisterAppxPackageByFullName (LPCWSTR lpPackageFullName, PCREGISTER_PACKAGE_DEFENDENCIES alpDepFullNameList, DWORD dwDeployOption, PKGMRR_PROGRESSCALLBACK pfCallback, void *pCustom, LPWSTR *pErrorCode, LPWSTR *pDetailMsg)
@@ -527,7 +529,7 @@ HRESULT StageAppxPackageFromPath (LPCWSTR lpPkgPath, PCREGISTER_PACKAGE_DEFENDEN
{
std::wstring fullpath = GetFullPathName (lpPkgPath ? lpPkgPath : L"");
if (fullpath.empty ()) fullpath = lpPkgPath ? lpPkgPath : L"";
return StageAppxPackageFromPath (fullpath.c_str (), alpDepUriList, dwDeployOption, pfCallback, pCustom, pErrorCode, pDetailMsg);
return StageAppxPackageFromURI (fullpath.c_str (), alpDepUriList, dwDeployOption, pfCallback, pCustom, pErrorCode, pDetailMsg);
}
[MTAThread]
HRESULT StageAppxUserData (LPCWSTR lpPackageFullName, PKGMRR_PROGRESSCALLBACK pfCallback, void *pCustom, LPWSTR *pErrorCode, LPWSTR *pDetailMsg)

BIN
pkgmgr/pkgmgr.rc Normal file

Binary file not shown.

View File

@@ -88,9 +88,13 @@
<ItemGroup>
<ClInclude Include="pkgmgr.h" />
<ClInclude Include="raii.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="pkgmgr.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -38,5 +38,13 @@
<ClInclude Include="version.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="pkgmgr.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

14
pkgmgr/resource.h Normal file
View File

@@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by pkgmgr.rc
// 新对象的下一组默认值
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif