Hello,
we are trying to build a Direct3DMobile application for the PicoCom3. Creating the
Driect3D Mobile object works fine but a call to CreateDevice(...) (see code below)
always returns D3DMERR_INVALIDDEVICE. We tested nearly all possible values for the
D3DMPRESENT_PARAMETERS but we think, these entries are not the reason for the failed
funtion call. Why we get a CPUID check failed error?
I hope someone can help us to solve this problem.
many thanks and cheers,
Tom
Here our debug output:
Code
- Modul laden: D3DM_2.exe
- Modul laden: commctrl.dll
- Modul laden: fpcrt.dll
- Modul laden: D3DM.dll
- Modul laden: coredll.dll
- Modul laden: d3dm_sedrv.dll
- Modul laden: DDRAW.dll
- [D3DM:ERR] CPUID check Failed !!!
- Modul entladen: DDRAW.dll
- Modul entladen: d3dm_sedrv.dll
- Das Programm "[7380032] D3DM_2.exe" wurde mit Code 1067 (0x42b) beendet.
Windows Error Code 1067: 'ERROR_PROCESS_ABORTED'
Description of Error: The process terminated unexpectedly. Errors on your system
may be caused by invalid registry entries and outdated or corrupt drivers.
The init call:
Code
- HRESULT InitD3DM( HWND Wnd )
- {
- // Create the D3DM object, which is needed to create the D3DMDevice.
- if( NULL == (throwAway = Direct3DMobileCreate( D3DM_SDK_VERSION ) ) )
- return E_FAIL;
- throwAway->QueryInterface(IID_IDirect3DMobile,(LPVOID*)&g_pD3DM);
- throwAway->Release();
- // if( NULL == (g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION ) ) )
- // return E_FAIL;
- // Set up the structure used to create the D3DMDevice. Most parameters are
- // zeroed out. We set Windowed to TRUE, since we want to do D3DM in a
- // window, and then set the SwapEffect to "discard", which is the most
- // efficient method of presenting the back buffer to the display. And
- // we request a back buffer format that matches the current desktop display
- // format.
- D3DMPRESENT_PARAMETERS d3dmpp;
- memset( &d3dmpp, 0, sizeof(d3dmpp) );
- //d3dmpp.BackBufferWidth = 800;
- //d3dmpp.BackBufferHeight = 480;
- d3dmpp.BackBufferFormat = D3DMFMT_R5G6B5;
- d3dmpp.BackBufferCount = 1;
- d3dmpp.Windowed = TRUE;
- d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
- d3dmpp.hDeviceWindow = Wnd;
- //d3dmpp.AutoDepthStencilFormat = D3DMFMT_UNKNOWN;
- // Create the Direct3D Mobile device.
- UINT uAdapter;
- // Use the default system D3DM driver
- uAdapter = D3DMADAPTER_DEFAULT;
- HRESULT hr;
- hr = g_pD3DM->CreateDevice( uAdapter,
- D3DMDEVTYPE_DEFAULT,
- Wnd,0,
- &d3dmpp, &g_pd3dmDevice );
- if(hr==D3DMERR_INVALIDDEVICE)
- {
- OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
- return E_FAIL;
- }
- return S_OK;
- }