Hello,

I am new to Pocket PC development. I have been developing in VC++.NET for
desktop.

I am trying to run a "Hello World" example in VS 2005 for Pocket PC. If I
use C#, the project set up is staightforward. But when I choose to use C++, I
can set up a win32 smart application project in native code only. I don't see
how I can use .Net class libraries to develop code. The tutorial video from
Microsoft explained that it's trickier to do Pocket PC development in C++.
Does this mean MS prefer people to use C#?

Thanks.
David

Re: VC++ development in WM5 .Net compact framework by Peter

Peter
Mon Nov 21 17:18:12 CST 2005

Your choices are either managed code with C# or native code with C++.
Managed C++ isn't supported for the compact framework.

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net

"wdli" <wdli@discussions.microsoft.com> wrote in message
news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
> Hello,
>
> I am new to Pocket PC development. I have been developing in VC++.NET for
> desktop.
>
> I am trying to run a "Hello World" example in VS 2005 for Pocket PC. If I
> use C#, the project set up is staightforward. But when I choose to use
> C++, I
> can set up a win32 smart application project in native code only. I don't
> see
> how I can use .Net class libraries to develop code. The tutorial video
> from
> Microsoft explained that it's trickier to do Pocket PC development in C++.
> Does this mean MS prefer people to use C#?
>
> Thanks.
> David
>



Re: VC++ development in WM5 .Net compact framework by wdli

wdli
Mon Nov 21 17:28:02 CST 2005


Thanks for clarification. I perfer managed code for its easy of use.

What's about performance between C++ and C# on pocket PCs? Is C++ better?

David

"Peter Foot [MVP]" wrote:

> Your choices are either managed code with C# or native code with C++.
> Managed C++ isn't supported for the compact framework.
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> http://www.inthehand.com | http://www.peterfoot.net
>
> "wdli" <wdli@discussions.microsoft.com> wrote in message
> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
> > Hello,
> >
> > I am new to Pocket PC development. I have been developing in VC++.NET for
> > desktop.
> >
> > I am trying to run a "Hello World" example in VS 2005 for Pocket PC. If I
> > use C#, the project set up is staightforward. But when I choose to use
> > C++, I
> > can set up a win32 smart application project in native code only. I don't
> > see
> > how I can use .Net class libraries to develop code. The tutorial video
> > from
> > Microsoft explained that it's trickier to do Pocket PC development in C++.
> > Does this mean MS prefer people to use C#?
> >
> > Thanks.
> > David
> >
>
>
>

Re: VC++ development in WM5 .Net compact framework by Peter

Peter
Tue Nov 22 04:18:25 CST 2005

Because .NETCF code is JIT compiled it will naturally be slower than native
machine code. But whether this is an issue really depends on what you are
writing. Managed code has the advantage of being much quicker and easier to
develop with especially for common tasks like building forms. There are some
scenarios where you have to use native code regardless of preference such as
services, drivers and shell extensions such as today plugins.

So the answer to which is best is very much "it depends"

Peter

--
Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

"wdli" <wdli@discussions.microsoft.com> wrote in message
news:45FE9037-90C4-4AF3-9318-660C89436AFD@microsoft.com...
>
> Thanks for clarification. I perfer managed code for its easy of use.
>
> What's about performance between C++ and C# on pocket PCs? Is C++ better?
>
> David
>
> "Peter Foot [MVP]" wrote:
>
>> Your choices are either managed code with C# or native code with C++.
>> Managed C++ isn't supported for the compact framework.
>>
>> Peter
>>
>> --
>> Peter Foot
>> Windows Embedded MVP
>> http://www.inthehand.com | http://www.peterfoot.net
>>
>> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
>> > Hello,
>> >
>> > I am new to Pocket PC development. I have been developing in VC++.NET
>> > for
>> > desktop.
>> >
>> > I am trying to run a "Hello World" example in VS 2005 for Pocket PC. If
>> > I
>> > use C#, the project set up is staightforward. But when I choose to use
>> > C++, I
>> > can set up a win32 smart application project in native code only. I
>> > don't
>> > see
>> > how I can use .Net class libraries to develop code. The tutorial video
>> > from
>> > Microsoft explained that it's trickier to do Pocket PC development in
>> > C++.
>> > Does this mean MS prefer people to use C#?
>> >
>> > Thanks.
>> > David
>> >
>>
>>
>>



Re: VC++ development in WM5 .Net compact framework by wdli

wdli
Tue Nov 22 08:22:04 CST 2005

Is it possible (or how easy is it) to get the best of both worlds - use
.NETCF to do forms but switch to native to do drivers etc. Then link both
together as a single exe.

Any good articles on this subject?

David

"Peter Foot [MVP]" wrote:

> Because .NETCF code is JIT compiled it will naturally be slower than native
> machine code. But whether this is an issue really depends on what you are
> writing. Managed code has the advantage of being much quicker and easier to
> develop with especially for common tasks like building forms. There are some
> scenarios where you have to use native code regardless of preference such as
> services, drivers and shell extensions such as today plugins.
>
> So the answer to which is best is very much "it depends"
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.peterfoot.net | www.inthehand.com
>
> "wdli" <wdli@discussions.microsoft.com> wrote in message
> news:45FE9037-90C4-4AF3-9318-660C89436AFD@microsoft.com...
> >
> > Thanks for clarification. I perfer managed code for its easy of use.
> >
> > What's about performance between C++ and C# on pocket PCs? Is C++ better?
> >
> > David
> >
> > "Peter Foot [MVP]" wrote:
> >
> >> Your choices are either managed code with C# or native code with C++.
> >> Managed C++ isn't supported for the compact framework.
> >>
> >> Peter
> >>
> >> --
> >> Peter Foot
> >> Windows Embedded MVP
> >> http://www.inthehand.com | http://www.peterfoot.net
> >>
> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
> >> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
> >> > Hello,
> >> >
> >> > I am new to Pocket PC development. I have been developing in VC++.NET
> >> > for
> >> > desktop.
> >> >
> >> > I am trying to run a "Hello World" example in VS 2005 for Pocket PC. If
> >> > I
> >> > use C#, the project set up is staightforward. But when I choose to use
> >> > C++, I
> >> > can set up a win32 smart application project in native code only. I
> >> > don't
> >> > see
> >> > how I can use .Net class libraries to develop code. The tutorial video
> >> > from
> >> > Microsoft explained that it's trickier to do Pocket PC development in
> >> > C++.
> >> > Does this mean MS prefer people to use C#?
> >> >
> >> > Thanks.
> >> > David
> >> >
> >>
> >>
> >>
>
>
>

Re: VC++ development in WM5 .Net compact framework by Chris

Chris
Tue Nov 22 09:16:16 CST 2005

That really depends on what you mean. A driver, by nature, can't be an EXE,
it's a DLL that runs under device.exe, and must be written in native code.
You can use P/Invoke to communicate between managed and unmanaged code, so I
think the answer to your question is probably "yes."

Also, FWIW I've shown that managed code can be just as fast as native code
at the hardware level, so once you paid the price for the JIT compile,
you're not losing anything (well there are caveats to that - method calls
are more expensive). A white paper on MSDN is forthcoming.

--
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


"wdli" <wdli@discussions.microsoft.com> wrote in message
news:42EB1B60-EC1D-4FDB-A268-6B692F6F7BAF@microsoft.com...
> Is it possible (or how easy is it) to get the best of both worlds - use
> .NETCF to do forms but switch to native to do drivers etc. Then link both
> together as a single exe.
>
> Any good articles on this subject?
>
> David
>
> "Peter Foot [MVP]" wrote:
>
>> Because .NETCF code is JIT compiled it will naturally be slower than
>> native
>> machine code. But whether this is an issue really depends on what you are
>> writing. Managed code has the advantage of being much quicker and easier
>> to
>> develop with especially for common tasks like building forms. There are
>> some
>> scenarios where you have to use native code regardless of preference such
>> as
>> services, drivers and shell extensions such as today plugins.
>>
>> So the answer to which is best is very much "it depends"
>>
>> Peter
>>
>> --
>> Peter Foot
>> Windows Embedded MVP
>> www.peterfoot.net | www.inthehand.com
>>
>> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> news:45FE9037-90C4-4AF3-9318-660C89436AFD@microsoft.com...
>> >
>> > Thanks for clarification. I perfer managed code for its easy of use.
>> >
>> > What's about performance between C++ and C# on pocket PCs? Is C++
>> > better?
>> >
>> > David
>> >
>> > "Peter Foot [MVP]" wrote:
>> >
>> >> Your choices are either managed code with C# or native code with C++.
>> >> Managed C++ isn't supported for the compact framework.
>> >>
>> >> Peter
>> >>
>> >> --
>> >> Peter Foot
>> >> Windows Embedded MVP
>> >> http://www.inthehand.com | http://www.peterfoot.net
>> >>
>> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> >> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
>> >> > Hello,
>> >> >
>> >> > I am new to Pocket PC development. I have been developing in
>> >> > VC++.NET
>> >> > for
>> >> > desktop.
>> >> >
>> >> > I am trying to run a "Hello World" example in VS 2005 for Pocket PC.
>> >> > If
>> >> > I
>> >> > use C#, the project set up is staightforward. But when I choose to
>> >> > use
>> >> > C++, I
>> >> > can set up a win32 smart application project in native code only. I
>> >> > don't
>> >> > see
>> >> > how I can use .Net class libraries to develop code. The tutorial
>> >> > video
>> >> > from
>> >> > Microsoft explained that it's trickier to do Pocket PC development
>> >> > in
>> >> > C++.
>> >> > Does this mean MS prefer people to use C#?
>> >> >
>> >> > Thanks.
>> >> > David
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>



Re: VC++ development in WM5 .Net compact framework by wdli

wdli
Tue Nov 22 12:31:05 CST 2005

So I think both managed and native code can be used at the same time - use
managed to develop GUI & high-level apps and use native when necessary to
write drivers or low-level stuff. They are separate entities in the embedded
world anyway.

Look forward to your whitepaper.

David


"Chris Tacke, eMVP" wrote:

> That really depends on what you mean. A driver, by nature, can't be an EXE,
> it's a DLL that runs under device.exe, and must be written in native code.
> You can use P/Invoke to communicate between managed and unmanaged code, so I
> think the answer to your question is probably "yes."
>
> Also, FWIW I've shown that managed code can be just as fast as native code
> at the hardware level, so once you paid the price for the JIT compile,
> you're not losing anything (well there are caveats to that - method calls
> are more expensive). A white paper on MSDN is forthcoming.
>
> --
> 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
>
>
> "wdli" <wdli@discussions.microsoft.com> wrote in message
> news:42EB1B60-EC1D-4FDB-A268-6B692F6F7BAF@microsoft.com...
> > Is it possible (or how easy is it) to get the best of both worlds - use
> > .NETCF to do forms but switch to native to do drivers etc. Then link both
> > together as a single exe.
> >
> > Any good articles on this subject?
> >
> > David
> >
> > "Peter Foot [MVP]" wrote:
> >
> >> Because .NETCF code is JIT compiled it will naturally be slower than
> >> native
> >> machine code. But whether this is an issue really depends on what you are
> >> writing. Managed code has the advantage of being much quicker and easier
> >> to
> >> develop with especially for common tasks like building forms. There are
> >> some
> >> scenarios where you have to use native code regardless of preference such
> >> as
> >> services, drivers and shell extensions such as today plugins.
> >>
> >> So the answer to which is best is very much "it depends"
> >>
> >> Peter
> >>
> >> --
> >> Peter Foot
> >> Windows Embedded MVP
> >> www.peterfoot.net | www.inthehand.com
> >>
> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
> >> news:45FE9037-90C4-4AF3-9318-660C89436AFD@microsoft.com...
> >> >
> >> > Thanks for clarification. I perfer managed code for its easy of use.
> >> >
> >> > What's about performance between C++ and C# on pocket PCs? Is C++
> >> > better?
> >> >
> >> > David
> >> >
> >> > "Peter Foot [MVP]" wrote:
> >> >
> >> >> Your choices are either managed code with C# or native code with C++.
> >> >> Managed C++ isn't supported for the compact framework.
> >> >>
> >> >> Peter
> >> >>
> >> >> --
> >> >> Peter Foot
> >> >> Windows Embedded MVP
> >> >> http://www.inthehand.com | http://www.peterfoot.net
> >> >>
> >> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
> >> >> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
> >> >> > Hello,
> >> >> >
> >> >> > I am new to Pocket PC development. I have been developing in
> >> >> > VC++.NET
> >> >> > for
> >> >> > desktop.
> >> >> >
> >> >> > I am trying to run a "Hello World" example in VS 2005 for Pocket PC.
> >> >> > If
> >> >> > I
> >> >> > use C#, the project set up is staightforward. But when I choose to
> >> >> > use
> >> >> > C++, I
> >> >> > can set up a win32 smart application project in native code only. I
> >> >> > don't
> >> >> > see
> >> >> > how I can use .Net class libraries to develop code. The tutorial
> >> >> > video
> >> >> > from
> >> >> > Microsoft explained that it's trickier to do Pocket PC development
> >> >> > in
> >> >> > C++.
> >> >> > Does this mean MS prefer people to use C#?
> >> >> >
> >> >> > Thanks.
> >> >> > David
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: VC++ development in WM5 .Net compact framework by Chris

Chris
Tue Nov 22 12:43:48 CST 2005

Yep, that's the gist of it. With what we have today, I think it's near
impossible to provide a great solution to almost any problem without a mix
of both managed and unmanaged code. CF 2.0 made it a better story, but we'll
never get away from P/Invokes.

--
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


"wdli" <wdli@discussions.microsoft.com> wrote in message
news:69D4D831-C0FB-4D5F-B007-739081AF8FF5@microsoft.com...
> So I think both managed and native code can be used at the same time - use
> managed to develop GUI & high-level apps and use native when necessary to
> write drivers or low-level stuff. They are separate entities in the
> embedded
> world anyway.
>
> Look forward to your whitepaper.
>
> David
>
>
> "Chris Tacke, eMVP" wrote:
>
>> That really depends on what you mean. A driver, by nature, can't be an
>> EXE,
>> it's a DLL that runs under device.exe, and must be written in native
>> code.
>> You can use P/Invoke to communicate between managed and unmanaged code,
>> so I
>> think the answer to your question is probably "yes."
>>
>> Also, FWIW I've shown that managed code can be just as fast as native
>> code
>> at the hardware level, so once you paid the price for the JIT compile,
>> you're not losing anything (well there are caveats to that - method calls
>> are more expensive). A white paper on MSDN is forthcoming.
>>
>> --
>> 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
>>
>>
>> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> news:42EB1B60-EC1D-4FDB-A268-6B692F6F7BAF@microsoft.com...
>> > Is it possible (or how easy is it) to get the best of both worlds - use
>> > .NETCF to do forms but switch to native to do drivers etc. Then link
>> > both
>> > together as a single exe.
>> >
>> > Any good articles on this subject?
>> >
>> > David
>> >
>> > "Peter Foot [MVP]" wrote:
>> >
>> >> Because .NETCF code is JIT compiled it will naturally be slower than
>> >> native
>> >> machine code. But whether this is an issue really depends on what you
>> >> are
>> >> writing. Managed code has the advantage of being much quicker and
>> >> easier
>> >> to
>> >> develop with especially for common tasks like building forms. There
>> >> are
>> >> some
>> >> scenarios where you have to use native code regardless of preference
>> >> such
>> >> as
>> >> services, drivers and shell extensions such as today plugins.
>> >>
>> >> So the answer to which is best is very much "it depends"
>> >>
>> >> Peter
>> >>
>> >> --
>> >> Peter Foot
>> >> Windows Embedded MVP
>> >> www.peterfoot.net | www.inthehand.com
>> >>
>> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> >> news:45FE9037-90C4-4AF3-9318-660C89436AFD@microsoft.com...
>> >> >
>> >> > Thanks for clarification. I perfer managed code for its easy of use.
>> >> >
>> >> > What's about performance between C++ and C# on pocket PCs? Is C++
>> >> > better?
>> >> >
>> >> > David
>> >> >
>> >> > "Peter Foot [MVP]" wrote:
>> >> >
>> >> >> Your choices are either managed code with C# or native code with
>> >> >> C++.
>> >> >> Managed C++ isn't supported for the compact framework.
>> >> >>
>> >> >> Peter
>> >> >>
>> >> >> --
>> >> >> Peter Foot
>> >> >> Windows Embedded MVP
>> >> >> http://www.inthehand.com | http://www.peterfoot.net
>> >> >>
>> >> >> "wdli" <wdli@discussions.microsoft.com> wrote in message
>> >> >> news:C5AD786F-CA04-4D2C-8AC1-F8BFBA87180B@microsoft.com...
>> >> >> > Hello,
>> >> >> >
>> >> >> > I am new to Pocket PC development. I have been developing in
>> >> >> > VC++.NET
>> >> >> > for
>> >> >> > desktop.
>> >> >> >
>> >> >> > I am trying to run a "Hello World" example in VS 2005 for Pocket
>> >> >> > PC.
>> >> >> > If
>> >> >> > I
>> >> >> > use C#, the project set up is staightforward. But when I choose
>> >> >> > to
>> >> >> > use
>> >> >> > C++, I
>> >> >> > can set up a win32 smart application project in native code only.
>> >> >> > I
>> >> >> > don't
>> >> >> > see
>> >> >> > how I can use .Net class libraries to develop code. The tutorial
>> >> >> > video
>> >> >> > from
>> >> >> > Microsoft explained that it's trickier to do Pocket PC
>> >> >> > development
>> >> >> > in
>> >> >> > C++.
>> >> >> > Does this mean MS prefer people to use C#?
>> >> >> >
>> >> >> > Thanks.
>> >> >> > David
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>