# 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] |
# Monday, March 29, 2004

Back from San Francisco

I've got back home from MDC, my immediate task is to clear the backlog of emails and serious sleep deprivation! I'll also be pulling together all my notes on the event for a Smartphone / Pocket PC Thoughts article.

The event included a great mixture of short term and longer-term announcements. Windows Mobile 2003 Second Edition brings support for a greater range of form factors for devices. After some deliberation I decided not to get my iPaq 2210 flashed as the beta image excluded any Bluetooth support, which would cripple the device which I use day-to-day. I have of course installed the Emulator images to target the platform. Longer term, Visual Studio 2005, .NET Compact Framework 2.0 and SQL Server Mobile are shaping up to be a powerful set of tools and technologies, and I can't wait to play with the preview version of Visual Studio 2005 that was handed out!

#    Comments [0] |
# Saturday, March 20, 2004

Smartphone files article gone live

Thanks to Geoff Schwab for the heads up. My article on working with files covering Storage Cards and File Dialogs is now up in the MSDN library.

#    Comments [0] |
# Friday, March 19, 2004

Free space on Storage Cards

You can determine the total size of a Storage Card and available free bytes using the GetDiskFreeSpaceEx API function. Below is a "mini-wrapper" around the function which returns a structure with the three return values. You'll notice in this example I'm marshalling longs (64bit Integers), values greater than 32bit cannot be marshalled by value but can be marshalled by reference as in this case. The DiskFreeSpace struct contains three long members to hold the accessible free bytes, total bytes and total free bytes.

public static DiskFreeSpace GetDiskFreeSpace(string directoryName)
{
    DiskFreeSpace result = new DiskFreeSpace();

    if(!GetDiskFreeSpaceEx(directoryName, ref result.FreeBytesAvailable,
        ref result.TotalBytes, ref result.TotalFreeBytes))
    {
        throw new Win32Exception(Marshal.GetLastWin32Error(), "Error retrieving free disk space");
    }
    return result;
}

public struct DiskFreeSpace
{
    public long FreeBytesAvailable;
    
    public long TotalBytes;
    
    public long TotalFreeBytes;
}

[DllImport("coredll")]
private static extern bool GetDiskFreeSpaceEx(string directoryName,
    ref long freeBytesAvailable,
    ref long totalBytes,
    ref long totalFreeBytes);

 

Or if you prefer Visual Basic:-

Public Function GetDiskFreeSpace(ByRef directoryName As String) As DiskFreeSpace

    Dim result As New DiskFreeSpace

    If GetDiskFreeSpaceEx(directoryName, result.FreeBytesAvailable, result.TotalBytes, result.TotalFreeBytes) = False Then

        Throw New System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error(), "Error retrieving free disk space")

    End If

    Return result

End Function

Public Structure DiskFreeSpace

    Public FreeBytesAvailable As Long

    Public TotalBytes As Long

    Public TotalFreeBytes As Long

End Structure

Private Declare Function GetDiskFreeSpaceEx Lib "coredll.dll" (ByVal directoryName As String, ByRef freeBytesAvailable As Long, ByRef totalBytes As Long, ByRef totalFreeBytes As Long)

#    Comments [0] |
# Thursday, March 18, 2004

A day of upgrades

I followed Neil and Alex's lead and upgraded my blog to dasBlog too. Luckily because dasBlog is an evolution of BlogX the migration was pretty smooth. I may well tweak the theme slightly yet though because I miss my roadsign :-)

I've also flashed my iPaq 2210 with the latest 1.10 ROM (Thanks to Ed at Pocket PC Thoughts for the heads up). This includes a number of previous patches, sadly it has .NETCF SP1, not SP2 so that will still require a RAM install. However doing a ROM flash is always a good time to clean out the crud so my iPaq is nice and tidy (for the moment at least)

#    Comments [0] |