How to use DirectX using Platform Invoke?

F

Frankie D.

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

....


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError =
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
C

Chris Tacke, eMVP

Does your device actually support D3DM? You can't just pull in the catalog
item and expect it to work. The display driver has to actually support it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
C

Chris Tacke, eMVP

Does your device actually support D3DM? You can't just pull in the catalog
item and expect it to work. The display driver has to actually support it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
F

Frankie D.

Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the catalog
item and expect it to work. The display driver has to actually support it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError =
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
F

Frankie D.

Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the catalog
item and expect it to work. The display driver has to actually support it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError =
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
C

Chris Tacke, eMVP

Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
C

Chris Tacke, eMVP

Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
F

Frankie D.

You need to modify the driver to add that support

I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
F

Frankie D.

You need to modify the driver to add that support

I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

Chris Tacke said:
Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
F

Frankie D.

Should we use an other platform?

Not Intel 855 GME?
Not x86?

Frankie D. said:
I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

:

Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
F

Frankie D.

Should we use an other platform?

Not Intel 855 GME?
Not x86?

Frankie D. said:
I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is why
you see that error. You need to modify the driver to add that support (and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Frankie D. said:
Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

:

Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM", SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
C

Chris Tacke, eMVP

It doesn't matter. You need a display driver that supports D3DM. There are
x86 devices that have it and there are x86 devices that don't. There are ARM
devices that have it and there are ARM devices that don't. There's no
reason the 855 can't support it, it just happens that the specific driver
you have doesn't. There's no reason the driver can't be extended to add
that support.

I'd say the larger question here is "why?" Why do you think you need D3DM
anyway? What, exactly, do you feel you're going to gain by using it?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


Frankie D. said:
Should we use an other platform?

Not Intel 855 GME?
Not x86?

Frankie D. said:
You need to modify the driver to add that support

I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is
why
you see that error. You need to modify the driver to add that support
(and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

:

Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually
support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform
Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM
device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create
the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering
device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting
use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM",
SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
C

Chris Tacke, eMVP

It doesn't matter. You need a display driver that supports D3DM. There are
x86 devices that have it and there are x86 devices that don't. There are ARM
devices that have it and there are ARM devices that don't. There's no
reason the 855 can't support it, it just happens that the specific driver
you have doesn't. There's no reason the driver can't be extended to add
that support.

I'd say the larger question here is "why?" Why do you think you need D3DM
anyway? What, exactly, do you feel you're going to gain by using it?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


Frankie D. said:
Should we use an other platform?

Not Intel 855 GME?
Not x86?

Frankie D. said:
You need to modify the driver to add that support

I get the driver in a Board Support Package. It seems to be hard work to
modify it.

regards,

Frankie



Chris Tacke said:
Look at the source for the driver. My bet is that it doesn't which is
why
you see that error. You need to modify the driver to add that support
(and
it may or may not be trivial).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

Thank you for your answer. How can I Check It?

I have Intel 855 GME.

regards,

Frankie

:

Does your device actually support D3DM? You can't just pull in the
catalog
item and expect it to work. The display driver has to actually
support
it
as well.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

I am unable to create d3dm device using PLatform Invoke.
Native code is based on TUT01_CREATEDEVICE sample of PLatform
Builder.
Return value of CreateDevice function signs failure. Why?

Please help!

Thanks in advance,

Frankie


Native code:

extern "C" DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd );

...


DIRECTXNATIVE_API HRESULT InitD3DM( HWND hWnd )
{

g_pD3DM = Direct3DMobileCreate( D3DM_SDK_VERSION )


D3DMPRESENT_PARAMETERS d3dmpp;
memset( &d3dmpp, 0, sizeof(d3dmpp) );
d3dmpp.Windowed = TRUE;
d3dmpp.SwapEffect = D3DMSWAPEFFECT_DISCARD;
d3dmpp.BackBufferFormat = D3DMFMT_UNKNOWN;

// Create the Direct3D Mobile device.
UINT uAdapter;


// Use the default system D3DM driver
uAdapter = D3DMADAPTER_DEFAULT;

if( FAILED( g_pD3DM->CreateDevice( uAdapter,
D3DMDEVTYPE_DEFAULT,
hWnd, 0,
&d3dmpp, &g_pd3dmDevice ) ) )
{
OutputDebugString(TEXT("Unable to create a D3DM
device.\n"));
return E_FAIL;
}

// Device state would normally be set here

return S_OK;
}

Managed Code:

#include <d3dm.h>

LPDIRECT3DMOBILE g_pD3DM = NULL; // Used to create
the
D3DMDevice
LPDIRECT3DMOBILEDEVICE g_pd3dmDevice = NULL; // Our rendering
device
HMODULE g_hRefDLL = NULL; // DLL handle for
d3dmref.dll
bool g_bUseRef = false; // Flag denoting
use of
d3dmref

public partial class Form1 : Form
{

[DllImport("DirectXNative.dll", EntryPoint = "InitD3DM",
SetLastError
=
true)]
static extern UInt32 InitD3DM( IntPtr hWnd );

public Form1()
{
InitializeComponent();
InitD3DM(this.Handle);
}

}
 
Top