IDirectDraw2::SetDisplayMode

DDraw vtable[21] → HRESULT

IDirectDraw2::SetDisplayMode is a method of the COM interface IDirectDraw2 in DirectDraw. Its function pointer sits at vtable index 21 — the zero-based slot in that interface's virtual method table, counted from QueryInterface and including every entry inherited from a base interface. It takes 5 parameters (dwWidth, dwHeight, dwBPP, dwRefreshRate, dwFlags) and returns HRESULT.

COM methods are reached through that table rather than by an exported name, so the slot index is what a wrapper, an interface hook or a disassembly listing has to resolve against. The parameter order and types below are the ones this interface declares.

Parameters (5)

#NameType
0dwWidthDWORD
1dwHeightDWORD
2dwBPPDWORD
3dwRefreshRateDWORD
4dwFlagsDWORD