Novice Questions on .NET Compact Framework

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello Friend,

Thanks for reviewing my question. Am I right to assume
that I can use C# for the .NET Compact Framework?

I noticed that there is support in the .NET Compact
Framework for Smart Cards. Can I also assume that C#
supports Smart Cards?

Can I assume what ever is in the .NET Compact Framework
is also in the .NET Framework?

Many Thanks
Peter
 
Hi, answers inline:-

Peter said:
Hello Friend,

Thanks for reviewing my question. Am I right to assume
that I can use C# for the .NET Compact Framework?

Yes you can as long as it is part of Visual Studio 2003 Professional or
above. You cannot use the single language C# product.
I noticed that there is support in the .NET Compact
Framework for Smart Cards. Can I also assume that C#
supports Smart Cards?

There are no SmartCard specific API's in the Compact Framework (If you are
talking about the smart chip on a creditcard sized device - used in
security, epayements etc). However if you mean Flash Cards then yes reading
and writing from them is fully supported.
Can I assume what ever is in the .NET Compact Framework
is also in the .NET Framework?

Almost always. However the Compact Framework includes a couple of items not
present in the full framework -
* System.Net.IrDA for InfraRed support
* Microsoft.WindowsCE library which adds support for soft input panels and
some compact framework specific messaging
* System.Data.SqlServerCE database provider.
Otherwise the Compact Framework is a subset of the full .NET Framework.

Peter
 
Windows CE.NET is the name of the Windows CE Operating System from version
4.0 onwards. It is different to the .NET Compact Framework which is a
framework which can run on Windows CE.NET and Pocket PC devices (Which are
based on Windows CE 3.0).

Windows CE.NET does indeed have a SmartCard API available, however whether
it is supported on your device depends on the components chosen by the
manufacturer (Windows CE is a modular operating system). Pocket PCs for
example won't contain the SmartCard API.

For a suitably equipped device you can possibly call the smart card API
methods by using Platform Invoke (P/Invoke) through .NETCF (there are no
classes in the Compact Framework itself).

Peter

--
Peter Foot
Windows Embedded MVP

www.inthehand.com | www.opennetcf.org

Peter,

Thanks for reply. The reason I ask is in the Online Help
it mentions Smart Card subsystem as a part of the Windows
CE .NET and thus I assumed I could develop Smart Card
Apps using C#.

How can you explain the references in the MS Win CE .NET
help? (See below)

Thanks again.
Peter

On a device that is based on Microsoft® Windows® CE .NET,
the smart card subsystem provides a link between smart
card reader hardware and applications that are smart-card-
aware. This link consists of dynamic-link libraries
(DLLs), the smart card resource manager application
programming interface (API), and the smart card reader
hardware device drivers. The smart card subsystem
supports CryptoAPI and the Windows CE-based device driver
model.
 
Smart Device Application is what you would use in the VS.NET ***2003***
environment. Note that you cannot use single-product versions of the tools
for this (VB.NET by itself, for example, doesn't work).

It's unclear where MS is going long-term with eVC++, but, no they are *not*
going to force everyone to use managed code, at some point. There will
always be a native code C++ compiler for targeting the Windows CE-supported
processors.

I'm not sure what you mean by "embedded support in VS.NET". You *cannot*
use VS.NET to develop a C++ application, or any native code application, for
any Windows CE-based device.

Paul T.

Peter,

If I want to develop for .NET Compact for Windows CE,
which project template do I select in VS.NET? Is there
one?

Also, can you point me to sources that explain how to use
the Invoke in the .NET or is it so general that it would
be covered in a book?

Ultimately, I would like to develop .NET applications for
CE but need to support Smart Cards. I am confused on
which compiler to use, VS.NET or Embedded C++ 4.0.
Is Embedded VC++ just a interim solution for MS until
the .NET compiler supports? Is there any embedded
support in VS.NET?

Again, I appreciate your help.

Peter
 
In Visual Studio .NET 2003 select Smart Device Application as your project
type under either Visual C# Projects or Visual Basic Projects. If this is
not present then you will need to add in the Smart Device Programmability
option to Visual Studio .NET using the Add/Remove programs applet in Control
Panel.
Selecting Smart Device Application will launch a wizard which will prompt
for application type (Windows Executable, Class Library) and platform
(CE.NET or Pocket PC)
There is a good introductory article on P/Invoke here:-
http://smartdevices.microsoftdev.com/Learn/Articles/501.aspx
You may find some of the other articles at that site useful also.

For examples of P/Invoke in action you may be interested to see the WinAPI
open-source project at OpenNETCF - (www.opennetcf.org/winapi.asp) which has
P/Invoked functions for much of the core windows CE API functions.

If you are interested to see Microsoft's roadmap for tools over the next few
years take a look at
(http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx#whidbey) - the
next major release of Visual Studio "Whidbey" will support C++ native
development in the same IDE. So while the eVC product may well be retired in
due course (the roadmap does not give exact release dates) if you are
developing in C++ with eVC your code can be used in the future Visual Studio
version.


Peter

--
Peter Foot
Windows Embedded MVP

www.inthehand.com | www.opennetcf.org

Peter,

If I want to develop for .NET Compact for Windows CE,
which project template do I select in VS.NET? Is there
one?

Also, can you point me to sources that explain how to use
the Invoke in the .NET or is it so general that it would
be covered in a book?

Ultimately, I would like to develop .NET applications for
CE but need to support Smart Cards. I am confused on
which compiler to use, VS.NET or Embedded C++ 4.0.
Is Embedded VC++ just a interim solution for MS until
the .NET compiler supports? Is there any embedded
support in VS.NET?

Again, I appreciate your help.

Peter
 
Back
Top