문제

Can I implement trial mode in my native c++ application (cocos2d-x-win8)

All examples shows C#/XAML and I cannot find anything working in c++

도움이 되었습니까?

해결책

I'm not sure if you're asking about Windows 8 or Windows Phone 8 but luckily the answer is pretty similar. On WP8/Win8 from C++/C# you should use CurrentApp.LicenseInformation.IsTrial. However, due to a bug in WP8 invoking CurrentApp::LicenseInformation->IsTrial on the app's main thread will throw an exception. So you should on a different thread:

ThreadPool::RunAsync( ref new WorkItemHandler( [](IAsyncAction^ operation)
{
auto value = CurrentApp::LicenseInformation->IsTrial;
})); 

However, do note that the Win8 store offers a built-in time limited trial and WP8 store doesn't offer that by default. In WP8 you should implement your own trial logic.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top