Windows CE 5.0 and 6 Beta (July 26, 2006)

**Chat Topic:**Windows CE 5.0 and 6 beta
**Date:**Wednesday, July 26, 2006

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

Sue Loh [MS] (Moderator):
Welcome to today’s live chat concerning Windows CE 5.0! We will begin this chat in about 10 minutes. Thank you for joining us.

Sue Loh [MS] (Moderator):
We are pleased to welcome our Experts for today’s chat. I will have them introduce themselves now.

*Introductions

MikeCal [msft] (Expert):
Hi everyone. I'm Mike Calligaro and I'm a developer who works on drivers and other low level system sorts of things.

gregsco_MSFT (Expert):
Hi, I'm Greg Scott and I work on the Windows CE Networking team.

RyanWard_MSFT (Expert):
I'm Ryan Ward and I'm on the Platform Builder IDE test team

JamesS [MSFT] (Expert):
Hi, I'm James Stulz, Program Manager for the Platform Builder Diagnostics team.

andyraf [msft] (Expert):
Hello, I'm Andy Raffman, a developer on the graphics/audio team.

AmmonL [MSFT] (Expert):
I'm Ammon Larson, and I'm a developer on the Windows Mobile Shell team.

jsirois_MSFT (Expert):
Hi, my name is Jeff Sirois I'm a developer working on graphics.

Karel Danihelka [MS] (Expert):
Hi, my name is Karel Danihelka and I work as developer in BSP/driver team.

russellk_MSFT (Expert):
Hi, I'm Russ Keldorph. I work on the native C++ compilers for Windows CE.

Nachiket [MS] (Expert):
I am Nachiket Acharya. I am on the SDK Test team.

Sue Loh [MS] (Moderator):
Hi, I'm Sue Loh, a developer on the Windows Devices Core team at Microsoft. I work on the Windows CE kernel and file system, and on performance tools. I am also moderating today's chat. I hope we can answer some questions for you today!

Let’s begin the chat!

*Start of Chat

John Spaith [ms] (Expert):
Q: Will DCOM definitely go away in CE6?
A: Hi -- the most that I can say about this is available at https://blogs.msdn.com/cenet/archive/2006/03/22/558505.aspx. If you have an NDA contact me by email and we can discuss more.

John Spaith [ms] (Expert):
A: Sorry I can't provide more information that this quite yet. At RTM we will be able to communicate all our plans around DCOM.

Sue Loh [MS] (Moderator):
Q: dcom - sorry, don't know, what RTM is - when will it take place?
A: "RTM" is "Release to Manufacturing" -- when CE6 ships. Officially CE6 will RTM in the fourth quarter of calendar year 2006

DCampbel_MSFT (Expert):
Q: Will DCOM definitely go away in CE6?
A: COM Remoting (aka DCOM) will be removed from the released product as planned. In process & out-of-process COM will still be supported. (i.e. it's ONLY the remoting over the network that is being removed.) If you REQUIRE that functionality you should let us know your scenario & requirements and we'll do our best to point you to alternatives.

DCampbel_MSFT (Expert):
Q: about DCOM: we are using DCOM to connect from the PC (client) to the CE (server). So what will be our option if you remove DCOM, but don't replace it with anything else? (I understand that WCF will come later...)
A: We're investigating alternatives that we can recommend as a replacement for DCOM by the time we ship. As I said, if you have a hard requirement, you should contact us and give us some detail about your scenario so we can make sure it's considered as part of our recommendation.

DCampbel_MSFT (Expert):
Q: DCOM requirements: I need stateful connections to objects (interfaces), transparently on the same machine as over the network, just in time activation and asynchronous callbacks (events) and high performance - I need a replacement for all of these.
A: As I said, if you have a hard requirement on DCOM please contact us and give us some detail about your scenario so we can make sure it's considered as part of our recommendation.

DCampbel_MSFT (Expert):
Q: dcom & hard requirements: these are typical requirements in automation business - how shall we be competitive without this feature? only alternative seen so far is CORBA - do you have experience with it?
A: We have some familiarity with the automation requirements and we're working on an alternative solution. There'll be more information available when we release.

Luis Cabrera [MS] (Expert):
Q: why are managed to COM calls that expensive?
A: In short, whenever you need to PInvoke, you need to marshall types, possibly load a different DLL, and then unmarshall on the way back.

Sue Loh [MS] (Moderator):
Q: what major changes will CE6 have?
A: CE6 beta has some major OS changes -- each process gets 2GB of virtual memory to use, instead of 32MB. You can also run practically an unlimited number of processes, instead of the old limit of 32. Also, there are some major tool changes -- Platform Builder is now a plug-in to Visual Studio 2005 instead of a standalone tool.

Sue Loh [MS] (Moderator):
Q: The kernel and memory architecture changes for CE 6 are well documented. Can you describe some of the other changes in CE 6 that are not? Digging through the beta shows many additional features like cellcore and usbfn composite driver to name a couple.
A: Well I'll try to get several people to answer this question. Some of the features I personally know to list that were: More work on security; a new version of FATFS (exFAT) that will be transacted and still compatible with desktop PCs; we ported the certificate verification infrastructure from Windows Mobile 5.

Juggs RavaliA_MSFT (Expert):
Q: The kernel and memory architecture changes for CE 6 are well documented. Can you describe some of the other changes in CE 6 that are not? Digging through the beta shows many additional features like cellcore and usbfn composite driver to name a couple.
A: Yes there are new features in CE 6.0. I will name you the ones that fall in the Drivers Section and let someone else tackle the CellCore part

Juggs RavaliA_MSFT (Expert):
Q: The kernel and memory architecture changes for CE 6 are well documented. Can you describe some of the other changes in CE 6 that are not? Digging through the beta shows many additional features like cellcore and usbfn composite driver to name a couple.
A: So here is the Drivers List - We have the User Mode Driver Framework, USB On the Go, USB Composite Fn, USB Fn Printer, New CEDDK DMA Abstraction APIs and Improvements in performance throughput for core technologies like USB, SD, Serial and so on.

charlz_MSFT (Expert):
Q: Using VS2005, how do you specify to create shortcuts with command line parameters? There seems to be no option in the UI to do this, yet I know that you can create shortcuts with parameters on WM 5.0.
A: The WM 5.0 tool is a different approach we took for WM and there isn't a similar mechanism in the VS2005 approach. However, if you create an OS Design project (PBXML file) then you should be able to create desktop shortcuts by right clicking on the PBXML project from a file explorer and choosing "create desktop shortcut". This was a feature in PB 5.0. It wasn't available in the Beta but will be available in the RTM version.

charlz_MSFT (Expert):
Q: Re: shortcut parameters. What is "PB 5.0"? What is an "OS Design Project"? I have never seen this in VS2005, so I have no idea what you are saying. In setup projects for smartphone, I can create shortcuts, etc. but can't specify their params. ?
A: PB is Platform Builder. I apologize as I obviously misinterpreted your question about shortcuts and thought they were in the context of building a full OEM image. You should re-ask your question but mention "Smart Devices" or "VSD" when talking about VS2005 so others like me don't get confused about out OEM tools that now run in VS 2005. :)

PaulT_MVP (Expert):
Q: will managed c++ compilers be available?
A: I'm not at MS, but the basic answer is 'not on the plan'. You might be able to get your Managed C++ code to work, but the run-time really makes little effort to support all of the Managed C++ stuff.

PaulT_MVP (Expert):
Q: When will the .NET Compact Framework v2.0 allow a derived Windows Form class to override the default WndProc() as is offered in full .NET Framework?
A: That ability hasn't been announced, as far as I've heard. Your best shot at going into the details necessary is to post to microsoft.public.dotnet.framework.compactframework and tell *what* you're trying to do, rather than how. Someone may have a better answer than I can give...

Sue Loh [MS] (Moderator):
If you’re just joining us, welcome to today’s chat regarding Windows CE 5.0 and CE 6 beta! Your questions, comments and feedback are welcome.

AmmonL [MSFT] (Expert):
Q: Home screen layout question. What if my home screen layout includes a reference to a home screen plugin dll that I wrote? .. and this same dll is installed via another cab that installs a companion application with which it communicates. meaning I am not installing via .HME file, the home screen layout, COM dll plugin, etc. are all installed via a CAB that installs the application. What is the proper way to package and deploy a home screen plugin for WM 5.0 Smartphone? Specifically, does it have to be signed with a cert.? If so, which one? The sample in the SDK says to use the SDK Developer cert.
A: New Home Screen layouts — Home Screen XML files — can be delivered to a Windows Mobile-based Smartphone in the form of downloaded signed or unsigned cabinet files with an .hme extension, after the phone has been purchased by a user. Security for downloaded Home screens is provided by the Unsigned Themes and Unsigned Prompt security policies. The Unsigned Themes policy determines whether unsigned Home Screen files can be installed. The Unsigned Prompt policy determines whether the user is prompted to allow the installation to continue if the Home Screen file also contains unsigned .dll files.

Luis Cabrera [MS] (Expert):
Q: What is the proper way to package and deploy a home screen plugin for WM 5.0 Smartphone? Specifically, does it have to be signed with a cert.? If so, which one? The sample in the SDK says to use the SDK Developer cert.
A: I just want to add that most smartphones ship with the Mobile2Market locked configuration, so you should sign your home-screen with an M2M Privileged certificate.

Luis Cabrera [MS] (Expert):
Q: Luis: Can anyone sign with an M2M Priv Cert? How do I obtain this cert.?
A: Yes, but you have to go through a company like Verisign or Geotrust to sign your application... and it costs money.

Luis Cabrera [MS] (Expert):
Q: AmmonL/Luis: In testing on AKU2, the home screen is locking up when trying to load my unsigned plugin, so I am trying to figure out what cert I need to use in signing the plugin dll.
A: M2M privileged cert.

MikeCal [msft] (Expert):
Q: I'm new to CE, and my desire is to write an app (vs an entire platform) that will perform as fast as possible (network. crypto... ) People suggest that I work in CE vs. using C# in Visual Studio. Is using CE overkill? or is that the only way to go?
A: I think you mean C++, not CE. In general, yes, C++ will be faster than C# for many things. But it really depends on what you're doing and how you code in C++/C. It's definitely possible to write C++ code that is slower than C#.

PaulT_MVP (Expert):
Q: I'm new to CE, and my desire is to write an app (vs an entire platform) that will perform as fast as possible (network. crypto... ) People suggest that I work in CE vs. using C# in Visual Studio. Is using CE overkill? or is that the only way to go?
A: I'll add a little. It's possible to write real-time code in C# (Chris Tacke of OpenNETCF.Org has done some work on that). However, it requires intense planning and a lot of expertise in what's going on in the managed code run-time system. I think you can find details in his blog at https://www.opennetcf.org/

MikeCal [msft] (Expert):
Q: Mike, I actually meant about a paragraph of stuff that I had to edit to fit in the allotted question area. "Write it in C in the CE environment." approximated my original phrasing.
A: If anything needs to be high performance, it's drivers. And I write all my drivers in C++. If you're asking "should I do C instead of C++" the answer is "C++ is fine, though it's certainly possible to write poorly performing C++ code." If you're asking "should I do C/C++ instead of C#" the answer is, "In general, C++ code can outperform C# code." Note however, that you'll most likely write the C# code more quickly than the C++ code, which may give you more time to do performance tuning on it. So it's not a cut and dried sort of thing. But, no, I won't be writing driver code in C# for a while. (I won't say "never" though. :-)

russellk_MSFT (Expert):
Q: I know I can use "Managed C++" in VS, but is that not slower (IL and all) than working within CE?
A: Full Managed C++ isn't supported for CE. Pure-only might work, but I haven't tried it. It's mostly a Common Language Runtime limitation. In general, there is a performance penalty for using managed code over native, especially on CE where size limitations prevent extensive JIT optimizations. However, in some cases, there can be a size win if you can amortize the size overhead of the runtime itself.

PaulT_MVP (Expert):
Q: I know I can use "Managed C++" in VS, but is that not slower (IL and all) than working within CE?
A: You're still confusing, it sounds to me "Windows CE" with "Tools used to write code for Windows CE". Managed code still runs on Windows CE. The scheme used to execute managed code is different than the scheme used to run native code, such as that written with, say eMbedded Visual C++. Often, managed code will be a bit slower, especially the first execution cycle, than C++. However, managed code can be as fast as similar C++ code. *None* of this is related to "Managed C++", however, as that is *not supported* by Windows CE.

PaulT_MVP (Expert):
Q: Paul (I think) suggested to check out Chris Tacke's work on real-time C# at www.opennetcf.org. All the references I checked had Tacke saying things like "You're not likely to see that any time soon.".....
A: Yes, that was me. Chris has shown how to do some things which are real-time (direct hardware access, and others), from managed code. He likes that sort of thing and is a pusher of the .NET CF team in that area. As I said, I can't say that it's the way to go, but it's not totally impossible. If you want to have a dialog on doing real-time stuff, the newsgroup or the OpenNETCF forums might help. It's still not clear what you're after. If the code has to run on CE, then it has to run on CE, no? If you're writing image-processing app *for Windows CE*, your best chance of high-performance is, as always, assembly! #2 is C/C++!

MikeCal [msft] (Expert):
Q: ..... So, if one of you were asked to do some processor-intensive work in CF, what would you do? (VS C++? C++ in CE?)
A: If I was writing a user level application, I'd write it in VS. If I was writing a driver, I'd use platform builder. The speed of the resulting code will be the same. The only real difference is what interfaces are exposed.

MikeCal [msft] (Expert):
Q: managed code cache: I heard that under CE all compiled methods in the code cache is freed when the app loses focus - when true, how can 2 managed processes efficiently cooperate with each other?
A: It's not true that all compiled methods are freed when a managed app loses focus. It's definitely possible to keep a managed app running when it doesn't have focus.

PaulT_MVP (Expert):
Q: the c# and the .net CF has unbounded execution of its garbage-collected environment, making it very unsuitable for real-time requirements ?? any suggestions
A: Chris Tacke dealt with that in the paper that I distinctly remember him putting somewhere (I'm sure you love how distinct that is, sorry). You have to *avoid garbage collection* when trying to use managed code for real-time which is an excellent reason not to do it except in *very specific cases*. Again, real-time in .NET

Karel Danihelka [MS] (Expert):
Q: If using the Windows CE RNDIS USB Function driver, does the device using the driver need to have vendor specific id's or can the default values in CE be used on the shipping product?
A: You should use vendor specific id's and ship your inf file for desktop.

Juggs RavaliA_MSFT (Expert):
Q: What changes are necessary to get RNDIS activesync working on a CE 5.0 based device?
A: RNDIS ActiveSync is not supported on CE 5.0. For this to work, you need changes in the ActiveSync binaries that ship on CE and hence not feasible. Even if you load the RNDIS driver and have the correct settings for the IP addresses and such, CE 5.0 based repllog (repllog is the Activesync bianry) on the device will not launch upon cradling.

STJONG_MSFT (Expert):
Q: What changes are necessary to get RNDIS activesync working on a CE 5.0 based device?
A: WM5 RNDIS solution comes with the IP routing module that is not part of Active Sync for CE 5.0. Active Sync itself needs to be able to use Ethernet interface (which is what RNDIS looks like). Is there any specific reason you need RNDIS for CE 5.0?

STJONG_MSFT (Expert):
Q: Regarding RNDIS on CE 5 - The USB Fn port on our unit ( a headless telematics device) is the network interface port for the PC's that plug into it. We want to be able to keep that port working as a network port, not serial.
A: I see. AS 3.8 does support ethernet based sync (though the first sync has to be point to point, or serial, to establish the partnership) . Also, it does not support IP routing, i.e the device won't be able to use the desktop to get to the network the desktop is connected to.

STJONG_MSFT (Expert):
Q: Regarding ActiveSync RNDIS on CE 5.0 - We can write an app that detects the presence of the RNDIS adapter and launches repllog but as I understand it AS no longer has support for Ethernet. Does CE 6 have support for RNDIS activesync?
A: AS4 onwards does not have support for Ethernet (exception to RNDIS), CE 5.0 is based on AS 3.8 which should support Ethernet sync, but as I mentioned you won't get the desktop IP route capability.

Juggs RavaliA_MSFT (Expert):
Q: Regarding ActiveSync RNDIS on CE 5.0 - We can write an app that detects the presence of the RNDIS adapter and launches repllog but as I understand it AS no longer has support for Ethernet. Does CE 6 have support for RNDIS activesync?
A: Well, it is not just the simple detection - There is more. RNDIS ActiveSync will not be supported in CE6.0 as well since it does not take the very latest Activesync (including RAPICLnt/Mgr binaries)

jsirois_MSFT (Expert):
Q: about custom WCE gui skins: is it possible to use this technology to customize control behaviors to operate the gui eg. from a wheel input device?
A: I don't think this is possible. I believe it's only possible to customize the appearance on the screen, not the actual behavior.

jsirois_MSFT (Expert):
Q: about custom WCE gui skins: to complete the question would it be possible to modify the behavior of e.g. edit controls or list controls so that they react to the messages coming from a wheel also for apps like the built-in CE applets??
A: Sub-classing the control is the only way to change its behavior when reacting to message, but I think you have to do that on an app-by-app basis, I don't think it would change the behavior in some other app.

Luis Cabrera [MS] (Expert):
Q: I am using the SMS Message Interception APIs in the .NET. If I have SMS interception rules configured to run my app, and my app is uninstalled, these rules will remain configured in the registry. What is the best method of making sure these rules are removed properly. i.e., same as calling DisableApplicationLauncher("rulename") in .NET. Otherwise, when the rule triggers and the app is not installed, CE will display an error message to user saying it could not launch the app, etc.
A: DisableApplicationLauncher does what you want. Do you mean to do it some other way?

Luis Cabrera [MS] (Expert):
Q: Luis: I know it does... but that will not be called during the uninstall of my app., thereby leaving the user with an error message next time that rule triggers. Know what I mean? How to resolve?
A: I see. I guess you could create a SetupDLL that gets called when your application gets uninstalled to remove the registry entries. Unfortunately, we don't have support for Managed DLLs.

Luis Cabrera [MS] (Expert):
Q: Luis: Re SetupDLL ... I suppose I can write all my code in .NET (to Disable App Launcher rules, etc.) and shell to this from the SetupDLL, blocking on it until it exits. Alright, will proceed down this path.
A: Yep, sounds good to me.

Luis Cabrera [MS] (Expert):
Q: Luis: How can you tell WinCE remove programs to not install certain DLLs from the SetupDLL? Is that even possible?
A: Well, it is possible to delete them once you realize you don't need them.

Luis Cabrera [MS] (Expert):
Q: Luis: I mean, won't the Remove Programs on the app just delete the files since it installed them ? Know what I mean?
A: I see what you mean. But you could create a copy as part of your SetupDLL, and delete the original files. Remove Programs will not know how to find copies of those files. Does that make sense.

ArianeJa_MSFT (Expert):
Q: Last chat I asked about getting to the root cause of format failures using the Microsoft FAL and doing a full format in CE 5.0 that myself and others have seen and reported on news groups. I'd like to get an answer this time.
A: Can you clarify the problem? How are you trying to format and what type of errors are you getting?

ArianeJa_MSFT (Expert):
Q: Regarding the format failure question: When doing a format that does a write of every sector the format fails with the FAL reporting there are no free sectors left. If area being formatted should equal the size of the partitioned area for this to occur. This newsgroup link has more info: https://groups.google.com/group/microsoft.public.windowsce.platbuilder/browse_thread/thread/3e789786a0d8a833/ccb29379f58595f5?lnk=st&q;=&rnum;=30&hl;=en#ccb29379f58595f5
A: This is a known issue with flash. The format will fail on the last sector when you attempt to do a full format. You shouldn't need to full format with flash anyways, as the quick format will be equivalent. Forcing every sector to be written (which is what the full format does) will degrade performance over time. Are you trying to do a type of secure wipe, or guarantee that the flash is clean?

ArianeJa_MSFT (Expert):
Q: Yes, a full format to wipe clean the memory and for production validation of the flash memory from an OS level
A: Flash shouldn’t be force formatted by writing every sector, and if you attempt, you will fail on the last sector. For most users, quick-wiping should be sufficient for what they need. Our suggestion is to use IOCTL_DISK_FORMAT_MEDIA https://msdn2.microsoft.com/library/ms920585.aspx which will not fail.

Sue Loh [MS] (Moderator):
If you’re just joining us, welcome to today’s chat regarding Windows CE 5.0 and CE 6 beta! Your questions, comments and feedback are welcome.

JamesS [MSFT] (Expert):
Q: Are there any plans to ever improve the Windows CE command shell? CE has been around for a long time now and yet it has the worst command shell I have ever encountered. It is barely usable. I waste a lot of time working around it's limitations. I usually use it for testing. This means batch scripts and overall UI for the system. Keep in mind, it is the most reliable and fastest UI for CE. That's why I work with it so much. And on headless systems it's the only thing available. (excuse me if I come across too negative, but I am just trying to be straighforward about this)
A: What command shell are you referring to? And what are you using it for again?

Sue Loh [MS] (Moderator):
Q: Are there any plans to ever improve the Windows CE command shell? CE has been around for a long time now and yet it has the worst command shell I have ever encountered. It is barely usable. I waste a lot of time working around it's limitations. I usually use it for testing. This means batch scripts and overall UI for the system. Keep in mind, it is the most reliable and fastest UI for CE. That's why I work with it so much. And on headless systems it's the only thing available. (excuse me if I come across too negative, but I am just trying to be straighforward about this)
A: Not at all, if it is painful, please let us know so we can fix it. We need to know whether you're talking about Target Control (PC side) or cmd.exe (device side) and what exactly is broken for you.

Sue Loh [MS] (Moderator):
Q: I am referring to the command prompt shell (telnet's shell). I understand there is a CE debugging shell with some powerful capabilities. However, the simple command prompt shell is much faster and more intuitive than the CE debugging shell. Feel free to correct my shell terminology, I sometimes get the different titles for the available shells mixed up. I mean the device side shell (cmd.exe) Telnet spins off an instance of cmd.exe for the user. I often (incorrectly) refer to them as one and the same.
A: Hi Tom, so I still want to make sure I'm clear because you said telnet and now you say cmd.exe. I think the two share "console.dll" in common so that could actually be what you're asking about. But anyway. I don't think there are any plans in the works to make many changes to any of these tools, so please let me know what you'd like to see improved and I'll make sure we log the issues.

Sue Loh [MS] (Moderator):
Q: JamesS, Sue, What I find broken is the simplistic built-in commands available. Something so simple as a for loop, or setting env. variables to be the console output of a program, or multi-statement if-else blocks. These are not available.
A: Oh sorry I didn't see this message when I wrote my last one. Yeah scripting is DEFINITELY very primitive or nonexistent. Env. variables don't exist on Windows CE at all.

Sue Loh [MS] (Moderator):
Q: Sue, I often use the Unix bash shell. I use this as the standard of comparison. I suggest a few people on the CE team spend a week or two with the bash shell (iti is available on Windows) and see the terrific scripting opportunities it opens up.
A: Okay, well it appears our consensus is -- don't expect fancy scripting or anything in the existing shell anytime soon. :-( It is possible that shell improvements will come someday. So I would like to discuss why you need this. I don't think many of our customers have expressed need for lots of scripting.

Sue Loh [MS] (Moderator):
Q: I hope so. I know PB and CE have some good testing utilities available. However, much of the time I find they incur a steep learning curve and a large overhead of dev time and resources. And are a bit constricting in scope.
A: So, what you're doing is writing test applications and then using a script to run a bunch of them [on a headless device]?

John Spaith [ms] (Expert):
Q: A mix of both. Often small test apps are written. I would like more opportunity to glue them together into an automated procedure by way of cmd shell scripts.
A: The best I can offer now is for you to write an app that looks at CreateProcess() return codes or alternately something clever with XML configuration files to contain information about tests to run and a small app you'd write to parse through the test config and run based on that. We don't claim this is the same experience as a more mature shell. I owned cmd.exe for about 3 years and I use it every day for my own dev/test, you're the only customer that's ever asked for even a small feature in cmd, which is why I'm afraid we don't have a better story for you. Sorry.

KenSadah_MSFT (Expert):
Q: what about "bonjour" on CE?
A: Bonjour is an Apple technology - please contact Apple for more details, or refer to https://www.apple.com

KenSadah_MSFT (Expert):
Q: bonjour - don't care, if it's from Apple or not. I'd like to have the best technology available. Is MS not interested in standards?
A: Thanks for your reply - it would be worth knowing what you would like to do with a technology like Bonjour. While Apple's documentation does state that Bonjour is an "open, standards-based networking technology", I don't believe it has been approved by a standards committee (such as IEEE) as a "standard". Please contact contact Apple for more details.

KenSadah_MSFT (Expert):
A: Also see https://en.wikipedia.org/wiki/Zeroconf#Apple_Bonjour regarding Bonjour's status as a "standard".

Karel Danihelka [MS] (Expert):
Q: I have a driver that needs to unload itself, is there a way that my dll can call DeInit on itself? If not, what is the recommended way for a driver to unload itself?
A: Best way is call your parent bus to unload driver. See bus driver documentation how to do it.

Juggs RavaliA_MSFT (Expert):
Q: I have a driver that needs to unload itself, is there a way that my dll can call DeInit on itself? If not, what is the recommended way for a driver to unload itself?
A: Using the Parent bus driver would be the best way to unload the driver. It you really have to have the driver unload itself then you would need the driver handle and do it on the application's thread context like during the IOControl call. If you unload the driver on the driver's own thread - say using an IST, you might hit an exception.

KenSadah_MSFT (Expert):
Q: what future proof technology do you suggest for intermachine communication (PC to CE) that includes stateful connections and callback mechanisms?
A: What is your ultimate goal? Do you need to use this in an application, or are you considering developing a diagnostic tool such as a remote tool?

KenSadah_MSFT (Expert):
Q: what future proof technology do you suggest for intermachine communication (PC to CE) that includes stateful connections and callback mechanisms?
A: If you are going to be developing a remote tool, then you may want to evaluate the Smart Devices Remote Tools Framework --> https://www.microsoft.com/downloads/details.aspx?FamilyID=35e9ef0f-833f-4987-9d1f-157a0a6a76e4&DisplayLang;=en

MikeCal [msft] (Expert):
Q: Is there a good reason why you have removed the pxa255 platform from CE5? What is your general strategy to support both pxa255 and pxa270 in the future?
A: At some point the chip manufacturer stops selling the chips for new development. When they do that, we usually stop shipping the platform with our distributions. It's possible that you can get platform code from the chip manufacturer for longer than we distribute the platform. The confusion here is Intel's recent sale of XScale stuff to Marvel. So, at this point I'm not sure who the "chip manufacturer" responsible for the platform code is.

PaulT_MVP (Expert):
Q: Is there a good reason why you have removed the pxa255 platform from CE5? What is your general strategy to support both pxa255 and pxa270 in the future?
A: Support for the PXA255 is still there. What's been removed is the Lubbock BSP. If you have your own hardware, presumably you have a BSP for it. You should find porting instructions for BSPs moving from CE4.x to CE5 in the CE5 help. It should not be a huge job, by the way...

David_Liao_MSFT (Expert):
Q: @PaultT\_MVP: Looking into CE6b, pxa255 is now completely integrated with pxa27x. Are they both the same? Same register set? I don't understand the MS strategy.
A: I don't think so it should use pxa25x.

Sue Loh [MS] (Moderator):
Q: @PaultT\_MVP: Looking into CE6b, pxa255 is now completely integrated with pxa27x. Are they both the same? Same register set? I don't understand the MS strategy.
A: Actually I am not 100% sure but I think pxa25x might be dropped now. We may only ship pxa27x code now. You could probably still make a pxa25x device work on CE6 beta, but I think we don’t ship BSP code for it.

Luis Cabrera [MS] (Expert):
Q: Is there a home screen plugin XML parsing example anywhere? The webcast located here https://support.microsoft.com/default.aspx?scid=kb;en-us;817783 suggests that they will be posting one soon, but this was over 3 years ago now and there's nothing out there that I can find. It would help plugin developers provide the same level of support/behavior that the MS provided plugins have. (label, font, positioning, variable substitution, etc.)
A: Have you checked the homescreen located at C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Samples\CPP\Win32\Homescreen. If that one does not do it, we don't have such a sample.

Luis Cabrera [MS] (Expert):
Q: Luis: Yes, but that sample only reads in the plugin name, and does nothing sophisticated such as how to handle parameters that override the default parameters node, etc. I also had to figure out simple things like drawing the bottom border properly, such as drawing the bottom border properly, etc. I would think MS would provide a good sample for handling this so that all plugins behave as users expect--just like the MS provided plugins.
A: I know. Unfortunately we don't have any better sample right now. I will open a work item bug. If you are interested in specific items for that sample, please shoot me an email, so that I can attach your email to the bug.

Luis Cabrera [MS] (Expert):
Q: When installing multiple apps (via multiple cabs) that use shared libraries, is there a way to have one that uninstalls but leaves the common libraries installed on the directory since it is still "refcounted" by the other apps? i.e., like COM ref. counts or is the GAC the only way? I have a few cabs, each share the same .NET DLLs but I am currently not GAC'ing the common DLLs. Uninstalling one app will break the others. GAC the only solution?
A: As far as I know that is not possible. What we do for components like Compact Framework is ask people to install/uninstall it separately so that the user can decide when to uninstall those components. Unfortunately we don't have the functionality you mention.

Luis Cabrera [MS] (Expert):
Q: When installing multiple apps (via multiple cabs) that use shared libraries, is there a way to have one that uninstalls but leaves the common libraries installed on the directory since it is still "refcounted" by the other apps? i.e., like COM ref. counts or is the GAC the only way? I have a few cabs, each share the same .NET DLLs but I am currently not GAC'ing the common DLLs. Uninstalling one app will break the others. GAC the only solution?
A: As I mentioned, we don't have such a functionality for counting references. You could implement your own using a SetupDLL and some of your own logic. The GAC does not have to do with counting references, it has to do with having a common location and a versioning system that allows your applications to see your dlls. BTW, the GAC will only work for managed assemblies.

Luis Cabrera [MS] (Expert):
Q: Luis: re GAC. So you would suggest having a separate CAB called "Common" or something that installs all the shared libs that is a prereq for all the other apps?
A: Yes, something like "My framework". I know this is not ideal user experience. But that's the easiest thing to do if you don't have the time to create SetUp DLLs that ref count whenever they install/uninstall.

jsirois_MSFT (Expert):
Q: I am accessing the camera driver via CreateFile(). I've noticed that I am unable to open it after another app has opened and released it (i.e., the built-in Camera app), IF I tried to access it while it was in use by another app. , it fails.. (more)
A: The camera driver doesn't respect the "shared" flags, it only allows one connection at a time. My guess is that the built-in camera application hasn't actually released the camera driver even though the app isn't visible (smart-minimized). I've seen this on my phone too, once the camera app gets the camera driver, it really doesn't let go of it. (I don't see anything wrong with your code either).

jsirois_MSFT (Expert):
Q: hmm... I've seen this behavior between two apps in which neither are the built-in camera app to. Something , must be going on... hm This is the line of code that opens the driver--anything wrong? hCamera = CreateFile(L"CAM1:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(g_Camera == NULL) g_Camera = CreateFile(L"CAM1:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(g_Camera != INVALID_HANDLE_VALUE) { CSPROPERTY_CAMERACONTROL_S cc;
memset(&cc;, 0, sizeof(cc));
cc.Property.Set = PROPSETID_VIDCAP_CAMERACONTROL;
cc.Property.Id = CSPROPERTY_CAMERACONTROL_FLASH;
cc.Property.Flags = CSPROPERTY_TYPE_SET;
cc.Flags = CSPROPERTY_CAMERACONTROL_FLAGS_MANUAL;
cc.Value = on ? 1 : 0;
DWORD ret = 0;
success = DeviceIoControl(g_Camera, IOCTL_CS_PROPERTY, &cc;, sizeof(cc), NULL, 0, &ret;, NULL);
A: Sorry, I'm haven't seen that problem with the camera driver. Have you seen it on multiple devices? I'm wondering if it might be a driver specific bug... Do you get a handle to the driver after the CreateFile call?

jsirois_MSFT (Expert):
Q: jsirois: It could be... I've only tried it on one specific WM 5.0 smartphone. I've not looked at this problem in awhile, but I think the handle was a valid handle--it just didnt respond to my IOControl commands.

David_Liao_MSFT (Expert):
Q: The USB bus using a USB analyzer, the "clear feature" command is in fact sent by the host controller. Is this the proper behavior? or need I send the Clear feature command?
A: Did you call ResetPipe? If yes, it is correct behavior.

David_Liao_MSFT (Expert):
Q: (just to make sure the question wasn't lost :), is LPRESET_PIPE supposed to send a clear feature command and it is not documented, or should it not, and I need to send it myself.
A: It does send out clear feature (STALL) command to function.

David_Liao_MSFT (Expert):
Q: Hi David, glad to know. Please note that the documentation in the code and on the web claim otherwise (see https://msdn2.microsoft.com/library/ms902172.aspx)
A: You are right. We need update the document. Thank you for bringing it up.

MikeCal [msft] (Expert):
Q: Another question, when adding a driver to a wince based retail device, usually the registry cannot be changed permanently. How can you load a driver as "BuiltIn" in such a situation? (and not have the driver pop up)?
A: When you say "changed permanently" do you mean that you want the driver to still be there if the user says to reset the device to its factory settings? The only way to do that is to work with the OEM who makes the device and have them add you to their system. They can do it after the fact with an Image Update, but only the OEM is guaranteed to be able to create Image Update packages for you to use.

Sue Loh [MS] (Moderator):
Q: Will the WCF server parts be included in CE6?
A: We discussed this and among all the experts here, nobody knows. I personally doubt it.

Sue Loh [MS] (Moderator):
Q: what is the roadmap for .NET 3.0 on CE?
A: Same answer -- nobody here knows. :-(

David_Liao_MSFT (Expert):
Q: Mainstone III shipped without any concurrency management in accessing its GPIO registers so it was possible to have two concurrent read/modify/write operations corrupt each others data. Was MS III considered a production quality BSP?
A: I should say Yes. Because the GPIO is pre assign the platform ( not dynamically allocated resource). When the platform hardware is fixed, the GPIO assigment should be fixed too. So, I don't see a lot of need to manage the GPIO.

PaulT_MVP (Expert):
Q: Regarding answer to Q[71] - regardless of dynamic vs. statically allocation GPIO bits the problem remains exactly the same. If I need to set a single bit in a GPIO register I need to do a read/modify/write. 2 threads doing this can give corrupt gpio.
A: Markmo: that's not the way any of the XScale processors work. This GPIO is connected to your own custom hardware on a Mainstone-like board? Then it's up to *you* to control access to it with a mutex. Otherwise, you're going to have to tell us what hardware it's connected to and what driver from MS controls it...

Karel Danihelka [MS] (Expert):
Q: Regarding answer to Q[71] - regardless of dynamic vs. statically allocation GPIO bits the problem remains exactly the same. If I need to set a single bit in a GPIO register I need to do a read/modify/write. 2 threads doing this can give corrupt gpio.
A: Write driver for GPIO which will do synchronization via critical section and call it from you driver via standard I/O operations. I highly recommend to use this approach for any hardware (one driver touching one hardware registers).

Sue Loh [MS] (Moderator):
We’ve got about 5 minutes left in today’s chat concerning Windows CE 5.0 and CE 6 beta. Our experts will be working on the last few questions

STJONG_MSFT (Expert):
Q: How do I add another supported device type to Winsock, akin to IRDA. I have a satellite modem that uses a messaging based protocol which needs to be quite efficient with regard to overhead in the packets but would like to use winsock for the interface.
A: A winsock layered service provider that talks to your base provider for your satellite protocol.

Sue Loh [MS] (Moderator):
I'm sorry, we are out of time. I'll let our experts finish up the last few questions they're working on but we'll have to wrap up the chat. Thank you for joining us today for our Windows CE 5.0 / CE 6 beta chat!

Sue Loh [MS] (Moderator):
We’ll see you again for another chat next month, please check https://msdn.microsoft.com/chats for the list of upcoming chats.

Top of pageTop of page