# Friday, May 14, 2004

.NET Compact Framework drum machine...

Spotted this on Seth Demsey's blog:-

The article by Ianier Munoz shows how a desktop drum-machine sample was converted to the .NET Compact Framework. Calls to managed Direct Sound were replaced with P/Invokes to the WaveOut APIs. Check it out!

http://www.microsoft.com/belux/nl/msdn/community/columns/munoz/cfrhythm.mspx

#    Comments [0] |
# Wednesday, May 12, 2004

Upcoming .NET Compact Framework Chat: 13th May 2004

Coming up tomorrow, the latest MSDN web chat with the .NETCF and Visual Studio for Devices team. Below are the details from MSDN:-

 

Smart Device Programming with Visual Studio .NET 2003
So what's that 'Smart Device Application' project type is all about? Please join the members of the .NET Compact Framework and Visual Studio product groups in this live chat regarding the .NET Compact Framework and the Smart Device Programming features of VS.NET. Please come prepared to ask the tough questions!

May 13, 2004
10:00 - 11:00 A.M. Pacific time
1:00 - 2:00 P.M. Eastern time
17:00 - 18:00 GMT


Event Reminders


OutlookAdd to Outlook Calendar
FriendTell a Friend
#    Comments [0] |
# Monday, May 10, 2004

Three ways to deploy the OpenNETCF.org Smart Device Framework

1. The simplest method is to deploy the entire Smart Device Framework using the CAB files provided. When you deploy a project including a reference to an OpenNETCF dll this will occur automatically. The device gets the whole framework installed into the Global Assembly Cache (GAC) and an entry in the remove programs applet in control panel.

2. An alternative is to deploy only those dlls which you use in your project within your own custom CAB file. Be aware that there are dependencies between the libraries so if you use OpenNETCF.Windows.Forms, then you need OpenNETCF.Drawing.dll and OpenNETCF.dll also. I think some kind of dependency diagram would be useful to illustrate all the dlls in the SDF, I'll follow up with this in a later thread.

3. The third method (which is the most flexible and more complex) is to cherry-pick the classes you use from our source code and either build your own dll, or place it directly in your exe. If you are a VB.NET developer you'll need to use a dll project since most of our code is in C#. As with method 2 you need to take care to include any dependencies of the class(es) you use, if they are not present in your project (or referenced) then you'll get build errors. We don't have a definitive reference of dependencies for each class, however I'm sure it's something we can eventually phase into our documentation. In many cases related classes are contained in the sale code file - e.g. Registry and RegistryKey.

#    Comments [0] |
# Saturday, May 08, 2004

P/Invoke Add-in for Visual Studio

The site at www.pinvoke.net is a rapidly expanding Wiki solely devoted to P/Invoke definitions for .NET. This now includes Compact Framework P/Invokes for coredll, aygshell, rapi etc.

To accompany this resource there is a Visual Studio plugin which gives you a right click option while editing code to insert a ready-made P/Invoke definition. If the one you want isn't available then you are encouraged to add the definition to the library.

You can download the add-in from GotDotNet:-

http://www.gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=75122F62-5459-4364-B9BA-7B5E6A4754FE

The downside to the www.pinvoke.net site is that it only displays correctly in Internet Explorer.

For the Compact Framework specific wiki check out http://wiki.opennetcf.org

 

#    Comments [0] |
# Friday, April 30, 2004

P/Invoke Wiki Update

Chris has setup a Wiki for OpenNETCF, I've added a few topics to sample how P/Invokes may be presented. There will be a lot more work to do to get the template just right but I wanted to ensure the following was included for each entry by default:-

  • C# definition
  • VB definition
  • Equivalent managed functionality. This will point to the .NETCF class you can use to avoid P/Invoking in the first place or the OpenNETCF class which implements the P/Invoke.
  • Link to full description in SDK. Microsoft have placed online in the MSDN library the CE.NET 4.2, Pocket PC and Smartphone SDKs which describe the functions and their arguments and usage.

Because of the nature of a Wiki there is an opportunity to easy tag additional information on, for example Samples or articles which directly apply to the function.

#    Comments [0] |

Understanding AcceptChanges and DataAdapter.Update

Bill Ryan from KnowDotNet and Devbuzz has posted an article clearly describing the issues around DataSets which arise commonly on the newsgroups and discussion forums.

http://msmvps.com/williamryan/posts/5679.aspx

These include "Why does calling AcceptChanges followed by DataAdaptor.Update do nothing to the database" and "why doesn't calling Remove on a row doesn't remove the row from the database".

 

#    Comments [0] |

Small but useful update in MSN Messenger 6.2

Recently released with little fanfare is a minor update to MSN Messenger. One of the first changes I noticed which I find useful is if you sort your contacts by Online/Offline status there are now three states.

  • Green - Online
  • Amber - Available in on a mobile device
  • Red - Offline

It makes it easier to distinguish between those who are completely offline and those who can be "pinged" on a mobile device.

#    Comments [0] |
# Thursday, April 29, 2004

Mobile phones replace cars as youth status symbol

This article on the Economist provides the opinion of how mobile phone handsets are replacing souped up cars as the young poser's object of choice.

http://www.economist.com/opinion/displayStory.cfm?story_id=2628969

It cites car style poster adverts for the XDAII as proof, however I think this is a little of a red herring as the XDAII is definately not aimed at the "yoof" market.

It's a well known fact that young people account for a large number of "lifestyle" phones which are sold, and they tend to change handsets regularly to keep up with peer pressure and have the latest features. Does this mean that young people will spend their time running around town with loud annoying ringtones rather than driving round and round in old Vauxhall Nova's with a spoiler gaffer-taped on? We'll I'm prepared to wait and see... :-)

#    Comments [0] |

Strongly-typed DataSets

Chris Craft has written how to get around the lack of support for Strongly-typed DataSet's in the IDE for Smart Device projects.

http://www.cjcraft.com/Blog/PermaLink.aspx?guid=23fc2044-c854-4358-a0b8-8460f2c56d49

It requires some tweaking of code but is an interesting proposal. Chris plans a full article on the topic, to be released as and when he has time to complete it.

#    Comments [0] |
# Tuesday, April 27, 2004

Windows Mobile Developer Chat later today

James Pratt (Mobile Devices team) will be hosting a developer chat later today covering all aspects of development for Windows Mobile 2003 Second Edition. Full description below:-

Mobile Devices Developer web chat
Are you developing applications for Pocket PCs or Smartphones? Have questions about how to code for mobile devices? Come get the answers from Microsoft!

April 27, 2004
3:00 - 4:00 P.M. Pacific time
6:00 - 7:00 P.M. Eastern time
22:00 - 23:00 GMT


Event Reminders


OutlookAdd to Outlook Calendar
FriendTell a Friend

#    Comments [0] |
# Tuesday, April 20, 2004

P/Invoke Wiki

Heres an interesting concept:-

www.pinvoke.net

It's a Wiki solely devoted to collecting P/Invoke declarations for API functions. It's desktop windows specific of course. I've been thinking about something like this that we could host at OpenNETCF.org to provide a searchable reference to Windows CE P/Invokes - should we start a P/Invoke Wiki?

#    Comments [3] |
# Saturday, April 17, 2004

50,000 Downloads and counting

Thanks to all your support and feedback so far we've reached 50,000 individual downloads of code and binaries here at OpenNETCF.org. We are also currently rolling together a number of bug fixes and a raft of new features into a v1.1 release of the Smart Device Framework - stay tuned for more details.

#    Comments [0] |
# Wednesday, April 14, 2004

Fake Goods

A new article on using the Virtual Radio feature of the 2003 generation of device emulators is now available at MSDN

http://msdn.microsoft.com/mobility/default.aspx?pull=/library/en-us/dnppcgen/html/callevents.asp

It shows how to simulate incoming calls and SMSs using the Fake RIL on the emulator.

#    Comments [0] |
# Thursday, April 08, 2004

An MDC 2004 Summary

So its been two weeks since MDC in San Francisco, in which time I've been back to the UK and then out to Seattle for the MVP summit. Today the article I wrote summarising the event has gone live on Pocket PC Thoughts and you can view it here:-

http://www.pocketpcthoughts.com/articles.php?action=expand,26374

Its difficult to cover everything because there were multiple tracks running simultaneously and I also spent some time helping out in the Hands-On labs and Ask the Experts area. However hopefully I've managed to cover all the major points raised at the event, though of course I'd love to hear your feedback!

#    Comments [0] |

Why cameras should be banned at parties

So at the MVP summit I made the mistake of showing off my party trick, which unfortunately Neil caught on camera. If you check out his blog post you can enter a caption competition to win an item from the OpenNETCF store.

You'd better be quick in entering before my legal team forces Neil to withdraw the picture :-)

 

#    Comments [0] |
# Tuesday, April 06, 2004

Reboot a device

This blog entry (courtesy of Robert Levy) shows how to programatically reset a device:-

http://blogs.msdn.com/windowsmobile/archive/2004/04/01/105878.aspx

Here is the VB.NET equivalent:-

Declare Function KernelIoControl Lib "coredll.dll" (ByVal dwIoControlCode As Integer, ByVal lpInBuf As IntPtr, ByVal nInBufSize As Integer, ByVal lpOutBuf As IntPtr, ByVal nOutBufSize As Integer, ByVal lpBytesReturned As Integer) As Integer

Declare Sub SetCleanRebootFlag Lib "coredll.dll" ()

 

Public Sub HardReset()

Dim IOCTL_HAL_REBOOT As Integer = &H101003C

Dim bytesReturned As Integer = 0

SetCleanRebootFlag()

KernelIoControl(IOCTL_HAL_REBOOT, IntPtr.Zero, 0, IntPtr.Zero, 0, bytesReturned)

End Sub

 

To perform only a soft-reset exclude the call to SetCleanRebootFlag (Thank's to Alex Feinman for highlighting this in a recent newsgroup post)

#    Comments [0] |
# Friday, April 02, 2004

All about RAPI

If you are writing a desktop application to talk to your device-side software, chances are you'll need to work with the Remote API (RAPI). This article by Larry Roof describes RAPI and uses OpenNETCF's Communication library to copy files, launch programs and query settings on the device.

#    Comments [0] |
# Wednesday, March 31, 2004

New blog in town

The Windows Mobile "Developer Experience" team have launched a new blog, Robert has already made a few posts regarding developing for Windows Mobile 2003 Second Edition.

#    Comments [3] |