更新:2007 年 11 月
显示或隐藏“设备仿真器管理器”窗口。
HRESULT ShowManagerUI([in] BOOL fShow);
参数
- [in] fShow
 指示是显示还是隐藏“设备仿真器管理器”窗口。使用 true 可显示该窗口,使用 false 可隐藏该窗口。
返回值
一个指示方法调用结果的 HRESULT 值。
示例
以下示例启动、显示然后隐藏“设备仿真器管理器”窗口。
int _tmain(int argc, _TCHAR* argv[])
{
    if (SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))
    {
        // HRESULT is used to determine whether method calls are successful
        HRESULT hr;
        // Instantiate DeviceEmulatorManager (DEM) object.
        // This starts DvcEmuManager.exe in silent mode
        CComPtr<IDeviceEmulatorManager> pDeviceEmulatorManager;
        hr = pDeviceEmulatorManager.CoCreateInstance(__uuidof(DeviceEmulatorManager));
        if (FAILED(hr)) {
            wprintf_s(L"Error: Unable to instantiate DeviceEmulatorManager. ErrorCode=0x%08X\n", hr);
            return false;
        }
        // Show the window.
        hr = pDeviceEmulatorManager->ShowManagerUI(true);
        system("pause");
        // Hide the window.
        pDeviceEmulatorManager->ShowManagerUI(false);
        system("pause");
        return true;
        CoUninitialize();
    }
    return 0;
}
要求
DEMComInterface.tlb