Using the DirectX Caps Viewer Tool

The DirectX Caps Viewer tool is one of the first utilities you should learn how to use after installing the DirectX SDK on your system. The data provided by this utility can save considerable time in locating hardware- and driver-related problems on your system. In fact, this is a tool that every administrator should learn how to use as well. The following sections discuss how you can use the DirectX Caps Viewer tool to improve the DirectX development experience.

An Overview of the DirectX Caps Viewer Tool

Before you can use this tool, you must install the DirectX SDK. You'll find the DirectX Caps Viewer tool in the \Start Menu\Programs\Microsoft DirectX 8.1 SDK\DirectX Utilities folder. The initial DirectX Caps Viewer tool display appears in Figure 14.2.

Notice that the DirectX Caps Viewer tool makes a distinction between devices and DirectX objects. There are separate entries for the display adapters on my system and the DirectDraw devices. The distinction is that the presence of a display adapter alone doesn't guarantee DirectDraw compatibility. Even if the display adapter would normally have all of the required hardware support for DirectX, the hardware still requires the proper driver. The important element for the DirectX developer is learning where to look for specific information about the host system. Generally, you'll want to use the DirectX-specific entries to learn what your application can actually do on the host system rather than what the hardware is capable of doing with the proper driver.

X hnl> Lmp* /mi

1- - 1

• _J Ha^i »W<»X f — ,l«t» "i nmX*: ; © >«nnifwm &*>ui

• J *] Ul tMC iMfeM; ¡(Miri-t I

gg--1

Cn^r.wrMr UMUUSU*« i«MftU c&xnt: 1 »*r»M ivaMMJ V»1 rvJJ COWQWCQ

H—i n ne«*iw**» >ni?T4«iMiq«in«u>r»iii tmx^m

• JWlMMlUltMd

• JHrarthWM»

Figure 14.2: The DirectX Caps Viewer tool helps you learn about the DirectX capabilities of your system.

Microsoft has improved DirectX capabilities over the years, mainly due to the input of game developers. The initial release of DirectX included visual elements and a few aural elements. The latest version of DirectX concentrates on four main areas of the multimedia experience:

• Connectivity

The focus I chose for this book is the visual component of DirectX. This element shows up the best in books and it's what many business users will concentrate on learning first. However, it's important to consider the other DirectX components as well, because they do have an impact on the multimedia experience.

Converting the DirectX Caps Viewer Tool to a Data Structure

For DirectX application developers, there's a practical aspect in using this utility—it can provide validation of programming design decisions. You'll remember from Chapter 13 that DirectX relies on a wealth of data structures to communicate with the client application. Figure 14.3 shows a typical example of the output of one of these data structures.

Fungsi Directx
Figure 14.3: Use the DirectX Caps Viewer tool to learn more about the content of various DirectX data structures.

For a comparison of the data shown in Figure 14.3 to a data structure, check the DDCAPS data structure explanation found at ms-help://MS.VSCC/MS.MSDNVS/dx8_vb/directx_vb/extras/DirectDraw7/vbddref_89cy.htm. (We also discussed this structure in the section entitled "Converting the DDCAPS Data Structure" in Chapter 13.) You'll find that the display in Figure 14.3 compares favorably to the DDCAPS data structure description. If you were developing an application that required information stored in this data structure, you could use the DirectX Caps Viewer tool to validate the results received by your application.

An Overview of the Sound Elements

Figure 14.4 shows the sound elements associated with DirectX. As you can see, the DirectX sound elements are divided into three areas: hardware, sound effects, and music. The element highlighted in Figure 14.4 is the hardware. Most machines will have several hardware sources that DirectSound will target, including the sound capability of the modem. However, notice in Figure 14.4 that the two modem entries include the term emulated in their description. This means that the modem doesn't provide any DirectSound-compatible hardware. DirectSound recognizes it as a valid device but will emulate the required functionality in software.

Musical Elements Structure
igure 14.4: The DirectX Sound elements include hardware, sound effects, and music.

Moving on to the DirectSoundCapture Devices folder, you'll find the hardware that you saw in DirectSound Devices folder. The entries in the DirectSoundCapture Devices folder focus on sound effects. These entries describe the capabilities of the individual devices to record and play wave audio. The items of interest for developers in this situation are the entries in the General Caps folder for each device. This folder contains a list of the wave formats that each device can play and also tells you which formats you can use within your application.

Most systems contain a multitude of DirectMusic port entries. However, you'll usually find only one or perhaps two entries that rely on actual hardware. The remaining entries will reference emulated hardware. The most common emulated port is the Microsoft MIDI Mapper. The Caps folder for each device will tell you the type of device (input or output) and provide statistics such as the number of voices that the device supports.

An Overview of the Data Input Elements

The number and type of DirectInput devices that a system possesses varies based on the use of the system. Business systems normally contain the two DirectInput devices shown in Figure 14.5. In fact, the mouse and the keyboard the two devices you can count on for any system. If you want to create an application with general appeal, then target these two devices.

1- - 1

- fl

IM*

uu

* A -Mean» jrai

'tsm

(•(MM

rev JMJ «"»n

1

1

J«lltOM|<l|kMrf

cwnti'MijMU»

Figure 14.5: Every Windows system will contain a mouse and a keyboard.

Figure 14.5: Every Windows system will contain a mouse and a keyboard.

The information found in the device folder depends on the device. As shown in Figure 14.5, the mouse folder contains information such as the number of buttons. In general, you can expect every device to provide type information. The type information tells you about the generic capabilities of the device.

Home and gaming systems will likely contain a number of additional devices such as joysticks. The information that DirectInput provides is a little sketchy in this area due, in part, to a lack of standardization. Although it's possible to categorize a joystick by the number of buttons it provides, it's difficult to provide standardized information about its programmability. This means the developer is still partially responsible for finding details about some input devices using direct hardware access.

An Overview of the Connectivity Elements

The term DirectPlay is somewhat misleading because you could use this feature for a number of purposes—many of which aren't related to playing games. Microsoft originally designed the feature for games, though, so the name stuck. The DirectPlay feature tracks DirectX connectivity, as shown in Figure 14.6.

igure 14.6: Connectivity is a requirement for many multimedia applications today.

As you can see, most systems will include support for a number of DirectPlay devices, including modem, serial port, network, and Internet. The Connections folder contains a list of these devices and each device folder will tell you about the sessions for that device. There's little in the way of capability information provided by DirectPlay because it's impossible to obtain that information until it establishes a connection.

Was this article helpful?

+1 0

Responses

  • idris
    How to open directx caps viewer?
    8 years ago
  • Skye
    What kind of application required audio capabilities?
    8 years ago
  • Kristian
    How to check directx caps viewer?
    7 years ago
  • Fethawi
    How do i find the directx caps viewer?
    6 years ago

Post a comment