void __stdcall SetDDDengineMemory(int maxvertex,int maxcindex,int maxsprite,int maxhelpers,int maxstaticobjects,int maxstaticmeshes)

Parameters:
int maxvertex:
It determine the maximum number of vertices of dynamic buffer. (each polygons includes 3 indexes)
int maxcindex:
It determine the maximum number of indexes of static objects. And it determine the maximum number of vertices of static objects too.
int maxsprite:
It determine the maximum number of vertices of layer polygons.
int maxhelpers:
The maximum number of all helpers.
int maxstaticobjects: The maximum number of all static objects.
int maxstaticmeshes: The maximum number of mehes of all static object.
You can set the memory allocation parameters, before you call the InitD3DHWND or InitD3D.