DeviceCollection.RemoveDevice

DeviceCollection.RemoveDevice

説明

デバイスドライバを、デバイスマネージャのリストから削除します。デバイスドライバを後で追加し直すには、DeviceCollection.AddDevice メソッドを使用します。

C#構文

DeviceCollection.RemoveDevice( String in_bstrDeviceName );

スクリプト構文

DeviceCollection.RemoveDevice( DeviceName );

パラメータ

パラメータ タイプ 説明
DeviceName String 削除するデバイスの名前

Python の例

#

# This example demonstrates how to work with devices through scripting.

#

Application.NewScene( None, False )

# First make sure the device manager is active (we can't add devices if it isn't)

if Application.Devices.Enable == False:

	Application.Devices.Enable = True

# Get the DeviceManager (DeviceCollection)

oDevices = Application.Devices

# Get a pointer to the PC1600 Device, if it exists

oDevice = oDevices( "PC1600" )

# If it doesn't exist, then create it

if oDevice == None:

	oDevices.AddDevice( "PC1600" )

	oDevice = oDevices( "PC1600" )

Application.LogMessage( "The device name is " + oDevice.FullName )

#INFO : The device name is DeviceManager.PC1600

関連項目

DeviceCollection.AddDevice