Skip to content

Commit 2b1270d

Browse files
HIllya51mingkuang-Chuyu
authored andcommitted
Fea,添加一些Appx路径获取函数(PR #154
- 添加 GetPackagePathByFullName - 添加 GetPackagesByPackageFamily - 添加 FindPackagesByPackageFamily - 添加 OpenPackageInfoByFullName - 添加 ClosePackageInfo - 添加 GetPackageInfo
1 parent 9dc7a34 commit 2b1270d

File tree

6 files changed

+1192
-567
lines changed

6 files changed

+1192
-567
lines changed

ThunksList.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,12 @@
557557
| GetCurrentPackageFullName | 返回 APPMODEL_ERROR_NO_PACKAGE。
558558
| GetPackageFullName | 返回 APPMODEL_ERROR_NO_PACKAGE。
559559
| GetPackageFamilyName | 返回 APPMODEL_ERROR_NO_PACKAGE。
560+
| GetPackagePathByFullName | 调用 GetPackageInfo。
561+
| GetPackagesByPackageFamily | 报告空集合,并返回 ERROR_SUCCESS。
562+
| FindPackagesByPackageFamily | 报告空集合,并返回 ERROR_SUCCESS。
563+
| OpenPackageInfoByFullName | 返回 ERROR_NOT_FOUND。
564+
| ClosePackageInfo | 返回 ERROR_INVALID_PARAMETER。
565+
| GetPackageInfo | 返回 ERROR_INVALID_PARAMETER。
560566
| OpenProcess | 额外处理 PROCESS_QUERY_LIMITED_INFORMATION、PROCESS_SET_LIMITED_INFORMATION。
561567
| GetThreadDescription | 返回空字符串。
562568
| SetThreadDescription | 返回 `E_NOTIMPL`

src/Thunks/YY_Thunks.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,20 @@ namespace YY::Thunks::internal
831831
return _cchString;
832832
}
833833

834+
static LPCWSTR __fastcall FindStringTable(LPCWSTR* _pszTable, size_t _cCount, LPCWSTR _szFound) noexcept
835+
{
836+
const auto _pszTableEnded = _pszTable + _cCount;
837+
for (; _pszTable != _pszTableEnded; ++_pszTable)
838+
{
839+
if (StringCompareIgnoreCaseByAscii(*_pszTable, _szFound, -1) == 0)
840+
{
841+
return *_pszTable;
842+
}
843+
}
844+
845+
return nullptr;
846+
}
847+
834848
template<typename Char>
835849
class StringBuffer
836850
{

0 commit comments

Comments
 (0)