Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XAML Island for Win32 app API GetFileFromApplicationUriAsync not working #39

Open
zhouhengyong opened this issue May 17, 2021 · 1 comment

Comments

@zhouhengyong
Copy link

In the sample code of NativeXamlIslands, I add the following code to test the StorageFile::GetFileFromApplicationUriAsync API of c++/winrt in MainUserControl.cpp file, but it doesn't work:

static const Uri s_jsonFileUri{ L"ms-appx:///Images/Activities.json" };
IAsyncAction GetActivitiesAsync()
{
auto jsonText{ co_await FileIO::ReadTextAsync(co_await StorageFile::GetFileFromApplicationUriAsync(s_jsonFileUri)) };
printf("hello.\n");
}
MainUserControl::MainUserControl()
{
GetActivitiesAsync();
InitializeComponent();
}

Please let me know what the reason behind? Thanks a lot!

@zhouhengyong
Copy link
Author

Fuck! still no answer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant