
i
i
i
i
i
i
i
i
584 F. The COM in Practice
LPDIRECTINPUT8 g_pDI = NULL;
LPDIRECTINPUTDEVICE8 g_pJoystick1 = NULL;
hr = DirectInput8Create(g_hInst,DIRECTINPUT_VERSION,
IID_IDirectInput8,(VOID
**
)&g_pDI,NULL);
If you want to see a full-blown implementation of a COM object and
its interfaces in a useful setting, go to the DirectShow SDK and the sample-
video processing filter called EZRGB4.Itislocatedin
<SDK Location>\
Samples\C++\DirectShow\Filters\EZRGB24
. This filter is a COM ob-
ject that exposes a special interface called IPEffect which allows the pa-
rameters of the effect to be changed through the get IPEffect(..) and
put IPEffect(..) methods.