question

tomtsagk avatar image
0 Votes"
tomtsagk asked tomtsagk commented

How to get install location of WUP app in C?

Hi all,

In the past I wrote a game using the C programming language. Recently I was exploring the idea of porting it to the Windows Universal Platform, and potentially to the Windows Store.

After reading the docs, and spending some time on it, I managed to properly package it, and successfully install it locally as an WUP app.

I realized however, that up until now, the game was distributed as one folder, that when launched will look for the game's files locally. This means that if the game is run from a different folder (like when using a shortcut) it won't be able to find the local files to read. This is also a problem when it becomes a WUP app, since it is installed in the system, and can be launched from anywhere.

I've read in the docs this page: File access permissions, which describes how to get the install directory and read files from it. However the examples given are in C#.

How can I implement a similar functionality in C?
The ideal solution would let me read files that are part of the package when it's installed.

not-supported
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

Your question about C is not supported on Microsoft Q&A. You could ask in other C forums.


0 Votes 0 ·

Thanks for the info. That explains why I couldn't find the right category to post this. I'll go ahead and check on an alternative forms about this solution.

0 Votes 0 ·

0 Answers