看了d3d9.h就知道怎么做了,如下:
拿DWORD IDirect3DDevice9::Clear(DWORD Count, const D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil)来说

IDirect3dDevice9* pDevice = CreateRequestDevice();

#define GFN(o, n) ((o)->lpVtbl->n)
#define TL_CALL __stdcall

#define CALL_TL_FN(fn, a,b,c,d,e,f) (GFN(pDevice, Clear)(pDevice, a,b,c,d,e,f))

typedef D3DRECT TLrect;
// other typederfs...

typedef long (TL_CALL *TL_PROC)(IDirect3DDevice9* Device, DWORD Count, const D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil);

void tl_clear(TLdword Count, const TLrect* pRects, TLdword Flags, TLcolor Color, float Z, TLdword Stencil)
{
   hr = CALL_TL_FN(Clear, Count, pRects, Flags, Color, Z, Stencil);
}