.NET Compact Framework and the Smart Device Programming Features of VS.NET
Posted May 1, 2004
Chat Date: March 11, 2004
Please note: Portions of this transcript have been edited for clarity
Introduction
Moderator: mikefos (Microsoft)
Welcome to today's .NET Compact Framework and the Smart Device Programming features of VS.NET chat! Questions, comments, and suggestions are welcome.
Moderator: mikefos (Microsoft)
Let’s introduce our hosts for today.
Host: BillRyan (MVP)
I'm Bill Ryan, I'm Lead Compact Framework Developer with Infopro and help run www.devbuzz.com
Host: Ginny (MVP)
Hi, I'm Ginny Caughey. My company provides vertical market apps for the solid waste industry for desktop and devices.
Host: CraigNeable (Microsoft)
Hi, I'm Craig Neable, the technical evangelist for .NET Smart Device development at Microsoft.
Host: PeterFoot (MVP)
Hi I'm Peter Foot founder of In The Hand a UK business producing .NET CF software. I'm also a member of the OpenNETCF.org advisory board.
Host: OriAmiga (Microsoft)
hey everyone, my name is ori amiga. i am a program manager working in the Visual Studio for Devices team... and i _love_ device developers :-)
Host: carlton (Microsoft)
Hi, I'm Carlton - A developer on Visual Studio for Devices working on the Data Design features
Host: timng (Microsoft)
Hi, I'm Timothy Ng - a developer on Visual Studio for Devices working on the native debugger.
Host: achopra (Microsoft)
Greetings, This is Amit Chopra, I am a program manager with the Visual Studio for Devices Team.
Moderator: mikefos (Microsoft)
Welcome everyone, let’s get started!
Start of Chat
Host: OriAmiga (Microsoft)
Q: I'm developing an application with embedded visual c++ 3.0 , and I use external libraries(*.lib files belonging to a library called OpenCV library), when I try to run the application on PocketPC 2002 emulator , the following error appears "the application path or parts of it is not valid, please check the path...". I think I have to put the .lib files on the PocketPC Emulator , how can I ?!!"
A: if you’re using the 2002 emulator, you have limited options here. The SDK documentation describes how to connect to the emulator with ActiveSync. Once you have an ActiveSync connection you can either “Explore” to the device, or use the Remote File Viewer.
Host: timng (Microsoft)
Q: Where to put *.lib files? Where’s the common folder on windows CE?
A: *.lib files should be compiled into the .exe or .dll file, so you shouldn't need to copy them on the emulator.
Host: timng (Microsoft)
Q: So, I have to copy the *.dll on the emulator ?
A: Yes, if the *.lib is an export library for a *.dll.
Host: BillRyan (MVP)
Q: In my application I have several forms and I want them to act like MDI forms. How do you suggest I do that
A: Check out Chris Tacke's article here https://msdn2.microsoft.com/library/aa446546.aspx
Host: Maarten (MVP)
Q: Can I use Visual Basic .NET 2003 to build ActiveX controls (DLL's I guess) for the PocketPC? (the controls will be used within Pocket IE)
A: you can't build ActiveX controls but you can build managed controls, as long as you have Visual Studio.NET. You can't add designer support though with VB.
Host: carlton (Microsoft)
Q: How do I develop a simple app where the user can record info while disconnected and then when docking, have the data automatically replicate into a SQL server DB?
A: You can setup a Sql Server CE database which has a subscription to your Sql Server. While disconnected, your application writes the data to the CE database. Then when connected, your can use replication to push the data into the Sql Server. You can also write ActiveSync extensions which will invoke the replication when cradled. There are also other ways to invoke the replication when there is a data connection but no AcitveSync connection.
Guest_TimG-DePaul says:
Q: Question about DLLs. I'll explain my problem. We're trying to use SAPI and Speech Recognition and we're using .NET. Since there is no COM Interop with .NET on the CF. I'm making a native DLL to call all the SAPI stuff in native code, and then I can just invoke the methods in my native library from my .NET program. The problem is is that I keep getting MissingMethodExceptions, but I know that the method names are correct. I believe that it may be one of a few problems, one is that my .NET program or library cannot find the DLL. I am running my program out of the platform RelDir (Release directory). Do I need to deploy my native DLL to the /Windows directory? Is there something I need to do with the native library like export symbols or something?
A: Yes, TimG-DePaul, you do need to make sure that you export symbols from your dll.
You then need to be sure that the dll is either in the local directory that your managed calling assembly is sitting, or in the Windows directory. Hope this helps.
Host: OriAmiga (Microsoft)
Q: Question: I've looked at the MapiRule sample for Windows CE - how can I modify that sample to use the IMailRuleClient functionality within a C# .NetCF application?
A: Are you running on a Pocket PC or Smartphone 2003 device?
Host: BillRyan (MVP)
Q: Is there a database available on Smartphone 2003?
A: At the moment, no, but you can use XML or CSV to access and store data.
Host: OriAmiga (Microsoft)
Q: Is it possible to run JVMs on the latest CE emulator? I've tried a few and none of them work despite running perfectly on the actual device
A: It is possible as long as you have a JVM compiled for x86.
Moderator: mikefos (Microsoft)
Hello. For those just joining the chat - Our topic is “.NET Compact Framework and the Smart Device Programming features of VS.NET” chat. Questions, comments and suggestions are welcome.
Host: BillRyan (MVP)
Q: How do I create a "Database" and then access it from code on a VB CF app - Is there a simple example of a disconnected database app synching to SQL Server CE and then SQL Server?
A: Take a look at the PocketTaskVision app. I think it covers everything you need
Host: carlton (Microsoft)
A: Check out https://samples.gotdotnet.com/quickstart/compactframework/doc/default.aspx for quick starts on how to create Sql Server CE databases and merge replication.
Host: PeterFoot (MVP)
Q: Can these "managed controls" VB.NET can make be hosted in Pocket Internet Explorer as normal with the <object...> tag?
A: Pocket IE can only support native ActiveX controls - you'll need to build these with eVC++
Host: CraigNeable (Microsoft)
Q: SQLCE for the Smartphone, When?
A: We are considering supporting SQL Server CE on future versions of Windows Mobile for Smartphone, but have not made any announcements about when it will be supported.
Host: OriAmiga (Microsoft)
Q: Can you kill a non-responding process running on pocketpc?
A: As an “end-user” or from code?
Host: OriAmiga (Microsoft)
Q: Perhaps both as a developer and an end-user
A: As an end-user you can go to the Memory control panel and see running programs, you can stop processes from there (should work for hung processes as well). As a developer, you can call “TerminateProcess” (or pInvoke into it in CoreDLL)
Host: PeterFoot (MVP)
Q: What sizes, and how many resolutions, should an icon for a .Net CF app have?
A: For most platforms e.g. Pocket PC you should supply a 16x16 and 32x32 for it to appear correctly both in the Start Menu and Programs folder. For broad device support you should not use more than 256 colors.
Guest_Dan_Ardelean says:
Q: Will cryptogrtaphy classes be part of CF2?
Guest_tperri says:
A: Yes Dan.
Host: CraigNeable (Microsoft)
Q: Do you recommend using RDA to synchronize data on low-bandwidth networks?
A: Yes, RDA can be an effective way to synchronize data down to the device. It's the least "chatty" way of synchronizing data, and the size of the message is minimized in binary format. As always, it's wise to try to make sure that you're only synchronizing the data necessary to your application over low bandwidth.
Guest_ataraxia says:
Q: Is it possible to use SAPI (5.2?) for pocket pc as I can't find it from MS download. From MSDN, it's said that there is Speech API 5.2 for Windows CE.NET, but nowhere can I find it. So is there any other way to perform speech recognition on pocket pc?
Guest_Marauderz says:
A: You need the SAPI 6.0 download
Guest_ataraxia says:
Q: SAPI 6.0 already? Where can I find it?
Guest_Marauderz says:
A: SAPI 6.0 still in Beta, but can be downloaded.
Guest_ataraxia says:
Q: I checked that page, but all it has is SASDK
Guest_Marauderz says:
A: I think it's that. They must have changed the name
Guest_ataraxia says:
[comment] I see. SASDK is not suitable because it only works when developed as asp.net mobile control, requiring a web server
Guest_kevinleesmith says
Q: SAPI?
Guest_ataraxia says:
A: Speech API
Host: OriAmiga (Microsoft)
Q: I've looked at the MapiRule sample for Windows CE - how can I modify that sample to use the IMailRuleClient functionality within a C# .netCF application?
A: There is no integrated way on Pocket PC 2003 to implement an IMailRuleClient SMS interceptor in managed code (C#). that said, you build a “bridge” IMailRule client filter you can pInvoke into it from C# to set properties about which SMS messages you’d like to intercept (e.g., store them in the registry). then have the native DLL intercept those messages, and invoke your managed app.
Host: Maarten (MVP)
Q: Can the Visual C++ .NET included with Visual Studio .NET 2003 make pocket pc activex controls? Or must I use eVC++?
A: No, you need embedded Visual C++
Host: CraigNeable (Microsoft)
Q: CF 2.0 will work on the devices now on the market or will need a new OS?
A: The next version of the .NET Compact Framework will support Windows Mobile 2003 devices, as well as all devices based on the next generation of Windows CE. Pocket PC 2000/2002 devices will not be supported.
Host: Ginny (MVP)
Q: Is there any inbuilt support in CF for barcode or RFID readers/writers?
A: There is no support in the current version of the CF for these although CF version 2 will make this easier since it will provide support for COM interrop. There is a barcode class on www.opennetcf.org as well as a serial class that might work for RFID.
Host: BillRyan (MVP)
Q: How do I reference and use the POOM in the CF?
A: Check out this article... https://www.microsoft.com/downloads/details.aspx?FamilyId=80D3D611-CC81-4190-AAB4-B1EA57637BAC&displaylang=en
Host Guest_sethde_MS says:
Q: What is POOM?
Host Guest_sethde_MS says:
A: Pocket Outlook Object Model.
Host Guest_sethde_MS says:
Q: Is their going to be support for generics in CF 2.0? SmartPhone as well?
Host Guest_sethde_MS says:
A: Yes!
Host: timng (Microsoft)
Q: I tried loading an XML document with <?xml version="1.0" encoding="ISO-8859-1" ?> and the load method of xml object threw an error. This error only happens in the .NET Compact Framework. On the desktop .NET Framework all is fine. How shall I solve this?
A: Can you tell us what the exception is?
Host: OriAmiga (Microsoft)
Q: Regarding the IMailRuleClient, can you point me in the direction of any samples implementing IMailRuleClient using a DLL and C# on the POcket PC 2003?
A: Unfortunately we don’t have a sample (that I know of) of using C# with IMailRuleClient interceptor DLL (though i have done it). The PPC/SP SDKs have an IMailRuleClient sample that’s pretty good. You should be able to easily modify it to: (1) read the intercept SMS string from the registry (instead of the hard coded one in the sample), and (2) CreateProcess on your managed code app.
Host: OriAmiga (Microsoft)
Q: If I use IMailRuleClient, and CreateProcess to handle messages, I heard that a message notification may still appear even if I use IMailRuleClient. Is this the case?
A: There are options in IMailRuleClient to let the message notifications “go through” and appear for the end-user in the Inbox. I believe the sample in the SDK implements the interceptor such that no message appears in the Inbox. So you should be ok.
Host: OriAmiga (Microsoft)
Q: I've never used evC++ or dealt with Windows APIs - What are some good books and references I can use to get the basics so I can implement the IMailRuleClient
A: The PPC and SP SDKs have a great sample to get you started. A great starter book is also “Programming Windows CE 3rd Edition” by Douglas Boling:
Host Guest_NeilC_MVP says:
A. You might also want to check out Steve Makofsky's Pocket PC Network Programming, available from Addison-Wesley.
Host: OriAmiga (Microsoft)
Q: How can I bribe you for a little guidance with my IMailRuleClient questions outside of this chat opportunity?
A: I’d love a new 911 Turbo if you can spare one :-). Seriously, Seth Demsey from the NETCF team has kindly volunteered to publish a sample of how to do this.
Host Guest_sethde_MS says:
Q: Are there any plans to support WS-Discovery in v2.0?
Host Guest_sethde_MS says:
A: As of now there are no plans to support this.
Host: CraigNeable (Microsoft)
Q: Is there a definitive reference for the class library differences (current version, not 2) between the full CF and the Smartphone CF version? Is it Forms stuff only?
A: We have not published something, as the only difference is the lack of a datagrid in the Smartphone.
Guest_Marauderz says:
[comment] Only the UI classes seem to differ for the Smartphone
Host: sethde (Microsoft)
Q: Can we expect OBEX protocol support to be built in to next version of CF?
A: We're not adding Obex in V2, though it should be quite easy to call it with Com Interop
Host: sethde (Microsoft)
Q: Are we looking at a larger CF footprint in 2.0? (Significantly larger?)
A: We're shooting to be <2.5mb compressed for the whole CFv2
Host: CraigNeable (Microsoft)
Q: What is the minimal memory footprint of CF CLR on a Smartphone?
A: The .NET Compact Framework requires no additional storage on the Smartphone - on Windows Mobile 2003 Smartphones, it is included in the ROM image of the device.
Host: carlton (Microsoft)
Q: I want to export data in the form of xml file (data is sitting in the SQL Server) to Pocket PC and then view in the form of .net form...then do changes to the data...then import back to the SQL Server. How can I do this?
A: If you just want to get started with data replication from your SQL Server, it's a lot less code to write if you use Sql Server CE replication. https://samples.gotdotnet.com/quickstart/compactframework/doc/default.aspx has all the code snippits to get your application going. If you want to use XML, you'd need to build server side WebService to serve out requets for the data in XML and have the pocket pc load the XML into an XMLDocument where it can be manipulated and pushed back to the server using another Web Service
Host: CraigNeable (Microsoft)
Q: When will CF2 be released?
A: The next version of the .NET Compact Framework will be included with the next version of Visual Studio. This is scheduled for release in the first half of 2005.
Host: OriAmiga (Microsoft)
Q: What is status of SyncML support in smart phone?
A: We are still investigating possible support for SyncML. Though at this time we have made no announcements with regard to (1) if we will support SyncML, or (2) to what extent it will be supported.
Host: CraigNeable (Microsoft)
Q: MDC in Europe. Am I correct that this is just a track within the TechEd conference rather than a stand-alone one? Will it have less/more/same content as the US MDC??
A: MDC Europe will be co-located with TechEd in Amsterdam, but will have as much content as our previous two MDCs in Europe. We're very committed to supporting our developer community in Europe!
Host: carlton (Microsoft)
Q: Hi all, I did a PocketPC project in VS.NET, but I don't know how to install it to device. I want to make a exe or msi file to install it to the PocketPC.
A: If your application is written in VS.NET 2003 then simply choosing the 'Run' menu command will do all the work in deploying .NETCF and your Application to the emulator or ActiveSync connected device.
Host: CraigNeable (Microsoft)
Q: Can we expect a go-live license for CF 2 on the beta version? (as it was for CF 1 if I remember correct)
A: Because of the timing of our first version release, the final version of the .NET Compact Framework was released with Beta 2 of Visual Studio .NET 2003, so there was no "Go Live" licensing on the beta of the run time bits per se. We have no current plans to offer a broad "Go Live" plan in the next release either.
Host: OriAmiga (Microsoft)
Q: Are there any articles giving details about setting up WM 2003 emulator in .net 03? I keep getting a cannot connect error.
A: to clarify, are you installing the Pocket PC or Smartphone 2003 SDKs into VS.NET 2003?
Guest_AlexFeinman_MVP says:
[comment] Make sure the tool starts the emulator (it was not started before and there is no saved state)
Host: OriAmiga (Microsoft)
Q: I can't stress enough, we need a better Emulator tool!
A: We hear you my friend. We agree and we’re working on it :-). What specific features would you like to see?
Host: OriAmiga (Microsoft)
Q: For the emulator I'd like to see you not have to close it and reopen every time you deploy
A: We’re definitely working on that :-).
Host: sethde (Microsoft)
Q: What are the differences between ARM4 and ARM4I cabs?
A: Arm processors have a few different "modes". I is for Interworking mode.
Host: OriAmiga (Microsoft)
Q: Does the Smartphone 2003 SDK include support for the SOAP toolkit?
A: NO. SOAP Toolkit is not included in the Smartphone 2003 SDK, and is currently not supported on the Smartphone 2003 platform.
Host: BillRyan (MVP)
Q: [off-topic] Does anyone know how to change the background picture of a picture box in vb.6 without using the properties toolbar
A: Set the PictureBox.Picture = Variable 'This is the path of the image)
Host: sethde (Microsoft)
Q: Are there any plans to include the COM Interop in the next CF version ?
A: We are supporting COM Interop in the next version of CF.
Host: carlton (Microsoft)
Q: To want to run .NET Pocket PC application using SQL CE run on the Pocket PC what do I need to install on the Pocket PC?
A: If you are using Visual Studio 2003, simply invoke 'Run' and VS will deploy .NET CF, SQL Server CE and your application to your device.
Host: CraigNeable (Microsoft)
Q: Can Pocket Internet Explorer download .CABs and automatically install the contents just like normal IE?
A: Yes. If you can get your users to browse to the CAB locations, this can be an effective mechanism for installing them.
Host: OriAmiga (Microsoft)
Q: Can you convince the OEMs *cough* HTC *cough* to release the camera API?
A: We are currently working on a more generic model for accessing Camera functionality. Moving forward, our goal is to expose a consistent set of APIs that will work on any device which implements a Camera driver.
Host: carlton (Microsoft)
Q: thanks ataraxia, but when i click the build cab, it create many cab file, i need to install all of this?
A: You need to determine (based on your device processor and OS) which Cab file to use.
Guest_Alex_Bistia says:
Q: Can you create applications that run as a service and start with the device...with no UI
Guest_Marauderz says:
A: There's an article for services on MSDN now
Host: sethde (Microsoft)
Q: Will the next version support Assembly.GetCustomAttributes? How about SatelliteContractVersionAttribute (which appears to be broken in this release)?
A: We are looking in to adding GetCustomAttributes on Assembly. What is your scenario for SatelliteContractVersionAttribute ?
Host: sethde (Microsoft)
Q: Sethe, the scenario for SatelliteContractVersion is to be able to update/deploy the main assembly without having to update the satellite assemblies. I have a relevant post in the newsgroup by the way...
A: Ok thanks. I'll take a deeper look at this.
Host: Maarten (MVP)
Q: Is there a way to install the SP2 update to the emulator?
A: You can take the x86 cab file and copy it to the emulator.
Host: carlton (Microsoft)
Q: Are there any plans to release the CF or SQL CE in non-cab format (i.e. a set of DLLs and a REG file) to facilitate making single-cab deployments?
A: Currently, there are no plans. SQL CE or NETCF assemblies could not be updated when they are...
Guest_ctacke_eMVP says:
[comment] carlton: I can live with that, but I see it as a possible adoption barrier, or at least an annoyance. Further work on easing app deployment would be nice.
Host: CraigNeable (Microsoft)
Q: Any guarantees that we can update the CF on a Smartphone due to the operator licensing issues that currently prevent us to update it to CF SP2?
A: As you've mentioned, currently updating components and images in the Smartphone is something that mobile operators are able to do, but it is their choice of whether they will provide these updates for their users. We understand that this is a sub-optimal solution, and are looking at ways to help make this process easier for them in the future.
Host: sethde (Microsoft)
Q: Is there any managed code to convert Bitmap to Jpeg? Will the performance be reasonable if written in managed code?)
A: In CF2 this will be supported. We use the native imaging libraries so performance should be good.
Host: timng (Microsoft)
Q: I'm using a CE 4.2 device that has a screen smaller than QVGA. I can't use the sdauthutil.exe tool because it's designed for QVGA and up. I either need it recompiled, or I need the source.
A: Chris, current there is no way to do this currently. We are currently looking at this - if you send me email, I will follow up with you.
Host: sethde (Microsoft)
Q: How can I transform a bitmap in memory to grayscale (non pixel by pixel which is very slow)?
A: in CF 2 we're adding Graphics.LockBits to allow you direct access to bitmap data. This is way faster than going px by px through the property.
Host: OriAmiga (Microsoft)
Q: Suggestion: VS.Net Emulator needs to have proper file transfer capabilities like the eVC emulator.
A: Agreed. Definitely something that’s on our radar. Actually, you can get that to work in VS.NET by connecting ActiveSync to the emulator. Once you have ActiveSync connection you can use all the eVC remote tools. Grab the power toys for a tool which easily lets you connect emulator w/ ActiveSync:
Host: sethde (Microsoft)
Q: Obfuscation using Dotfuscator Community Edition doesn't work, any chance of providing an updated sample that it works? Does CF support obfuscating?
A: We are working with vendors to make sure their tools work on CF applications.
Guest_Dan_Ardelean says:
[comment] obfuscating depends of the program that obfuscates. Dotfuscator 2.0 supports CF with all features
Host: OriAmiga (Microsoft)
Q: My emulator got KILLED by that PowerToy, can NO LONGER connect to it via VS.Net
A: Very strange. I’ve never heard of that happening. Have you tried booting the emulator outside of VS, not saving state, then try again from VS?
Host: OriAmiga (Microsoft)
Q: Actually the emulator works, deploys the files and just stalls at the launching app step
A: That’s really odd. I’ve no idea why that’s happening. Does it happen for both PPC and SP?
Host: OriAmiga (Microsoft)
Q: I haven't tried PPC, mainly doing SP development.
A: do both F5 and CTRL-F5 fail to work correctly?
Guest_Marauderz says:
[comment] Never tried Ctrl-F5 I'll try it and get back to you
Host: carlton (Microsoft)
Q: so if we want to make a single-cab deployment of our CF app with the framework, the party line is that we must manually take the CF cab apart and regen it with our app?
A: You shouldn't be pulling apart the CF cab. Your only option here (which isnt great) is to do a custom setup dll which will invoke the CF cab as well as your own.
Host: OriAmiga (Microsoft)
Q: I've suggested it before, but here it is again: I'd like to be able, from the emulator, to click a "Save" button that makes a stand-alone EXE of the emulator and its current image. This allows shipping demo apps to customers very nice…
A: Agreed. Definitely a great scenario. We hope to at least be able to save multiple states much easier to enable this type of behavior.
Host Guest_DanF says:
Q: Can I ceate .NET controls for CF
Host Guest_DanF says:
A: You can create your own controls in VB.NET or C#. Design time control only with C#. Write your own from scratch or inherit.
Guest_Marauderz says:
A: Doug: you can create .Net controls for CF
Guest_doogman says:
A: Doug: Yep...just override the inherited control.
Guest_Marauderz says:
A: Doug: or make you own.
Host: OriAmiga (Microsoft)
Q: I read somewhere that we aren't actually allowed to redist the emulator anyway, so it would take a license change as well it seems.
A: I believe that is correct (currently). we are also thinking about how to make redist of the emulator and images easier for ISVs. no public plans quite yet. but we hear and understand your pain.
Guest_roystonmc says:
Q: A question on the Mobile Web Server (example presented online). Are there any plans to add this to the OpennetCF?
Guest_AlexY_MVP says:
A: Good idea. I think we should look into that
Guest_ctacke_eMVP says:
A: Our plans are always fluid. Send the idea to submissions@opennetcf.org and we'll queue it up
Host: Ginny (MVP)
Q: To want to run .Net pocket PC application using SQL Ce runon the Pocket PC what do i need to install on the Pocket PC?
A: You will need the sqlce.wce4 cab for your processor in addition to the CF.
Moderator: mikefos (Microsoft)
Thanks for joining us today and thanks for the questions. It's time for us to officially end now, but some folks will be hanging out for a few minutes.
Moderator: mikefos (Microsoft)
If you have further questions regarding the Compact Framework, please check out the newsgroup!
Moderator: mikefos (Microsoft)
<news://msnews.microsoft.com/microsoft.public.dotnet.framework.compactframework>
Moderator: mikefos (Microsoft)
Please see the chats schedule for upcoming topics.
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 page