GPS Programming Tips for Windows Mobile - Part 1
NETCF: Memory leak... now what??
Supporting Kiosk-Applications on Windows Mobile (Technically achievable vs. supported)
Wireless Programming on Windows Mobile: supported or not supported?
Establishing GPRS Connection on Windows CE and Windows Mobile: Sample Codes
Disable WebBrowser's Context-Menu in NETCF applications
MAPI on Windows Mobile 6: Programmatically retrieve mail BODY (sample code)
Microsoft released a HotFix for NETCF v3.5 on Windows Mobile 6.1.4 onwards, to address basic functionalities of WebBrowser control
The right approach to get a Contact’s last communication (IItem’s PIMPR_SMARTPROP)
Remote Desktop Mobile (RDP Client) disconnects after 10 minutes of inactivity
Support Boundaries for Windows Mobile Programming (Developing Drivers, for example... Or even WiFi Programming)
Miei post in italiano sul team-blog del Supporto Tecnico agli Sviluppatori
Nothing really unique in the blogosphere here, however worth mentioning anyway as it gives me the opportunity to discuss about MSDN Forums. Recently I've been handling yet another case about a NETCF Memory Leak... I have to admit that after my initial post about that topic the incoming requests about memory leaks are kind of dramatically decreased... In any case this time it was yet something well-known in NETCF, about the peculiar way it handles Drawing-associated resources.
So, imagine you want to programmatically handle a "very large" picture through a System.Drawing.Bitmap object. In NETCF, a "very large" picture is for example one with 1, 2 or 3 MB in size. Using System.Drawing.Bitmap for so large pictures is NOT practical in a NET Compact Framework application, because you don't have so much memory to waste in the GC Heap. Consider that the usual amount of data within the Managed Heap is 1 or 2 MB, in some rare cases it can reach 3 or 4 MB, but no more.
So, the memory to be used can't be MANAGED, it must be NATIVE. How to use native memory to load the image? The solution came from MSDN Forums, which is an incredibly valuable place to look for common solutions and suggestions. It's so useful that threads are even indexed by MSDN Search. Visit the Microsoft Technical Communities home page, to look at all the resources available for your community!
In the specific case, the solution consisted on using COM Interoperability to invoke COM interfaces like IImagingFactory (http://msdn.microsoft.com/en-us/library/aa918428.aspx) that interacts with the native resources that are underlying a bitmap. The MSDN Forum thread was http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2181275&SiteID=1.
Cheers,
~raffaele