   Getting "Method is invalid call" error message
  Hi, can somebody please help me on this.I'm getting D3DERR_INVALIDCALL and can't get past through it.This is part of the code:  d3d = Direct3DCreate9( D3D_SDK_VERSION);if(!d3d){  zError("Unable to create Direct3D Object\n"); return false;}    D3DDISPLAYMODE d3disp;  ddrval = d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3disp);  if( ddrval != D3D_OK)  {  printf("This is really bad\n");  return false;  }  D3DFORMAT format = d3disp.Format;  ZeroMemory(&pp,sizeof(D3DPRESENT_PARAMETERS));   pp.BackBufferCount= 1;pp.MultiSampleType=D3DMULTISAMPLE_NONE;    pp.MultiSampleQuality=0;    pp.SwapEffect = D3DSWAPEFFECT_DISCARD;pp.hDeviceWindow=hwnd;pp.Flags=0;pp.FullScreen_RefreshRateInHz=D3DPRESENT_RATE_DEFAULT;    pp.PresentationInterval=D3DPRESENT_INTERVAL_DEFAULT; pp.BackBufferFormat=format;    pp.EnableAutoDepthStencil=TRUE;    pp.AutoDepthStencilFormat = D3DFMT_D16;   if(FullScreenDisplay){ pp.Windowed= FALSE; pp.BackBufferWidth   = width; pp.BackBufferHeight  = height;   }else{ pp.Windowed= TRUE;   }   ddrval = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,   D3DCREATE_HARDWARE_VERTEXPROCESSING, &pp, &device);   if( ddrval == D3DERR_INVALIDCALL )   {   zError("Method call is invalid\n"); return false;   }   else if( ddrval == D3DERR_NOTAVAILABLE )   {   zError("This device does not support the queried technique\n"); return false;   }   else if( ddrval == D3DERR_OUTOFVIDEOMEMORY )   {   zError("Not enough memory\n"); return false;   }Is there anything that I missed ?Celios   