Windows Embedded CE 6.0 (December 18, 2007)

Chat Topic: Windows Embedded CE 6.0
Date: Tuesday, December 18, 2007

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

Sue Loh [MS] (Moderator):
Welcome to today's public chat. Our chat today covers the topic of Windows Embedded CE 6.0!

We are pleased to welcome our Experts for today's chat. I will have them introduce themselves now.

Introductions:

Travis Hobrla [MS] (Expert):
Hello, my name is Travis Hobrla and I'm a developer on the Windows Embedded CE BSP team.

SingWee_MSFT (Expert):
Hi I'm Sing Wee, part of the General Embedded Test Team.

MarianaNenova [MS] (Expert):
Hi I am Mariana Nenova - Software Engineer in Test for Windows CE Shell UI.

GLanger_MS (Expert):
Hi, my name is Glen Langer and I'm a program manager for BSPs on the Windows Embedded CE team.

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

Karel Danihelka [MS] (Expert):
Hi, I am Karel Danihelka - developer in image update team.

rajran_MSFT (Expert):
Hi ,My name is Rajeev Rangappa Program Manager on Windows Embedded CE Team

Sue Loh [MS] (Moderator):
Let's begin the chat!

Start of chat:

Karel Danihelka [MS] (Expert):
Q:
on an ARM 11136, should a CE 6.0 OAL set the L4 bit in the c1 control register to be 0 or 1?
A: Depends on your OAL/BSP. Cache routines are part of OAL and kernel calls them. If you will disable clean entire data cache you have not to use this function in your OAL.

Karel Danihelka [MS] (Expert):
Q:
WIth CE 6, on an ARM 1136J with ARM L210 L2 cache, does the kernel allow the OAL to take advantage of configuring the cache / writeback modes differently between L1 and L2?
A: Answer is similar to previous one. Kernel doesn't do anything special - it calls OEMCacheRangeFlush when it need to make cache is consistent in some
way.

Karel Danihelka [MS] (Expert):
Q:
Karel - the L4 bit controls whether the Thumb Mode bit gets set on loads to the PC. Please address that.
A: My apologies, somehow I missed L before number 4. Answer is set it to one :-).

Karel Danihelka [MS] (Expert):
Q:
Karel - The bits that control the behavior of the caches are in the TLB entries that are managed by the kernel. THis is not part of the cache flush
routines. Please verify your answer.
A: I see :-). Answer is similar - kernel doesn't care. It calls OEMARMCacheMode to get default value and you can call VirtualSetAttributes if you want
change behavior for particular memory mapping. I hope I get it right this time.

andyraf_MSFT (Expert):
Q:
well My question is about rotating screen for mobile application?So any help for the same.I will be using native support of display driver.
A: Can you be more specific: what is your question or problem you need to solve?

andyraf_MSFT (Expert):
Q:
I am trying to rotate screen in landscape to potrait ant vice versa as u can see in various mobile devices like htc?I am intented to do the same.
A: The API you need to use is ChangeDisplaySettingsEx with the DM_DISPLAYORIENTATION. One word of warning- be sure to test on devices with slide-out
keyboards that automagically change their orientation when the keyboard is extended; you might end up fighting the system in some situations there.

andyraf_MSFT (Expert):
Q:
I have tried the same and it worked fine,but it gives a black screen for a moment when changes take effect? I don't want to have that black screen,
I require a smooth rotation ?
A: When you say a smooth rotation, which of the following do you mean:
- An instantaneous change between portrait/landscape (and vice-versa).
- Showing an animation of the rotational transition (e.g. the way iPhone does) between the two orientations.

andyraf_MSFT (Expert):
Q:
yes any of the two,if second option is possible it will be most ok.
A: You can't use ChangeDisplaySettingsEx for that (it's too heavyweight and doesn't support animation). You'll have to roll-your-own graphics rotation
algorithm and rotate your graphics data as needed for display.

andyraf_MSFT (Expert):
Q:
ok that also i have worked on but that will rotate image only not all of the applications.As suppose i am viewing images and suddenly i rotates
screen and runs movie then the effect will not be there.
A: Potentially, if you have access to the display driver source code, you could code up the driver's implementation of ChangeDisplaySettingsEx to
attempt to rotate the display more smoothly, but I suspect it wouldn't work too well. Otherwise, I don't think there's any way to accomplish what
you're trying.

Sue Loh [MS] (Moderator):
Were you asking the same questions on a previous chat (screen rotation + black screen)? Or was it someone else?

Sue Loh [MS] (Moderator):
Q:
Yes U R correct? I am the same person expecting some thing new this time
A: I am confused why you think you'll get more. The answer won't have changed... They gave you a lot of answers last chat.

Sue Loh [MS] (Moderator):
Q:
I have developed a number of CE projects under VS2005 with parallel desktop projects. In each case, it seems that I have to have separate projects
and do parallel updates to each project (even though I have plenty of #IF WINDOWSCE/#ELSE segments!) Am I missing something? How can I get the same
project to run under both desktop and CE?
A: So you are asking how to use the same .vcproj file to govern both desktop and Windows CE build? Unfortunately, I'm pretty sure you can't. :-(
Visual Studio just isn't prepared to handle that. If you want to get a definitive answer, you could ask on the VSD team blog's contact form,
https://blogs.msdn.com/vsdteam/

PaulT_MVP (Expert):
Q:
I have developed a number of CE projects under VS2005 with parallel desktop projects. In each case, it seems that I have to have separate projects
and do parallel updates to each project (even though I have plenty of #IF WINDOWSCE/#ELSE segments!) Am I missing something? How can I get the same
project to run under both desktop and CE?
A: You'll never be able to get the *same* project, at least any C/C++ project, to run on both the desktop and the device. If you are using C# or
VB.NET and the .NET Compact Framework, your .NET CF program might also run on the desktop...

Sue Loh [MS] (Moderator):
Q:
Actually I don't mind having 2 projects -- I guess I just need to reference the same code files from each project as I am building my code files full of the #IF WINDOWSCE/#ELSE segments. So I really want 2 projects to share some files.
A: That should be possible. You can even put the two projects into the same directory. Are you having specific problems with that?

Sue Loh [MS] (Moderator):
Q:
Thanks, Sue. I'll give it a try
A: No problem, good luck.

PaulT_MVP (Expert):
Q:
Am I right in thinking that XPe is not covered in this chat? There don't seem to be any XPe-specific chats
A: need help with and it should come up with a suitable newsgroup. This chat only happens once a month, so, even if you found a chat on your topic,
chances are it won't be for a couple of weeks anyway!

Omar [MS] (Expert):
Q:
Am I right in thinking that XPe is not covered in this chat? There don't seem to be any XPe-specific chats
A: Yes, Windows XPe is not covered here. This is a Windows CE Windows Mobile chat.

mikehall_ms (Moderator):
Q:
Is there any support for using a real bluetooth chipset in the various device emulators that come with CE 6?
A: no direct support for bluetooth devices in the emulator - the emulators do support a DMA passthrough model that could be used to emulate a driver
within the emulator and talk to physical hardware on the desktop.

mikehall_ms (Moderator):
Q:
When will details about MEDC 2008 be announced?
A: the events team are working on content plans for the coming year - expect an announcement soon.

mikehall_ms (Moderator):
Q:
Where can one purchase copies of the MEDC 2007 content on DVD?
A: send me an e-mail - I will see if we can get you a copy of the content.

andyraf_MSFT (Expert):
Q:
Is there an (un)documented way to direct audio (through waveOutMessage or something simliar) to a phone's earpiece? All audio is directed to the
loudspeaker by default, and we'd like to play things on the speaker used for phone calls.
A: Sorry, there is no generic mechanism (documented or otherwise) to force audio to the phone's earpiece. The individual phone manufacturers make this
decision (there might be some OEM-specific way to do this on a particular device, but not that I'm aware of).

Karel Danihelka [MS] (Expert):
Q:
If an exception occurs in code with INTERRUPTS_OFF does thie kernel handle this any differently than with INTERRUPTS_ON?
A: Short answer is no. I don't see reason why it would be needed (when interrupts are off we shouldn't get one type of exception, but otherwise...)

mikehall_ms (Moderator):
Q:
Is there a version of the .NET Framework that works with Windows Mobile.
A: yes, the .NET Compact Framework - currently at v3.5 with Visual Studio 2008

mikehall_ms (Moderator):
Q:
Do you have a link for a version of .NET Framework for Windows Mobile
A: take a look at the Visual Studio site - https://msdn2.microsoft.com/en-us/vstudio/default.aspx

PaulT_MVP (Expert):
Q:
Do you have a link for a version of .NET Framework for Windows Mobile
A: Sorry, do you mean the run-time? https://www.microsoft.com/downloads will allow you to find it by looking for .NET Compact Framework 2.0. All WM5
and WM6 devices come with some version of .NET CF in ROM.

Sue Loh [MS] (Moderator):
Q:
I keep getting the following message: A problem has occurred with gwes.exe Please tell Microsoft about this problem at no cost to you. This data is
used exclusively to improve products. How do I stop getting this.
A: I don't think any of us are going to be able to help with that... The best I can suggest is to send the feedback. :-( It means something UI-
related crashed. You could try isolating your 3rd-party applications to see if removing any of them makes the problem go away. I'm not saying it's
definitely a 3rd-party problem, but it's one thing you can try.

Sue Loh [MS] (Moderator):
Q:
Sue the gwes.exe thing has happened as soon as I got the device out of the box
A: Well that's a pretty good indication it's not 3rd-party software then. :-( It could also be due to OEM software. But the only real support
channel that I know of for you to try is https://support.microsoft.com/. I'm sorry, I wish I had a better answer.

PaulT_MVP (Expert):
Q:
Sue the gwes.exe thing has happened as soon as I got the device out of the box
A: There are some options for display stuff (ClearType, I think is the one that rings a bell). Try turning that on or off in the Control Panel on the
device and see if the GWES thing goes away...

PaulT_MVP (Expert):
Q:
Paul I have tried that and it doesnt help I think it has to do something with verizon Palm Treo 700wx and Windows Mobile 5
A: Could be, but I had that problem on my, non-Palm WM5 device and that setting or one like it fixed the problem. Now it's fixed with an OS upgrade
from the device OEM, so you might check with Palm on that, too.

Travis Hobrla [MS] (Expert):
Q:
Where can I find the steps needed to persist hive-based registry to the IDE disk? I was not able to find a systematic how-to on newsgroups or in
documentation.
A: Did you take a look at this already? Basically you just need to add the correct registry settings to describe your IDE driver as a HIVE BOOT
SECTION driver. https://msdn2.microsoft.com/en-us/library/aa914710.aspx

Karel Danihelka [MS] (Expert):
Q:
Where can I find the steps needed to persist hive-based registry to the IDE disk? I was not able to find a systematic how-to on newsgroups or in
documentation.
A: I would agree we are missing clear description how to do it (or I don't know about it also). Best I can offer is Hive-based Registry Initialization
article on MSDN and newsgroup for help.

Omar [MS] (Expert):
Q:
Does any of the network driver stack required to be or default to be loaded as a user device vs. a kernel device? I'm seeing a bunch of
udevice.exes.
A: Didn't quite understand the question. All the network drivers are kernel mode for 6.0 and later. Before Windows CE 6.0 ran in device.exe.

Omar [MS] (Expert):
Q:
Omar - I'm seeing several devices load under udevice.exe on my system and can't explain why. I saw some debug messages that made it look like it
could be the network stack.
A: There are things which load in udevice.exe. They won't be the core network drivers. What is the issue that you have with the things loading there?

Omar [MS] (Expert):
Q:
Omar: I have an aversion to unexpected behavior in systems :). I'd like to have documentation on what load as a udevice vs. a kdevice. Seeing
processes running I can't account for is unsettling. So, I just need to know what to expect.
A: Which version of the OS are you using? Windows CE or Mobile, which version? Are you building your own embedded system or have an OEM manufactured
device?

Omar [MS] (Expert):
Q:
Omar: CE 6.0, building my own platforms.
A: to find out what services are running look under:

Omar [MS] (Expert):
Q:
Omar: CE 6.0, building my own platforms.
A: Sorry was having truoble copy and pasting: I was trying to show you where to look in the registry for services that load (under the
HKLM/drivers/builtin) The things that run user mode have a 0x10 in their flags. The previous post had a sample of ws2serv which is a user mode service

Omar [MS] (Expert):
Q:
Omar: CE 6.0, building my own platforms.
A:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Ws2Serv]
"Prefix"="WSS"
"Dll"="ws2serv.dll"
"Index"=dword:1
"Order"=dword:25
; Flags==2 is DEVFLAGS_LOADLIBRARY
; Flags==10 is user mode
"Flags"=dword:12
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\xxx]
"Prefix"="WSS"
"Dll"="ws2serv.dll"
"Index"=dword:1
"Order"=dword:25
; Flags==2 is DEVFLAGS_LOADLIBRARY
; Flags==10 is user mode
"Flags"=dword:12

Sue Loh [MS] (Moderator):
Q:
How do I integrate a custom CE 5.0 ARM emulated platform into VS2005 Device Emulator Manager?
A: This is really kind of a VS2005 question, so you might want to try asking the VSD team (https://blogs.msdn.com/vsdteam/). If I had to pull hacks to figure this out, I'd try stuff like:
- see if putting the emulator image in the same directory makes it get picked up
- grep the registry for other emulator names to see if you can find registry settings that pick up the other emulators
- dig all around the VS menus, help, and web searches...

andyraf_MSFT (Expert):
Q:
Can a DLL in kernel space do a load library on a DLL that is loaded in user space. Does the OS synthesize a kernel version of the user DLL?
A: A dll can be loaded into the kernel as long as the following constraints are met:
1. Any one of the following is true:
a. The dll is listed in the modules section of the .bib with either the K or Q flag.
b. The dll is listed in the files section of the .bib
2. Any dll's linked to that DLL also meet condition 1

EdS [MS] (Expert):
Q:
So a DLL loaded into memory from an SD Card would not be able to be LoadLibrary'd by a kernel DLL. (not in BIB) - True?
A: A DLL from an external file system can be loaded into kernel mode.

Sue Loh [MS] (Moderator):
Q:
So a DLL loaded into memory from an SD Card would not be able to be LoadLibrary'd by a kernel DLL. (not in BIB) - True?
A: Not quite - You can load a non-ROM DLL into kernel mode if it's not currently loaded in user mode. Basically you can only have one instance at a time. I don't personally like the types of race conditions that can suggest. The safer thing to do is to create TWO versions of the DLL - foo.dll plus k.foo.dll. They can be identical! When both exist, any attempt to load foo.dll into kernel mode will be redirected to k.foo.dll. That way, foo.dll will be used in (and fixed up to) user mode while k.foo.dll will be used in/fixed up to kernel mode.

It's the fixups that break you so you can't load into both. The kernel doesn't synthesize a new version of the DLL to load into opposite space. Yes,
it'd be nicer if it did, but so far the workaround is to have two DLLs. The nice thing about the workaround is that you have the option of having
different kernel/user implementations if you want. And you can take any DLL that's written to link against foo.dll, and load it in different modes
without recompiling - that theoretically gives OEMs the choice between running 3rd party drivers in user and kernel mode without recompiling.

Sue Loh [MS] (Moderator):
Q:
It looks like this chat is mostly for developers. Do you have any suggestion where I as an end user can post questions to Microsoft experts that
couldn't be answered yet in public forums?
A: There are two avenues I know to ask for help:
1. Forums on https://www.microsoft.com/en-us/default.aspx
2. Newsgroups like microsoft.public.pocketpc

Sue Loh [MS] (Moderator):
Sorry everyone, we are just about out of time.

Thank you for joining us today for our Windows Embedded CE 6.0 chat today!

If you still have unanswered questions, let me suggest that you post them on one of our newsgroups, such as Microsoft.public.windowsce.platbuilder.