# CreateDevice failed

**URL:** <https://forums.imgtec.com/t/createdevice-failed/715>\
**Category:** PowerVR Insider\
**Created:** [June 2, 2010, 2:29am UTC](https://forums.imgtec.com/t/createdevice-failed/715 "2010-06-02T02:29:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aimupisan](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aimupisan](https://forums.imgtec.com/u/aimupisan)\
**Post date:** [June 2, 2010, 2:29am UTC](https://forums.imgtec.com/t/createdevice-failed/715/1 "2010-06-02T02:29:48Z")

</div>

hello all,

&nbsp;
  

I used&nbsp;"CreateDevice" API to&nbsp;connect D3DM device.&nbsp;and returned&nbsp;an error value --&nbsp;D3DMERR\_INVALIDDEVICE, &nbsp;it seems platform doesn't support D3DM.&nbsp; 
  

Hardware is Sirf prima TT442, accroding white paper, it integrated MBX-lite core, so D3DM should be supported, and I built OS softaware by myself, certainly I checked all D3DM items in catalog items view. 
  

&nbsp;
  

maybe you know why?
  

&nbsp;
  

please refer to following source code.
  

&nbsp;
  

if( NULL == ( g\_pD3DM = Direct3DMobileCreate( D3DM\_SDK\_VERSION ) ) )  
&nbsp;&nbsp;return E\_FAIL;
  

&nbsp;D3DMPRESENT\_PARAMETERS d3dmpp;   
&nbsp;memset( &d3dmpp, 0, sizeof(d3dmpp) );  
&nbsp;d3dmpp.Windowed = TRUE;  
&nbsp;d3dmpp.SwapEffect = D3DMSWAPEFFECT\_DISCARD;  
&nbsp;d3dmpp.BackBufferFormat = D3DMFMT\_UNKNOWN;  
&nbsp;d3dmpp.EnableAutoDepthStencil = TRUE;  
&nbsp;d3dmpp.AutoDepthStencilFormat = D3DMFMT\_D16;
  

  
&nbsp;UINT uAdapter D3DMADAPTER\_DEFAULT;  
&nbsp;  
&nbsp;HRESULT hRes = g\_pD3DM-\>CreateDevice( uAdapter,   
&nbsp;&nbsp;D3DMDEVTYPE\_DEFAULT,  
&nbsp;&nbsp;hWnd, 0,  
&nbsp;&nbsp;&d3dmpp, &g\_pd3dmDevice );  
&nbsp;if( FAILED( hRes ) )  
&nbsp;{  
&nbsp;&nbsp;ErrorOutput(hRes);  
&nbsp;&nbsp;OutputDebugString(TEXT("Unable to create a D3DM device.n"));  
&nbsp;&nbsp;return E\_FAIL;  
&nbsp;}
  

&nbsp;
  

Best regards
  

Gavin

---

<div class="post-metadata">

**Author:** ![GordonMaclachlan](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@GordonMaclachlan](https://forums.imgtec.com/u/GordonMaclachlan)\
**Post date:** [June 17, 2010, 8:41am UTC](https://forums.imgtec.com/t/createdevice-failed/715/2 "2010-06-17T08:41:24Z")

</div>

If you have access to our drivers to build them for this platform then your enquiries should be directed through IPGear. Otherwise, you may have a software implementation of D3DM, in which case we can't really help you, I'm afraid.  
rys2010-07-14 14:47:45

---

<div class="post-metadata">

**Author:** ![kate454](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@kate454](https://forums.imgtec.com/u/kate454)\
**Post date:** [August 3, 2011, 8:53am UTC](https://forums.imgtec.com/t/createdevice-failed/715/3 "2011-08-03T08:53:01Z")

</div>

Hi, i just bought FSM And it doesnt work. The error that i posted as the  
  
topic is the error that comes up. Any help? Any reason why it said  
  
this? Thanks, all help welcome.
