更新 : 2007 年 11 月
エミュレータを一意に識別する仮想マシン ID (VMID: Virtual Machine Identifier) を取得します。
HRESULT get_VMID([out, retval] BSTR* pVMID);
パラメータ
- [out,retval] pVMID
エミュレータの VMID を含む文字列へのポインタ。
戻り値
メソッド呼び出しの結果を示す HRESULT 値。
使用例
このメソッドの使用例を次に示します。コード例全体については、「IDeviceEmulatorManagerVMID」を参照してください。
// For every emulator in the list
for (; SUCCEEDED(hr); (hr = pDeviceEnumerator->MoveNext()))
{
CComBSTR deviceName;
CComPtr<IDeviceEmulatorManagerVMID> pDevice;
// Get the IDeviceEmulatorManagerVMID object.
hr = pDeviceEnumerator->GetVMID(&pDevice);
if (FAILED(hr)) {
continue;
}
// Get the name of the emulator
hr = pDevice->get_Name(&deviceName);
if (FAILED(hr)){
continue;
}
// If the name of the device matches the supplied name,
// then this is the device we are looking for.
if (deviceIdentifier == deviceName){
*pDeviceVMID = pDevice;
(*pDeviceVMID)->AddRef();
return TRUE;
}
}
必要条件
DEMComInterface.tlb