Skip to content

Feature proposal:Hope to read Pri file resource content from stream #5068

@Gaoyifei1011

Description

@Gaoyifei1011

Describe the bug

Feature proposal:Hope to read Pri file resource content from stream

----------------------------------

希望能从流中读取 Pri 文件的信息


Image

Currently, the resource content of the Pri file can be read through the specific file path. However, in some scenarios, when the appxpackaging.h API is used to parse an application package, the IStream corresponding to resources.pri in the installation package can be obtained. The ResourceLoader of WASDK does not have a corresponding read method.

----------------------------------

目前读取 Pri 文件的资源内容可以通过具体的文件路径读取。但在一些场景中,使用 appxpackaging.h 下的 API 解析应用包时,可以获取安装包里 resources.pri 对应的 IStreamWASDKResourceLoader 并没有对应的读取方法,希望能添加类似的实现。


appxpackaging.h API:https://learn.microsoft.com/windows/win32/api/appxpackaging/
Win32 IStream:https://learn.microsoft.com/windows/win32/stg/istream-compound-file-implementation
ResourceLoader:https://learn.microsoft.com/zh-cn/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourceloader.-ctor?view=windows-app-sdk-1.6#microsoft-windows-applicationmodel-resources-resourceloader-ctor(system-string-system-string)


Steps to reproduce the bug

See description

Expected behavior

See description

Screenshots

See description

NuGet package version

Windows App SDK 1.6.3: 1.6.250108002

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 24H2 (22621, October 2024 Update)

IDE

Visual Studio 2022

Additional context

None

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions