Hi all,
I am checking how to integrate Casablanca into a Windows Store app. I am using VS2013 Express.
For that, I am created a new project using the XAML with Direct3D template. Added the Casablanca using NuGet. Reserved an app name on the portal, and associated the app in VS.
Under Services, I have checked the Live Services Site, and my app has SID, Application Identity and everything. In the app manifest, the Internet (Client) permission is enabled.
Into the DirectXPage::OnPointerPressed funtion, I have copy/pasted the login code from the Live sample:
Thank you.
László
I am checking how to integrate Casablanca into a Windows Store app. I am using VS2013 Express.
For that, I am created a new project using the XAML with Direct3D template. Added the Casablanca using NuGet. Reserved an app name on the portal, and associated the app in VS.
Under Services, I have checked the Live Services Site, and my app has SID, Application Identity and everything. In the app manifest, the Internet (Client) permission is enabled.
Into the DirectXPage::OnPointerPressed funtion, I have copy/pasted the login code from the Live sample:
static web::live::live_client lv_client;
void DirectXPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e)
{
// When the pointer is pressed begin tracking the pointer movement.
m_main->StartTracking();
try
{
auto ui_ctx = pplx::task_continuation_context::use_current();
std::vector<utility::string_t> scopes;
scopes.push_back( web::live::scopes::wl_basic );
scopes.push_back( web::live::scopes::wl_skydrive );
scopes.push_back( web::live::scopes::wl_skydrive_update );
lv_client.login( std::begin( scopes ), std::end( scopes ) ).then( [ this ] ( bool ok )
{
if ( ok )
{
const wchar_t* authToken = lv_client.authentication_token().c_str();
rand();
}
else
{
rand();
}
}, ui_ctx );
}
catch ( ... )
{
}
}
Compiles just fine. When I run it and touch the screen, I get a nice exception:First-chance exception at 0x75AD3D67 (KernelBase.dll) in App1.exe: 0x40080202: WinRT transform error (parameters: 0x80000019, 0x80070032, 0x0000001F, 0x05D0E2E0).Do I have to do something else to make it work?
First-chance exception at 0x75AD3D67 in App1.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x05D0E77C. HRESULT:0x80070032 The request is not supported.
WinRT information: The request is not supported.
Stack trace:
[External Code]
App1.exe!web::live::live_client::login(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > scopes) Line 122
App1.exe!web::live::live_client::login<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > >(std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > begin, std::_Vector_iterator<std::_Vector_val<std::_Simple_types<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > end) Line 154
App1.exe!App1::DirectXPage::OnPointerPressed(Platform::Object ^ sender, Windows::UI::Core::PointerEventArgs ^ e) Line 192
[External Code]
App1.exe!App1::DirectXPage::{ctor}::__l3::<lambda>(Windows::Foundation::IAsyncAction ^ __formal) Line 83
[External Code]
Thank you.
László