다음을 통해 공유


IDeviceEmulatorManagerVMID::get_State

업데이트: 2007년 11월

에뮬레이터의 현재 상태를 가져옵니다.

HRESULT get_State([out, retval] int* pState);

매개 변수

  • [out,retval] pState
    에뮬레이터의 현재 상태를 나타내는 EMULATOR_STATE 열거형에 대한 포인터입니다.

반환 값

메서드 호출의 결과를 나타내는 HRESULT 값입니다.

설명

에뮬레이터는 실행 중이지 않거나, 실행 중이거나, 크레들에 놓여 있는 상태일 수 있습니다.

예제

이 예제에서는 이 메서드의 사용법을 보여 줍니다. 전체 예제를 보려면 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