Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows ARM平台上VS2017缺少timeSetEvent_Windows_Visual Studio_Windowsiot_Windows Iot Core 10 - Fatal编程技术网

Windows ARM平台上VS2017缺少timeSetEvent

Windows ARM平台上VS2017缺少timeSetEvent,windows,visual-studio,windowsiot,windows-iot-core-10,Windows,Visual Studio,Windowsiot,Windows Iot Core 10,我正在使用Visual Studio 2017开发ARM平台(带windows iOT的Raspberry Pi 3 B+)。我正在寻找使用mmiscapi2.h中的timeSetEvent功能。不幸的是,此功能在ARM平台上不可用 是否有另一个标题可以替换mmiscapi2.h和timeSetEvent?或者我应该为ARM使用不同的函数n吗 我有很多困难,我不知道我是否清楚。如果没有,请提问 谢谢。是桌面API,已经过时了。新应用程序应使用CreateTimerQueueTimer创建计时器队

我正在使用Visual Studio 2017开发ARM平台(带windows iOT的Raspberry Pi 3 B+)。我正在寻找使用
mmiscapi2.h
中的
timeSetEvent
功能。不幸的是,此功能在ARM平台上不可用

是否有另一个标题可以替换
mmiscapi2.h
timeSetEvent
?或者我应该为ARM使用不同的函数n吗

我有很多困难,我不知道我是否清楚。如果没有,请提问

谢谢。

是桌面API,已经过时了。新应用程序应使用CreateTimerQueueTimer创建计时器队列计时器

不幸的是,Windows 10 IoT Core不支持CreateTimerQueueTimer

UWP是Windows IoT核心上的主要应用程序类型。在UWP中,您可以使用和定期创建计时器

您可以参考“”和“”示例了解如何使用它们

更新:以下是UWP中的Dispatchermer示例

MainPage.xaml.cpp

#include "pch.h"
#include "MainPage.xaml.h"

using namespace App5;

using namespace Platform;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation;

// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

MainPage::MainPage()
{
    InitializeComponent();


    timer_ = ref new DispatcherTimer();
    TimeSpan interval;
    interval.Duration = 500 * 1000 * 10;
    timer_->Interval = interval;
    timer_->Tick += ref new EventHandler<Object ^>(this, &MainPage::OnTick);
    timer_->Start();

}

void MainPage::OnTick(Object ^sender, Object ^args)
{

}
#包括“pch.h”
#包括“MainPage.xaml.h”
使用名称空间App5;
使用命名空间平台;
使用名称空间Windows::Foundation;
使用名称空间Windows::Foundation::Collections;
使用名称空间Windows::UI::Xaml;
使用名称空间Windows::UI::Xaml::控件;
使用名称空间Windows::UI::Xaml::Controls::Primitives;
使用名称空间Windows::UI::Xaml::Data;
使用名称空间Windows::UI::Xaml::Input;
使用名称空间Windows::UI::Xaml::Media;
使用名称空间Windows::UI::Xaml::Navigation;
//空白页项模板被记录在https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
主页::主页()
{
初始化组件();
定时器_uref=new dispatchermer();
时间间隔;
间隔时间=500*1000*10;
定时器->间隔=间隔;
timer->Tick+=ref new EventHandler(this,&MainPage::OnTick);
定时器->启动();
}
void主页::OnTick(对象^sender,对象^args)
{
}
MainPage.xaml.h

//
// MainPage.xaml.h
// Declaration of the MainPage class.
//

#pragma once

#include "MainPage.g.h"

namespace App5
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public ref class MainPage sealed
    {
    public:
        MainPage();

    private:
        void OnTick(Platform::Object ^sender, Platform::Object ^args);

        Windows::UI::Xaml::DispatcherTimer ^timer_;

    };
}
//
//MainPage.xaml.h
//MainPage类的声明。
//
#布拉格语一次
#包括“MainPage.g.h”
名称空间App5
{
/// 
///可以单独使用或在框架内导航到的空页。
/// 
公共参考类主页已密封
{
公众:
主页();
私人:
void OnTick(平台::对象^sender,平台::对象^args);
Windows::UI::Xaml::DispatcherTimer^计时器;
};
}
C++UWP项目结构:


谢谢你的帮助。现在,我没有成功。我使用Visual Studio 2017,但它不识别Dispatchermer(),它可能不在引用中,所以我在看这一面。@KingoftOneage
Dispatchermer()
包含在
Windows::UI::Xaml
命名空间中,您需要引用它。我通过添加一个简单的示例代码来更新我的答案,您可以检查一下。事实上,我正在尝试升级一个旧软件,它运行在win32上。并使其在手臂上运行(覆盆子皮3 B+)。特别是,现在我正在尝试升级一个.dll,引用不想添加,因为您最初的问题是为ARM开发一个应用程序。对于升级现有的WIN32应用程序,您可以尝试。