Last time, we use DirectDrawCreateex (null, (void **) & m_pdd, iid_idirectdraw7, null; m_pdd is defined by lpdirectdraw7 m_pdd. In fact, there is another way to hook the approxIRECTDRAW7 method QueryInterface by iDirectdraw7.
HRESULT HRET;
LPDIRECTDRAW PDD;
LPDIRECTDRAW7 M_PDD;
Hret = DirectDrawCreate (NULL, & PDD, NULL);
IF (hret! = dd_ok)
{
// if failed, quit the app
Return;
}
// Fetch DirectDraw7 Interface
hret = pdd-> queryinterface (IID_IDIRECTDRAW7, (LPVOID *) & m_pdd);
PDD-> Release ();
...... You will apply it at this time.
...... The following is the same as the previous section ............
... Don't forget the link ddraw.lib dxguid.lib when compiled
The last time we show the text. We have displayed the picture; (due to the introduction of the introduction, try to read the picture of 256 colors).