For Programmers: Free Programming Magazines  


Home > Archive > C# > December 2005 > InvalidDeviceException









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author InvalidDeviceException
Cloud Strife

2005-12-12, 8:17 am

I'm developing an application for Windows CE 5.0 with Visual Studio .NET
2005
i want to try WindowsMobile.DirectX features, but i'm already stuck in
device initialization!

this is the function that initialize device

public bool InitializeGraphics()
{
try
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;

device = new Device(0, DeviceType.Default, this,
CreateFlags.MultiThreaded, presentParams);
return true;
}
catch (Exception e)
{
MessageBox.Show("The sample has run into an error " +
"and needs to close: " + e.Message);
return false;
}
}

when application reach the Device constructor it throws
"InvalidDeviceException".

why?

i have to do something at OS with platform builder ?

thanks
Ilya Tumanov [MS]

2005-12-12, 10:10 pm

That's only available on WM 5.0.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group...framework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Cloud Strife" <C_strife@midgard.com> wrote in message
news:CJenf.30075$z_6.1155@tornado.fastwebnet.it...
> I'm developing an application for Windows CE 5.0 with Visual Studio .NET
> 2005
> i want to try WindowsMobile.DirectX features, but i'm already stuck in
> device initialization!
>
> this is the function that initialize device
>
> public bool InitializeGraphics()
> {
> try
> {
> PresentParameters presentParams = new PresentParameters();
> presentParams.Windowed = true;
> presentParams.SwapEffect = SwapEffect.Discard;
>
> device = new Device(0, DeviceType.Default, this,
> CreateFlags.MultiThreaded, presentParams);
> return true;
> }
> catch (Exception e)
> {
> MessageBox.Show("The sample has run into an error " + "and
> needs to close: " + e.Message);
> return false;
> }
> }
>
> when application reach the Device constructor it throws
> "InvalidDeviceException".
>
> why?
>
> i have to do something at OS with platform builder ?
>
> thanks



Cloud Strife

2005-12-13, 4:13 am

Ilya Tumanov [MS] ha scritto:
> That's only available on WM 5.0.
>
>
> Best regards,
>
> Ilya
>


what is windows mobile?
what's the difference between WM and WCE?

how can i upgrade from windows CE to windows mobile ?
Ilya Tumanov [MS]

2005-12-13, 9:57 pm

Windows CE is highly customizable real time OS, WM is a particular
customization of this OS. WM is intended for PDA/Phone class devices.

It has special simplified UI, PIM features (e.g. Pocket Outlook), supports
only particular screen resolutions and had predetermined API set.

Various APIs on WM targeting end users like outlook e-mail access business
customers and D3DM for gaming support.

You don't "upgrade" from Windows CE to WM, you purchase device with WM
installed.

However, I would guess you have a custom embedded devices, right?


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group...framework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Cloud Strife" <C_strife@midgard.com> wrote in message
news:aKwnf.1420$Cn4.73@tornado.fastwebnet.it...
> Ilya Tumanov [MS] ha scritto:
>
> what is windows mobile?
> what's the difference between WM and WCE?
>
> how can i upgrade from windows CE to windows mobile ?



Cloud Strife

2005-12-15, 7:57 am

Ilya Tumanov [MS] ha scritto:
>
> However, I would guess you have a custom embedded devices, right?
>
>
> Best regards,
>
> Ilya


yes, i use an x86 device.
i have platform builder for windows CE 5.0 and i'm developing an
application with visual studio .net 2005 / c#.

you said that WM is a particula WCE customization.
i imagine that i can use D3DM on an OS that is "parent" of WM

but how?

thanks
Chris Tacke, eMVP

2005-12-15, 7:01 pm

No, D3DM is part of the WM 5.0 platform, not part of CE, so it's only
available under WM 5.0.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"Cloud Strife" <C_strife@midgard.com> wrote in message
news:6O9of.5295$Cn4.3393@tornado.fastwebnet.it...
> Ilya Tumanov [MS] ha scritto:
>
> yes, i use an x86 device.
> i have platform builder for windows CE 5.0 and i'm developing an
> application with visual studio .net 2005 / c#.
>
> you said that WM is a particula WCE customization.
> i imagine that i can use D3DM on an OS that is "parent" of WM
>
> but how?
>
> thanks



Cloud Strife

2005-12-16, 3:57 am

Chris Tacke, eMVP ha scritto:
> No, D3DM is part of the WM 5.0 platform, not part of CE, so it's only
> available under WM 5.0.
>


is there some libraries that wrap the windows CE directx for their usage
from managed code?

i've the need to use them

thanks
bye

ps Ilya said that WM is a customization of WCE but if you said that WCE
don't support D3DM while WM does it means that it is not a simply
customization... am i wrong?

2005-12-16, 7:57 am

Unfortunately no.

-Chris


"Cloud Strife" <C_strife@midgard.com> wrote in message
news:EAuof.7072$Cn4.4330@tornado.fastwebnet.it...
> Chris Tacke, eMVP ha scritto:
>
> is there some libraries that wrap the windows CE directx for their usage
> from managed code?
>
> i've the need to use them
>
> thanks
> bye
>
> ps Ilya said that WM is a customization of WCE but if you said that WCE
> don't support D3DM while WM does it means that it is not a simply
> customization... am i wrong?



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com