I'm writing a small program using DirectDraw7 using Dev-C++. It all seems to be correct, but it throws up this

Code:
173 C:\Documents and Settings\administrator\My Documents\Projects\Ultima Online\main.cpp
no matching function for call to `IDirectDraw::CreateSurface(
when i try to compile.

here is the declaration:
Code:
LPDIRECTDRAW lpDD;
and here is the offending line
Code:
ddrval = lpDD->CreateSurface( &ddsd, &DDSPrimary, NULL );
any thoughts?