How to convert application URI to normal file path?How to convert std::string to lower case?How to convert a std::string to const char* or char*?Normalize file path with WinAPIHow to convert int to QString?How can I convert a std::string to int?How do I access the RoamingState folder of an UWP when it calls my DLL?How to properly structure UWP app icons in AppxManifest.xml file for a Win32 app converted using Desktop Bridge (Project Centennial)Convert URI to pathIs there a desktop mechanism similar to UWP windows.protocol?Opening Files from a String Path with Android NDK

Why does the headset man not get on the tractor?

Why do the lights go out when someone enters the dining room on this ship?

What makes "quality" analog AV cables better than cheap cables?

How do employ ' ("prime") in math mode at the correct depth?

Why is it harder to turn a motor/generator with shorted terminals?

How to cope with regret and shame about not fully utilizing opportunities during PhD?

What's tha name for when you write multiple voices on same staff? And are there any cons?

Where to find every-day healthy food near Heathrow Airport?

How can a layman easily get the consensus view of what academia *thinks* about a subject?

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Conditional probability - sum of dice is even given that at least one is a five

Jumping frame contents with beamer and pgfplots

What is the largest number of identical satellites launched together?

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

Is this a security concern for ubuntu users?

What kind of SATA connector is this?

Will a coyote attack my dog on a leash while I'm on a hiking trail?

Is Germany still exporting arms to countries involved in Yemen?

Wireless headphones interfere with Wi-Fi signal on laptop

Is there ever any indication in the MCU as to how Spider-Man got his powers?

CPLD based Pierce oscillator

Anatomically Correct Carnivorous Tree

Does gravity affect the time evolution of a QM wave function?

What are the implications of the new alleged key recovery attack preprint on SIMON?



How to convert application URI to normal file path?


How to convert std::string to lower case?How to convert a std::string to const char* or char*?Normalize file path with WinAPIHow to convert int to QString?How can I convert a std::string to int?How do I access the RoamingState folder of an UWP when it calls my DLL?How to properly structure UWP app icons in AppxManifest.xml file for a Win32 app converted using Desktop Bridge (Project Centennial)Convert URI to pathIs there a desktop mechanism similar to UWP windows.protocol?Opening Files from a String Path with Android NDK






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















How can I obtain normal file path from application URI given that I'm aware of application / package id?




ms-appx:///assets/Logo.png

ms-appdata:///local/Packs/area1.dat




PathCreateFromUrlW obviously does not work. I think for UWP applications there is a crippled method to obtain a path for current application by creating an instance of storage file object using IStorageFileStatics::GetFileFromApplicationUriAsync and then invoking IStorageItem::get_Path.










share|improve this question
























  • Whatever you are going to do next is not going to work.

    – Hans Passant
    Mar 23 at 19:18


















2















How can I obtain normal file path from application URI given that I'm aware of application / package id?




ms-appx:///assets/Logo.png

ms-appdata:///local/Packs/area1.dat




PathCreateFromUrlW obviously does not work. I think for UWP applications there is a crippled method to obtain a path for current application by creating an instance of storage file object using IStorageFileStatics::GetFileFromApplicationUriAsync and then invoking IStorageItem::get_Path.










share|improve this question
























  • Whatever you are going to do next is not going to work.

    – Hans Passant
    Mar 23 at 19:18














2












2








2








How can I obtain normal file path from application URI given that I'm aware of application / package id?




ms-appx:///assets/Logo.png

ms-appdata:///local/Packs/area1.dat




PathCreateFromUrlW obviously does not work. I think for UWP applications there is a crippled method to obtain a path for current application by creating an instance of storage file object using IStorageFileStatics::GetFileFromApplicationUriAsync and then invoking IStorageItem::get_Path.










share|improve this question
















How can I obtain normal file path from application URI given that I'm aware of application / package id?




ms-appx:///assets/Logo.png

ms-appdata:///local/Packs/area1.dat




PathCreateFromUrlW obviously does not work. I think for UWP applications there is a crippled method to obtain a path for current application by creating an instance of storage file object using IStorageFileStatics::GetFileFromApplicationUriAsync and then invoking IStorageItem::get_Path.







c++ winapi windows-10






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 17:58







VTT

















asked Mar 23 at 13:23









VTTVTT

27k42651




27k42651












  • Whatever you are going to do next is not going to work.

    – Hans Passant
    Mar 23 at 19:18


















  • Whatever you are going to do next is not going to work.

    – Hans Passant
    Mar 23 at 19:18

















Whatever you are going to do next is not going to work.

– Hans Passant
Mar 23 at 19:18






Whatever you are going to do next is not going to work.

– Hans Passant
Mar 23 at 19:18













1 Answer
1






active

oldest

votes


















2














There is a workaround:



You can use GetPackagePathByFullName to get the UWP application install path using PACKAGE_ID.
The path will like this C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe.



If you want a path of file under assets the path will be C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbweAssetsLogo.png



Sample code:



GetPackagePathByFullName(L"Microsoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe", &path, buffer);


More reference: "Package query API"






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314165%2fhow-to-convert-application-uri-to-normal-file-path%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    There is a workaround:



    You can use GetPackagePathByFullName to get the UWP application install path using PACKAGE_ID.
    The path will like this C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe.



    If you want a path of file under assets the path will be C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbweAssetsLogo.png



    Sample code:



    GetPackagePathByFullName(L"Microsoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe", &path, buffer);


    More reference: "Package query API"






    share|improve this answer



























      2














      There is a workaround:



      You can use GetPackagePathByFullName to get the UWP application install path using PACKAGE_ID.
      The path will like this C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe.



      If you want a path of file under assets the path will be C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbweAssetsLogo.png



      Sample code:



      GetPackagePathByFullName(L"Microsoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe", &path, buffer);


      More reference: "Package query API"






      share|improve this answer

























        2












        2








        2







        There is a workaround:



        You can use GetPackagePathByFullName to get the UWP application install path using PACKAGE_ID.
        The path will like this C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe.



        If you want a path of file under assets the path will be C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbweAssetsLogo.png



        Sample code:



        GetPackagePathByFullName(L"Microsoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe", &path, buffer);


        More reference: "Package query API"






        share|improve this answer













        There is a workaround:



        You can use GetPackagePathByFullName to get the UWP application install path using PACKAGE_ID.
        The path will like this C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe.



        If you want a path of file under assets the path will be C:Program FilesWindowsAppsMicrosoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbweAssetsLogo.png



        Sample code:



        GetPackagePathByFullName(L"Microsoft.SDKSamples.ListView.CS_1.0.0.0_x64__8wekyb3d8bbwe", &path, buffer);


        More reference: "Package query API"







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 25 at 6:33









        Rita Han - MSFTRita Han - MSFT

        5,4241313




        5,4241313





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314165%2fhow-to-convert-application-uri-to-normal-file-path%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현