Hi all,

I am a newbie on Pocket PC programming. I have been doing quite a bit of
research recently and have a few questions.

I was going to write in .NET (probably C#) as I have good knowledge of this
in an ASP.NET environment. However, reading vaious forums suggests that this
is quite slow compared to native code using Visual C++ (eVC++)

I have downloaded eVC++ and after about 4 days, managed to get a working
hello world app running. (Things missing, hardly any getting started guides
on the net and other stuff... I downloaded MANY MBs of different software to
get it going.)

So, here is what I want to do. I am concerned about the speed, hence the
reason I am looking at eVC, but as I don't have any background experience in
C++, will probably struggle to get anywhere.

eMbedded Visual Tools comes with visual basic as well as C++.
Would VB built with eVB also be faster than .NET?

Are there any eVC programming tutorials around that will help me to get to
grips with the language? (for example, step by step to creating some simple
applications, the step by step being suitable for a newbie. I have yet to
find anything.)

Can eVC and eVB easily communicate with .NET webservices?

Ultimately, I will also want to communicate directly with the inbuilt phone
hardware / software, such as communicating with the RIL and getting the IMEI
information. I know that .NET cannot connect to the RIL properly.

Parts of the app I want to build could be done in .NET, others in C++. Is
there easy ways of communicating, for example, if I were to write a C++ app
that contacted the RIL, could I get the C# app to talk to my C++ app to get
the information?

I will probably have many more questions, but these will help me to make an
informed decision as to which way I should go. Aside from these, your advice
would probably be useful.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available

Re: Development environments by ctacke/>

ctacke/>
Sun Dec 02 11:21:26 PST 2007

Several points:

1. Managed code being slower than native is a myth. It's slower to start,
but execution is often just as fast (I've done tests with an oscilloscope
and you can't see any difference on a microsecond level. Managed code is
only slower when JITting is necessary, once JITted, it's machine code, just
like compiled C.

2. If you want to do C/C++ development, Visual Studio supports it - don't
use the older eVC tools. They're deprecated.

3. eVB is dead and shouldn't be considered for any development.

4. eVB was interpreted and was certainly much slower than C/C++.

5. Go through the online examples for P/Invoke as well as passing delegates
for callbacks. Those are the most common managed/native interfaces you'll
use.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
news:ObOFbpONIHA.2308@TK2MSFTNGP05.phx.gbl...
> Hi all,
>
> I am a newbie on Pocket PC programming. I have been doing quite a bit of
> research recently and have a few questions.
>
> I was going to write in .NET (probably C#) as I have good knowledge of
> this in an ASP.NET environment. However, reading vaious forums suggests
> that this is quite slow compared to native code using Visual C++ (eVC++)
>
> I have downloaded eVC++ and after about 4 days, managed to get a working
> hello world app running. (Things missing, hardly any getting started
> guides on the net and other stuff... I downloaded MANY MBs of different
> software to get it going.)
>
> So, here is what I want to do. I am concerned about the speed, hence the
> reason I am looking at eVC, but as I don't have any background experience
> in C++, will probably struggle to get anywhere.
>
> eMbedded Visual Tools comes with visual basic as well as C++.
> Would VB built with eVB also be faster than .NET?
>
> Are there any eVC programming tutorials around that will help me to get to
> grips with the language? (for example, step by step to creating some
> simple applications, the step by step being suitable for a newbie. I have
> yet to find anything.)
>
> Can eVC and eVB easily communicate with .NET webservices?
>
> Ultimately, I will also want to communicate directly with the inbuilt
> phone hardware / software, such as communicating with the RIL and getting
> the IMEI information. I know that .NET cannot connect to the RIL properly.
>
> Parts of the app I want to build could be done in .NET, others in C++. Is
> there easy ways of communicating, for example, if I were to write a C++
> app that contacted the RIL, could I get the C# app to talk to my C++ app
> to get the information?
>
> I will probably have many more questions, but these will help me to make
> an informed decision as to which way I should go. Aside from these, your
> advice would probably be useful.
>
> --
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>



Re: Development environments by David

David
Sun Dec 02 12:52:38 PST 2007

Hi,

Thanks for your response. It is welcome.

This is the first project that I will have done on a smartphone and it could
be a large project. The startup (JIT) could still be enough to make the
project a non-starter (so to speak). What I don't want to do is to spend
months writing this (very specialised) software only to have to abandon it
due to speed issues.

So, with respect to the above, is there any way that once it has been
jitted, that I can keep the jit rather than it being built when neccessary.

I would be happier to write the app in C# as I am more comfortable with it.



Looking on most of the forums, many are suggesting C++, especially as one of
the apps I want to write will be interacting with the RIL. I understand that
unless there is a managed wrapper somewhere for the RIL that I can't do
anything with C#. Any thoughts?

I have just had a look at the URL in your signature. I guess my favourites
are going to get a bit fatter now. :-)

As for developing with eVC++ (4.0), I am really struggling to get a start. I
can't find any real getting started guides that will lead me through to
writing applications from scratch. I guess the syntax wouldn't be such a
problem (once I get used to it), but not knowing the include files and not
having code completion is making it harder. If you know of any starting
points, that would be appreciated.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:eYXtJiRNIHA.1212@TK2MSFTNGP05.phx.gbl...
> Several points:
>
> 1. Managed code being slower than native is a myth. It's slower to start,
> but execution is often just as fast (I've done tests with an oscilloscope
> and you can't see any difference on a microsecond level. Managed code is
> only slower when JITting is necessary, once JITted, it's machine code,
> just like compiled C.
>
> 2. If you want to do C/C++ development, Visual Studio supports it - don't
> use the older eVC tools. They're deprecated.
>
> 3. eVB is dead and shouldn't be considered for any development.
>
> 4. eVB was interpreted and was certainly much slower than C/C++.
>
> 5. Go through the online examples for P/Invoke as well as passing
> delegates for callbacks. Those are the most common managed/native
> interfaces you'll use.
>
>
> --
>
> Chris Tacke, eMVP
> Join the Embedded Developer Community
> http://community.opennetcf.com
>
>
>
> "David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
> news:ObOFbpONIHA.2308@TK2MSFTNGP05.phx.gbl...
>> Hi all,
>>
>> I am a newbie on Pocket PC programming. I have been doing quite a bit of
>> research recently and have a few questions.
>>
>> I was going to write in .NET (probably C#) as I have good knowledge of
>> this in an ASP.NET environment. However, reading vaious forums suggests
>> that this is quite slow compared to native code using Visual C++ (eVC++)
>>
>> I have downloaded eVC++ and after about 4 days, managed to get a working
>> hello world app running. (Things missing, hardly any getting started
>> guides on the net and other stuff... I downloaded MANY MBs of different
>> software to get it going.)
>>
>> So, here is what I want to do. I am concerned about the speed, hence the
>> reason I am looking at eVC, but as I don't have any background experience
>> in C++, will probably struggle to get anywhere.
>>
>> eMbedded Visual Tools comes with visual basic as well as C++.
>> Would VB built with eVB also be faster than .NET?
>>
>> Are there any eVC programming tutorials around that will help me to get
>> to grips with the language? (for example, step by step to creating some
>> simple applications, the step by step being suitable for a newbie. I have
>> yet to find anything.)
>>
>> Can eVC and eVB easily communicate with .NET webservices?
>>
>> Ultimately, I will also want to communicate directly with the inbuilt
>> phone hardware / software, such as communicating with the RIL and getting
>> the IMEI information. I know that .NET cannot connect to the RIL
>> properly.
>>
>> Parts of the app I want to build could be done in .NET, others in C++. Is
>> there easy ways of communicating, for example, if I were to write a C++
>> app that contacted the RIL, could I get the C# app to talk to my C++ app
>> to get the information?
>>
>> I will probably have many more questions, but these will help me to make
>> an informed decision as to which way I should go. Aside from these, your
>> advice would probably be useful.
>>
>> --
>> Best regards,
>> Dave Colliver.
>> http://www.AshfieldFOCUS.com
>> ~~
>> http://www.FOCUSPortals.com - Local franchises available
>>
>
>



Re: Development environments by ctacke/>

ctacke/>
Sun Dec 02 13:15:23 PST 2007

> This is the first project that I will have done on a smartphone and it
> could be a large project. The startup (JIT) could still be enough to make
> the project a non-starter (so to speak). What I don't want to do is to
> spend months writing this (very specialised) software only to have to
> abandon it due to speed issues.

A splash screen is a typical way to avoid user confusion about log
start-ups.

> Looking on most of the forums, many are suggesting C++, especially as one
> of the apps I want to write will be interacting with the RIL. I understand
> that unless there is a managed wrapper somewhere for the RIL that I can't
> do anything with C#. Any thoughts?

There is no managed RIL interface provided in the CF. That said there are a
lot of things not there - you can always wriote your own wrapper for it.
Sure it will take a while, but you have to measure this against how long it
wioll take to develop the whole thing in native code. You can also write
your own DLL in C that does the RIL logic and export a more friendly
interface to your C# app.

> As for developing with eVC++ (4.0), I am really struggling to get a start.
> I can't find any real getting started guides that will lead me through to
> writing applications from scratch. I guess the syntax wouldn't be such a
> problem (once I get used to it), but not knowing the include files and not
> having code completion is making it harder. If you know of any starting
> points, that would be appreciated.

It's C/C++, so most desktop stuff is applicable, especially for the getting
started/hello world type stuff. Again, use Studio, not eVC. The environment
(and compiler) is nicer.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com




Re: Development environments by David

David
Sun Dec 02 14:21:38 PST 2007

Hi,

Thanks.

So, if I use studio to create C++, does that build it in native code for the
device or to .NET IL?

I will be using studio 2003.

My current target device is the HTC Touch (The Touch Dual if I can get a
Wifi device for it) which has Windows Mobile 6 on it.

I am currently going through your forum. Looks like a busy place.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:%23sQ80hSNIHA.2208@TK2MSFTNGP06.phx.gbl...
>> This is the first project that I will have done on a smartphone and it
>> could be a large project. The startup (JIT) could still be enough to make
>> the project a non-starter (so to speak). What I don't want to do is to
>> spend months writing this (very specialised) software only to have to
>> abandon it due to speed issues.
>
> A splash screen is a typical way to avoid user confusion about log
> start-ups.
>
>> Looking on most of the forums, many are suggesting C++, especially as one
>> of the apps I want to write will be interacting with the RIL. I
>> understand that unless there is a managed wrapper somewhere for the RIL
>> that I can't do anything with C#. Any thoughts?
>
> There is no managed RIL interface provided in the CF. That said there are
> a lot of things not there - you can always wriote your own wrapper for it.
> Sure it will take a while, but you have to measure this against how long
> it wioll take to develop the whole thing in native code. You can also
> write your own DLL in C that does the RIL logic and export a more friendly
> interface to your C# app.
>
>> As for developing with eVC++ (4.0), I am really struggling to get a
>> start. I can't find any real getting started guides that will lead me
>> through to writing applications from scratch. I guess the syntax wouldn't
>> be such a problem (once I get used to it), but not knowing the include
>> files and not having code completion is making it harder. If you know of
>> any starting points, that would be appreciated.
>
> It's C/C++, so most desktop stuff is applicable, especially for the
> getting started/hello world type stuff. Again, use Studio, not eVC. The
> environment (and compiler) is nicer.
>
>
> --
>
> Chris Tacke, eMVP
> Join the Embedded Developer Community
> http://community.opennetcf.com
>
>
>



Re: Development environments by Fred

Fred
Sun Dec 02 18:20:25 PST 2007

Not certain, but I think you'll be needing VS 2005 for the emulator and
debugging.

--
Regards,

Fred Chateau
fchateauAtComcastDotNet


"David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
news:%23DRKDHTNIHA.5264@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> Thanks.
>
> So, if I use studio to create C++, does that build it in native code for
> the
> device or to .NET IL?
>
> I will be using studio 2003.
>
> My current target device is the HTC Touch (The Touch Dual if I can get a
> Wifi device for it) which has Windows Mobile 6 on it.
>
> I am currently going through your forum. Looks like a busy place.
>
> --
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>
>
> "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
> news:%23sQ80hSNIHA.2208@TK2MSFTNGP06.phx.gbl...
>>> This is the first project that I will have done on a smartphone and it
>>> could be a large project. The startup (JIT) could still be enough to
>>> make the project a non-starter (so to speak). What I don't want to do is
>>> to spend months writing this (very specialised) software only to have to
>>> abandon it due to speed issues.
>>
>> A splash screen is a typical way to avoid user confusion about log
>> start-ups.
>>
>>> Looking on most of the forums, many are suggesting C++, especially as
>>> one of the apps I want to write will be interacting with the RIL. I
>>> understand that unless there is a managed wrapper somewhere for the RIL
>>> that I can't do anything with C#. Any thoughts?
>>
>> There is no managed RIL interface provided in the CF. That said there
>> are a lot of things not there - you can always wriote your own wrapper
>> for it. Sure it will take a while, but you have to measure this against
>> how long it wioll take to develop the whole thing in native code. You
>> can also write your own DLL in C that does the RIL logic and export a
>> more friendly interface to your C# app.
>>
>>> As for developing with eVC++ (4.0), I am really struggling to get a
>>> start. I can't find any real getting started guides that will lead me
>>> through to writing applications from scratch. I guess the syntax
>>> wouldn't be such a problem (once I get used to it), but not knowing the
>>> include files and not having code completion is making it harder. If you
>>> know of any starting points, that would be appreciated.
>>
>> It's C/C++, so most desktop stuff is applicable, especially for the
>> getting started/hello world type stuff. Again, use Studio, not eVC. The
>> environment (and compiler) is nicer.
>>
>>
>> --
>>
>> Chris Tacke, eMVP
>> Join the Embedded Developer Community
>> http://community.opennetcf.com
>>
>>
>>
>
>



Re: Development environments by Christopher

Christopher
Sun Dec 02 18:45:54 PST 2007

Hi,

"David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
news:%23DRKDHTNIHA.5264@TK2MSFTNGP02.phx.gbl...
> So, if I use studio to create C++, does that build it in native code for
> the
> device or to .NET IL?
>
> I will be using studio 2003.

Managed C++ etc is not supported at all, no matter what version of Visual
Studio you have.

Visual Studio .NET 2003 doesn't support native (i.e. C or C++) development
for Smart Devices (Microsoft's term for Windows CE or Windows Mobile based
devices).

The first Visual Studio version that supported native development for
Windows Mobile devices was Visual Studio 2005.

As has been mentioned this tool (and obviously the later VS2008 release)
have a large number of improvements over the earlier Embedded Visual C
products.

A common solution is to develop most of the GUI within the .NET Compact
Framework (i.e. a managed envrionment), and then "pop out" to native code
via Platform Invoke functionality to a DLL written in a native language when
managed code has difficulities/limitations not easily worked around.

Hope that helps,
Christopher Fairbairn


Re: Development environments by Fred

Fred
Mon Dec 03 02:42:14 PST 2007

Christopher,

Does that mean you can't have an unsafe code block in C# and pass parameters
back and forth?

--
Regards,

Fred Chateau
fchateauAtComcastDotNet


"Christopher Fairbairn" <christopher@christec.co.nz> wrote in message
news:2D0A1C89-F0A6-48DE-AF69-4B9B0BB40DFE@microsoft.com...
> Hi,
>
> "David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
> news:%23DRKDHTNIHA.5264@TK2MSFTNGP02.phx.gbl...
>> So, if I use studio to create C++, does that build it in native code for
>> the
>> device or to .NET IL?
>>
>> I will be using studio 2003.
>
> Managed C++ etc is not supported at all, no matter what version of Visual
> Studio you have.
>
> Visual Studio .NET 2003 doesn't support native (i.e. C or C++) development
> for Smart Devices (Microsoft's term for Windows CE or Windows Mobile based
> devices).
>
> The first Visual Studio version that supported native development for
> Windows Mobile devices was Visual Studio 2005.
>
> As has been mentioned this tool (and obviously the later VS2008 release)
> have a large number of improvements over the earlier Embedded Visual C
> products.
>
> A common solution is to develop most of the GUI within the .NET Compact
> Framework (i.e. a managed envrionment), and then "pop out" to native code
> via Platform Invoke functionality to a DLL written in a native language
> when managed code has difficulities/limitations not easily worked around.
>
> Hope that helps,
> Christopher Fairbairn



Re: Development environments by ---

---
Mon Dec 03 05:27:58 PST 2007

On Sun, 2 Dec 2007 20:52:38 -0000, "David"
<david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote:

>..As for developing with eVC++ (4.0), I am really struggling to get a start. I
>can't find any real getting started guides that will lead me through to
>writing applications from scratch. I guess the syntax wouldn't be such a
>problem (once I get used to it), but not knowing the include files and not
>having code completion is making it harder. If you know of any starting
>points, that would be appreciated...

Use the New Project wizard in eVC4.0 to create a typical Hello World application
for you. It is a completely functional skeleton application that you can use as
the basis of your application. Just start modifiying it.


Robert Scott
Ypsilanti, Michigan

Re: Development environments by ctacke/>

ctacke/>
Mon Dec 03 06:44:53 PST 2007

Managed C++ is not supported for devices, so C/C++ is always native on a
device.

Studio 2003 can't target a WM 6.0 device (though it might work with the 5.0
SDK - not sure since I'm not had '03 installed in some time).


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


"David" <david.colliver.NEWS@revilloc.REMOVETHIS.com> wrote in message
news:%23DRKDHTNIHA.5264@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> Thanks.
>
> So, if I use studio to create C++, does that build it in native code for
> the
> device or to .NET IL?
>
> I will be using studio 2003.
>
> My current target device is the HTC Touch (The Touch Dual if I can get a
> Wifi device for it) which has Windows Mobile 6 on it.
>
> I am currently going through your forum. Looks like a busy place.
>
> --
> Best regards,
> Dave Colliver.
> http://www.AshfieldFOCUS.com
> ~~
> http://www.FOCUSPortals.com - Local franchises available
>
>
> "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
> news:%23sQ80hSNIHA.2208@TK2MSFTNGP06.phx.gbl...
>>> This is the first project that I will have done on a smartphone and it
>>> could be a large project. The startup (JIT) could still be enough to
>>> make the project a non-starter (so to speak). What I don't want to do is
>>> to spend months writing this (very specialised) software only to have to
>>> abandon it due to speed issues.
>>
>> A splash screen is a typical way to avoid user confusion about log
>> start-ups.
>>
>>> Looking on most of the forums, many are suggesting C++, especially as
>>> one of the apps I want to write will be interacting with the RIL. I
>>> understand that unless there is a managed wrapper somewhere for the RIL
>>> that I can't do anything with C#. Any thoughts?
>>
>> There is no managed RIL interface provided in the CF. That said there
>> are a lot of things not there - you can always wriote your own wrapper
>> for it. Sure it will take a while, but you have to measure this against
>> how long it wioll take to develop the whole thing in native code. You
>> can also write your own DLL in C that does the RIL logic and export a
>> more friendly interface to your C# app.
>>
>>> As for developing with eVC++ (4.0), I am really struggling to get a
>>> start. I can't find any real getting started guides that will lead me
>>> through to writing applications from scratch. I guess the syntax
>>> wouldn't be such a problem (once I get used to it), but not knowing the
>>> include files and not having code completion is making it harder. If you
>>> know of any starting points, that would be appreciated.
>>
>> It's C/C++, so most desktop stuff is applicable, especially for the
>> getting started/hello world type stuff. Again, use Studio, not eVC. The
>> environment (and compiler) is nicer.
>>
>>
>> --
>>
>> Chris Tacke, eMVP
>> Join the Embedded Developer Community
>> http://community.opennetcf.com
>>
>>
>>
>
>