.NET Compact Framework and the Smart Device Programming

Posted June 20, 2003

Chat Date: May 7, 2003

Please note: Portions of this transcript have been edited for clarity

Chat Participants:

  • Mark Cliggett, Group Program Manager of the Visual Studio for Devices Team
  • Craig Neable, Program Manager in the .NET Smart Devices team
  • Scott Smith, Program Manager in the Visual Studio for Devices Team
  • Ed Kaim, Product Manager on the .NET Developer Platform
  • Michael Fosmire, Community Program Manager

Moderator: Mike (Microsoft)
Welcome to today's .NET Compact Framework and the Smart Device Programming features of VS.NET chat! Questions, comments, and suggestions are welcome.

Let’s introduce our hosts for today.

Host: Mark (Microsoft)
I'm the group program manager in the team responsible for tools for devices. We're organized as one team that focuses on the net cf runtime, and another that focuses on the tools.

Host: Craig (Microsoft)
Hi, I'm Craig Neable. I'm a Program Manager in the .NET Smart Devices team. Hope we can do a good job of helping to answer your questions today.

Host: Scott (Microsoft)
Hi, I'm Scott Smith, a Program Manager in the Visual Studio for Devices Team.

Host: Ed (Microsoft)
Hi, I'm Ed Kaim and I'm a product manager on the .NET Developer Platform.

Moderator: Mike (Microsoft)
Welcome everyone, let’s get started!

Host: Scott (Microsoft)
Q: When will the Pocket PC 2003 SDK be available from Visual Studio 2003?

A: The exact date for availability of this SDK has not been announced, but it should be available in the near future.

Host: Mark (Microsoft)
Q: We at OpenNETCF.org are trying to create a Bitmap Class replacement that will allow access to individual data bits of the Bitmap.

A: We should talk with you after the chat to understand your goal better. As you point out, your current workaround is pretty fragile.

Host: Ed (Microsoft)
Q: Having a hard time using the COM module from .NET CF code --- tell me the steps that I would take in order to call COM library API through P/Invoke and how the callback would be handled

A: You should check out Alex Feinman's sample at <https://www.alexfeinman.com/download.asp?doc=CallbackDemo.zip>

Host: Craig (Microsoft)
Q: VS.NET2003 and Compact Framework is loaded with great features, but I'm very disappointed with its performance with XScale. Does Microsoft have any plans to release an XScale optimized version of Compact Framework?

A: There are currently no plans to produce an optimized version of the .NET Compact Framework for XScale - at runtime we treat the processor as an ARM processor. There was a great deal of discussion about this at our last online chat. You can view this transcript at https://msdn.microsoft.com/chats/embedded/embedded\_041703.asp

Moderator: Mike (Microsoft)
Q: Is Pocket PC 2003 based on CE 4.2 or earlier versions?

A: It is based on 4.2

Host: Mark (Microsoft)
Q: When will you add managed API for the RTC library --- if not then is the embedded Visual C++ the only way to use that library to us the rtp and SIP library

A: Short-term, you can P/Invoke down into the native APIs (or use eVC as you point out). Long-term - no specific timeframe - you can expect to see managed interfaces for all interesting functionality.

Host: Ed (Microsoft)
Q: When I want to connect from within a CF app via GSM/GPRS to the outside world, can I connect automatically or do I need to use the RAS API?

A: The .NET Compact Framework uses the underlying OS socket connections, so it will use whatever connection your device has (whether ActiveSync passthrough, WLAN, GSM/GPRS, etc). The network interface from code is the same for all.

Host: Neil (MVP)
A: Have a look at P/Invoking the Connection Manager APIs

Host: Craig (Microsoft)
Q: With the new Emulator is it possible to automatically convert an mdb to a cdb on the desktop? Is this only possible with CF.NET or is this also possible on the 2002 SDK?

A: The way to create a cdb to mdb conversion is via ActiveSync, and making an ActiveSync connection to the emulator in Visual Studio .NET 2003 is not supported. This is supported in the Pocket PC 2002 SDK, however.

Moderator: Mike (Microsoft)
Q: It's good to see that there is now a MCP course/exam for .NET CF developers, but are there any plans to introduce any more .NET CF, or indeed any mobility courses?

A: I'm not 100% sure, but I talked to some of the certification folks a couple of weeks ago, and they're always considering additional courses/exams. Not sure about any specific plans though.

Host: Craig (Microsoft)
Q: I need to convert a mdb to a cdb without involving a Pocket PC device. I.e. I want to be able to programmatically convert my mdb to a cdb without having a Pocket PC or Smartphone device connected. Is this possible in Visual Studio 2003.NET or2002SDK?

A: This is not something that is supported programmatically. The best way to get a local database on the device from a database on a desktop is to use SQL Server CE replication to an MSDE volume on the desktop machine.

Host: Tim (MVP)
Q: Is there any way to use native GDI functions with CF Forms/Controls? I don't see an easy way to get a GDI device context of a Control in the CF.

A: To use native GDI functions you need to PInvoke GetDC to get a device context.

Host: Tim (MVP)
Q: Tim, thanks. And so I would also need to use pinvoke to get the window handle of the Form?

A: Yes. You can PInvoke the GetFocus API once you have set focus to your form to get the handle.

Host: Tim (MVP)
Q: Tim, OK. Any tips on getting a dc for a System.Drawing.Bitmap?

A: I don't think that you can get the DC for a managed bitmap object.

Host: Ctacke (MVP)
A: You really can't do it easily. That's an issue we're actually working on.

Host: Alex (MVP)
A: We will probably have something on opennetcf.org soon

Host: Scott (Microsoft)
Q: If I need to use the RTC library and .NET CF framework, I am guessing PocketPC 2003 is the only emulation from Visual Studio 2003 that I can use---- if PocketPC 2003 is not available then how can I use RTC library from .NET CF?

A: Right. The PocketPC 2003 SDK is way to get this functionality. As stated earlier, this should be available shortly.

Host: Ctacke (MVP)
Q: Also can I write the GUI in Pocket PC 2002 using .NET CF and access the RTC COM library using P/Invoke using the current Visual Studio 2003?

A: That's not a CF question, but the answer is no. PPC02 is an extension of CE 3.0. PPC03 is an extension of 4.2.

Host: Ctacke (MVP)
Q: To use the RTC COM library, do I use eVC 4.0 or eVC 3.0?

A: I believe RTC is a 4.2 feature, so eVC 4.0 is what you'll need

Host: Mark (Microsoft)
Q: The standard CF install does not work properly on the PocketPC Phone Edition. The workaround is to install the CAB files by hand. Is there any chance that a fix will be in place for this in the near future?

A: I'd like to get more details on this. "standard CF install" could mean one of several things. This should work - we test this - and if it doesn't I'd like to fix it.

Host: Scott (Microsoft)
Q: Application Icon Transparency: I get a black area on my icons where it is supposed to be transparent. Is this a known issue? The icon was added in the project properties. What is the proper way to create an application icon with transparency?

A: Transparency isn't supported for Application Icons in this release.

Host: Ed (Microsoft)
Q: Any idea if there's a way to display mjpeg (moving jpeg) pictures in a CF application?

A: The .NET Compact Framework does not support mjpeg natively.

Host: Craig (Microsoft)
Q: Is there any plans to create a programmatic method for converting an mdb to a cdb in the future? If you are creating a read-only database it is typically easier to keep it up-to-date during development as an mdb than having a mechanism to automatically convert it to a cdb when you are finished editing

A: We haven't announced any specific plans to do this kind of conversion, but you're right - there are some things that are awkward to do when writing database applications. It is our plan to address some of these problems in future version of Visual Studio .NET.

Host: Ed (Microsoft)
Q: I heard about CFCOM from Odyssey --- how does it help me in P/Invoke and .NET CF?

A: CFCOM provides a middleman component for developers to access ActiveX controls and other COM objects without having to P/Invoke. Check out their site at https://www.odysseysoftware.com/cfcom_main.html.

Host: Ed (Microsoft)
Q: Are we likely to see support for DIME and WSE 1.0 in .NET CF v.Next?

A: We're working on it. Too early to comment anything specific.

Host: Ed (Microsoft)
Q: If CF does not support mjpeg natively, what is a "workaround" to display them?

A: Depends on your interface. If you're fed a stream of images, you can just paint them one at a time. Otherwise you'll have to build (or buy) a component that does it for you.

Host: Ed (Microsoft)
Q: Indeed I'm fed a stream of images, what class(es) should I consider?

A: You can do something like "this.picturebox1.image = (Image passed from mjpeg);" on an event when the image has been received.

Host: Ed (Microsoft)
Q: Are you considering SAPI support in CF v.Next?

A: Nothing to comment on yet.

Moderator: Mike (Microsoft)
Q: In the CE 4.0 Platform builder, every time I build a customized platform giving every feature available, I only see a black window with no window manager --- how can I get the window manger to show up?

A: We've got our Compact Framework and VSD folks on the chat today. You might consider posting your question to the microsoft.public.windowsce.platbuilder newsgroup.

Host: Ctacke (MVP)
Q: Are there any website or book that talks about the Win32 API available in CE 4.2?

A: Since 4.2 just came out, there are no books as of yet. MSDN does have docs but the best source is PB 4.2's Help.

Host: Scott (Microsoft)
Q: Regarding application icon transparency, will it be supported in 2003, or is that what you are saying?

A: The version of compact framework in 2003 is the original version. For application Icon's used in the Start Menu, this is not specific to the framework.

Host: Mark (Microsoft)
Q: With CF, is the GC heap limited in size to the CE 32 MB per-process 'box', or is there a way to have it use Large Memory Area of CE?

A: Yes, it is limited to one slot, and there isn't a way to change this.

Host: Craig (Microsoft)
Q: Are there plans for providing MSMQ support in CF v.Next?

A: System.Messaging support is a feature that we get frequently asked about. It is something that we are hoping to include in the next version, though we've not yet announced any definite plans about the feature set of the next version of the product.

Host: Craig (Microsoft)
Q: Are there plans for providing managed wrappers for Rapi?

A: We haven't announced any specific plans for our next version feature set. However, these APIs are accessible using interoperability mechanisms in the .NET Framework.

Host: Mark (Microsoft)
Q: Thanks Mark. It seems it would be nice if the GC heap allocation could be configured, even if it required hosting the CLR. And it would be great to have a sample of hosting the CLR. Thoughts?

A: We're looking at enabling hosting. We'd also consider providing some configuration options. In this version we had our hands full with one known configuration.

Host: Ed (Microsoft)
Q: Thanks Ed. With the event when the image has been received, you mean e.g. the event that the picture file arrives in the directory?

A: Sure. You could have a timer that checks the directory every XX milliseconds and looks for a new image to replace the current image in the picture box.

Host: Scott (Microsoft)
Q: Regarding application icon transparency, a 16x16 pixel icon shows up in the recent files list after the program is used. Other applications seem to support transparency. There is no workaround?

A: I don't believe this is a Compact Framework issue. Let me follow up offline.

Host: Ed (Microsoft)
Q: Connecting to a Bluetooth device like a GPS receiver, can I consider this as communicating via a serial port?

A: Yes

Moderator: Mike (Microsoft)
Q: Does this kind of chat session about Compact Framework and Smart Device Programming will be organized on a regular basis?

A: Yes...we're targeting about once per month. There is actually an MVP-hosted Compact Framework chat on May 27Th (10am Pacific). The chat schedule will be out at https://msdn.microsoft.com/chats

Host: Ed (Microsoft)
Q: Will generics and the other new C# language features be supported in the near future?

A: We view the desktop and device as very consistent platforms, so we make every effort to ensure that the C# compiler works between the two.

Host: Alex (MVP)
A: Those are language features. If they are implemented in the compiler I think they'll be available in CF "for "free".

Host: Mark (Microsoft)
Q: AlexFeinman_MVP: Those are language features. If they are implemented in the compiler I think they'll be avaliable in CF "for "free".

A: To add to what Ed said, it is important that we provide consistency across the desktop and device. Generics are not "free" for us - the compiler generates them but the CLR has to support them also. We absolutely plan to provide generic support in the NET CF CLR but the question is the timing.

Host: Peter (MVP)
Q: is it possible to interface with PocketStreets from within a CF app?

A: Not directly but you can in a roundabout (pun) way if you use Pocket Outlook - create a contact with the required location and find it

Host: Kevin (Microsoft)
Q: Are there any plans to provide some way to create SQL CE databases on the desktop?

A: We are looking at this for future release. It's too early to say anything at this point. This is a big feature request we hear often and we are taking this very seriously.

Host: Craig (Microsoft)
Q: Sorry to beat this one to death, but is it not possible to host the CLR? Doesn't the shell do this and if I write my own shell wouldn't I need to host if I wanted managed apps?

A: The shell doesn't "host" the CLR so to speak, but the runtime does talk to the shell via a custom graphics layer. A unique one is required for every shell on which the .NET Compact Framework runs. This is something for which we do not have a supported SDK in this version.

Moderator: Mike (Microsoft)
Thanks for joining us today and thanks for the questions. A special thank you to all of our hosts today; Ed, Craig, Scott, Mark and Kevin. It's time for us to go now.

For further information on this topic please visit the following:

Newsgroups: Mobile and embedded application development topics

Embedded Transcripts: Read the archive

Website: Visit the Mobile & Embedded Developer Center

Top of pageTop of page