Microsoft DirectX 9.0 SDK Update (October 2004)

Device.Device Constructor

Language:

Note: This documentation is preliminary and is subject to change.

Initializes a new instance of the Device class.

Definition

Visual Basic .NET Public Sub New( _
    ByVal guidDev As Guid _
)
C# public Device(
    Guid guidDev
);
Managed C++ public: Device(
    Guid guidDev
);
JScript .NET public function Device(
    guidDev : Guid
);

Parameters

guidDev System.Guid. The Guid Leave Site of the device to create an instanse of. See Remarks.

Remarks

To create an instance a particular Device object using its Guid Leave Site, first retrieve an available device's DeviceInformation from the DevicesCollection object, then get the Guid Leave Site from the DeviceInformation.DriverGuid property.

The application must call the SetCooperativeLevel method immediately after creating a Device object.

Exceptions

AllocatedException The request failed because resources, such as a priority level, were already in use by another caller.
ArgumentException Leave Site An invalid parameter was passed to the called method.
NoAggregationException The object does not support aggregation.
NoDriverException No sound driver is available for use, or the given globally unique identifier (GUID) is not a valid Microsoft® DirectSound® device identifier (ID).
OutOfMemoryException Leave Site DirectSound could not allocate sufficient memory to complete the call.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center