DEVBUZZ Homepage SmartPhone 2003 and .NETcf Primer
 
Web www.devbuzz.com
  HOME PAGE
  All Articles
  Advertise
  Consulting

 Development
  Discuss - Forums
  Still in the box?
  .Compact Framework
  Code Snippets
  SQL Server CE
  Database
  MS Resources
 Stores
  Developer Controls
  Pocket PC Hardware
  Pocket PC Software
  Pocket PC Books
  .NET CF Books
  Book Reviews
  SPB SW Discounts
  RESCO SW Discounts
 DEVBUZZ Info
  About Us
  Help
  Join our email list
  Links & Ratings
  Press & Comments
  Pocket PC version
  Software Reviews
  Hardware Reviews
 Authors
  Authors
  Article Guide
  Competitions
 Resources
  Developers
  Register
  Login

  SPB Discounts!
 Columnists
  Rick Winscot
 Past Blast
  Personal Media Ctr
  Gizmobility
  eVB Legacy
  Old news
  Hosted Software
  Wireless
  Newsletters
  Carl Davis
  Upton Au

 Pocket PC Registry
  Join the registry
  View current list
 Current Poll
Are you converting to .NET Compact Framework?
Yes, it has changed my life!
No, I'm sticking with eVB
.NET CF what's that`?

Current results
3431 votes so far
 Recent Forum Threads [goto forums]

Get Computername
read... (67 hits)


Great aid to development productivity
read... (82 hits)


ThreadingTimer sample code
read... (143 hits)


Multithreading with .NET CF
read... (194 hits)


Moving from eMbedded Visual Basic to Visual Basic .NET
read... (166 hits)


.NET Compact Framework 2.0 Service Pack 2
read... (226 hits)


Transfer Data from SQL Server 2000 to SQL Server Compact Edition
read... (298 hits)


This protocol version is not supported
read... (236 hits)


Converting Lowercase to uppercase wont work
read... (203 hits)


Direct access to MS SQL Server 2000
read... (374 hits)


Creating SDF file in Desktop
read... (513 hits)


Winsock in CF.NET
read... (316 hits)


Using Pocket Outlook to submit HTML page form with MAILTO action
read... (420 hits)


Missing file "System.Data.PocketPC.asmmeta.dll"
read... (268 hits)


HP iPAQ hw6915 Serial Port Issue
read... (309 hits)


Info on the recent forum changes
read... (341 hits)


SqlServer tools from Redgate
read... (383 hits)


Arrow keys and Hardware navigation button
read... (393 hits)


O2 XDA lls pin sync cable to comport
read... (322 hits)


Creating dynamic folders on Pocket PC OS
read... (299 hits)

Custom Windows Mobile software development.
LBS Challenge 2007
LBS Challenge Eight previous NAVTEQ Global LBS Challenge® participants have received venture capital funding and nine past LBS Challenge winners have launched commercial applications on major wireless carriers. Register your non-commercial LBS application in the 2007 NAVTEQ Global LBS Challenge in one of three regions: Americas, Europe-Middle East-Africa (EMEA) or Asia-Pacific(APAC). You could win a share of $2 million in prizes. This could be your year.
Dream. Develop. Win.

Development | .NET Compact Framework

SmartPhone 2003 and .NETcf Primer
Written by casey chesnut  [author's bio]  [read 45791 times]
Edited by Derek

Download the code   Discuss this article   .NET Compact Framework   

Page 1  Page 2  Page 3 

SmartPhone 2003 and .NETcf Primer

This article will detail my early observations of managed coding for the SmartPhone (SP) with the .NET Compact Framework (.NETcf). The differences to managed coding for the PocketPC (PPC) will be pointed out, as well as some things that are new.

Emulator

I am an early-adopter that lives in the phone-challenged country of the USA. Because of this I seem to always be waiting for something: people to adopt wireless web usage, networks to be upgraded, SMS messaging to take off, SIM card adoption, e911, decent pocket pc phone edition hardware, and now smartphone hardware (still waiting for a lot of these). Honestly, I dont keep up with the hardware rumor mills at all. I did ask (mid-August 03) explicitly in the microsoft smartphone newsgroup if there were any 2003 smartphones announced for the US ... and the answer was no. NOTE SmartPhone 2003 is important because it has the .NETcf and SP1 in ROM (also CE 4.2), while SP 2002 does not and there is currently not an install (do not know if there will be one either). So the MS SmartPhone-in-a-box is basically a brick for managed developers. Until then, the SmartPhone SDK comes with an emulator that can be used through eVC as well as VS .NET. I recommend installing eVC before installing the SDK for a couple reasons:

1) Running the emulator outside of VS.NET with eVC installed adds an option to share a file system folder between your desktop and the emulator as a Storage Card. So if you open up the emulator, you can see the files as if they were on the device. Currently we do not get this feature in VS .NET.

2) eVC gives you tools to view the file system, registry, processes, etc on the emulator. This ends up being helpful because there is no File Explorer on the SmartPhone OS which makes it a little more black-box'ish than developing for the Pocket PC. It is also worth noting that the emulator can emulate GAPI commands as well.

Finally, the emulator can run with an external 'radio'. From the docs, this means you could somehow hook up a GSM radio to your desktop machine, and the emulator would use that connection to make web service calls and such. This would be very useful for testing your apps ability to work with a slower connection, lost signals, etc...

 

the actual phones should not be as big as the emulator!

PocketPCs are 240x320 while SmartPhones are 176x220

 

the default font allows 10 lines of text with 22 characters

The following is a dump of the directory structure on the emulator. It is different from the PPC in that the SmartPhone RAM is erased whenever the device is turned off. Also, in that the devices have on-board flash which files can be persisted to. PInvoking SHGetSpecialFolderPath with CSIDL_APPDATA (26) will return \Storage\Application Data; you should sub-dir off of this to store your own data. \Storage\Application Data\Volatile sounds like it is a RAM drive (seems like \Temp might be too)? Finally, it is worth noting that you cannot specify how much memory is used for Programs vs RAM as you could on the PPC.

\profiles
\profiles\default 
\Storage
\Storage\Application Data
\Storage\Application Data\Home
\Storage\Application Data\Sounds
\Storage\Application Data\Volatile
\Storage\ConnMgr
\Storage\MAPI 
\Storage\MAPI\ATTACHMENTS
\Storage\My Documents
\Storage\Program Files
\Storage\Program Files\Communication 
\Storage\Program Files\Communication\Mail Attachments
\Storage\Program Files\Connections
\Storage\windows
\Storage\windows\Accessories
\Storage\windows\Activesync
\Storage\windows\AppMgr
\Storage\windows\ConfigMgr
\Storage\windows\Debug Apps
\Storage\windows\Favorites
\Storage\windows\Fonts
\Storage\windows\Help
\Storage\windows\Messaging
\Storage\windows\Messaging\Attachments
\Storage\windows\Profiles
\Storage\windows\Profiles\guest
\Storage\windows\Profiles\guest\Cookies
\Storage\windows\Profiles\guest\History
\Storage\windows\Profiles\guest\History\History.IE5
\Storage\windows\Profiles\guest\Temporary Internet Files
\Storage\windows\Profiles\guest\Temporary Internet Files\Content.IE5
\Storage\windows\registry
\Storage\windows\Start Menu
\Storage\windows\Start Menu\Accessories
\Storage\windows\Start Menu\Games
\Storage\windows\Startup
\Storage\windows\Temporary Internet Files
\Storage Card
\Temp
\Windows

The \Storage Card directory is from a Folder Share between the desktop and the emulator by opening the emulator outside of VS .NET (and with eVC installed). NOTE when switching between running the emulator through VS .NET and eVC, I sometimes have to go and manually kill the Emulator.exe process. 

 

Next Page 

Back to .NET Compact Framework | [Article Index]

 

Back to the top of the page.
Chris De Herrera's Windows CE Website Windows CE News & Information Source
Copyright ©2000-2007 by DEVBUZZ.COM, Inc., NJ. USA.MSDEVELOP