jeudi 5 octobre 2017

Windows universal Application c++ : A method was called at an unexpected time

I am working on C++ windows universal Application development.

I am creating a task and in the .then block i am calling a method as below

create_task(m_updaterService->OpenAsync()).then([this](AppServiceConnectionStatus status)
{
   if (m_updaterService != nullptr)
    {
        txtBlockUpdated->Text = L"Connected to Service";                    
    }
    else
    {
        txtBlockUpdated->Text = L"Failed to connect to service";                        
        delete m_updaterService;
        m_updaterService = nullptr;
    }
    CheckUpdate();
}

I am getting below exception for CheckUpdate(); method call.

WinRT information: A method was called at an unexpected time.

Aucun commentaire:

Enregistrer un commentaire