EMULATOR_STATE

更新:2007 年 11 月

指示仿真程序的状态。

enum EMULATOR_STATE
{
    EMU_NOT_RUNNING = 0,
    EMU_RUNNING = 1,
    EMU_CRADLED = 2
}

备注

IDeviceEmulatorManagerVMID::get_State 使用此枚举。仿真程序的状态可以是未在运行、正在运行或已插入底座。

示例

本示例演示如何使用此方法。有关完整的示例,请参见IDeviceEmulatorManagerVMID

// Output the emulator's current state
EMULATOR_STATE deviceState = EMU_NOT_RUNNING;
hr = pDevice->get_State(&deviceState);
if (SUCCEEDED(hr))
{
    if (deviceState == EMU_CRADLED) wprintf_s(L"Emulator is Cradled\n");
    else if (deviceState == EMU_RUNNING) wprintf_s(L"Emulator is Running\n");
    else wprintf_s(L"Emulator is Not Running\n");
}

要求

DEMComInterface.tlb

请参见

其他资源

Device Emulator samples(设备仿真程序示例)