MSDN Briefing about Windows Mobile + SQL Server Mobile
Yesterday I was hosting an MSDN Briefing in Vienna.
MSDN Briefings are monthly events targetting software developers. The topics, which are adressed cover currently released technologies.
This time the title was "Under the hoods of Windows Mobile 5 + Offline Applications with SQL Server Mobile Edition".
I did one session about new features of Windows Mobile 5 API:
- With Pocket Outlook Object Model (POOM) you can access Pocket Outlook calendar appointments, tasks and contacts and integrate these into your own applications. You can also send sms and emails and intercept them as they arrive on the device.
- State and Notification Broker allows querying system states and getting notified if a state changes (possible states are e.g. batterystate, number of current calendar appointments, network connection count, ...).
- Phone API can start outgoing calls.
- Standard dialogs (CameraCaptureDialog, ChooseContactDialog, SelectPictureDialog) wellknown from Windows Mobile can now be leveraged from your application.
In the other session I introduced the two possibilities for synchronizing SQL Server Mobile with SQL Server 2005.
- Remote Data Access (RDA) - is the lightweight way. It needs no changes on the server side, but can only do simple PUSH and PULL calls (or server side command execution). Replication of constraints or indices is not supported. Changes on the server side are not tracked, so the client has to pull down the entire data (tablewise) from the server every time, can make the changes locally and then push back only the changes.If two clients update the server at the same time the last one overrules the previous - so data conflicts can occur.
- Merge Replication provides more features - e.g. replication of several tables at once, including primary/foreign key constraints and indices, bi-directional change-tracking for incremental transfer, data reconcilation at the server side to prevent conflicts - at the cost of server changes to tables and columns and more overhead.
You can download the session slides from the first session (Windows Mobile API) as attachment to this posting (second one in the next posting due to upload limits).
As promised I will record all demos as soon as possible and publish them also in response to this post.
After the event several people asked me questions about Bluetooth, MAPI, Audio Recording,... with Windows Mobile. I will post answers to these as comments to this post (see below).
Comments
- Anonymous
November 21, 2006
BT, Recording will be also interesting for me :-) Another question about HICON handles. I need to support PPC2002, WM2003 and WM2005 devices (so I have to use CF 1.0) Since Icon.FromHandle() is not supported by the CF I looked at OpenNETCF (http://www.opennetcf.org/PermaLink.aspx?guid=342bde3d-eeba-4d78-9748-29eb89ee13bf) The code worked fine for PPC2002 and WM2003 but not works for WM2005. There seems to be a problem with the palette colors... The icon can be displayed but with wrong colors or transparency is a problem.
- The SDF uses CreateDIBSection() with a BITMAPINFOHEADER parameter but MSDN and function prototype says that it is a BITMAPINFO.
- P/invoked BITMAPINFOHEADER is missing biClrUsed and biClrImportant
- Correcting issues 1+2 does not solve the problem. Very strange: If the application was launched using the debugger it works (icon displayed correctly). If launched without debugging (from within VS) the colors are not correct (black instead of transparency) I just need to get a Icon object from a HICON handle! thx, hfrmobile
- Anonymous
November 21, 2006
The comment has been removed - Anonymous
December 03, 2006
Someone asked me about problems accessing the MAPI MailStorage for reading SMS or Email messages. The guy is using a library from CodeProject called MapiEx (http://www.codeproject.com/internet/CMapiEx.asp). Trying the demo project from there didn't work for him. (Always getting a MethodNotFoundException at DllImport). The problem is that the demo project is compiled as Win32 project - you've got to rebuild the MapiEx.dll as WinCE / Windows Mobile project to be able to do P/Invoke to the dll. br, max.