Windows Embedded CE and Windows Mobile (July 29, 2008)
Chat Topic: Windows Embedded CE and Windows Mobile
Date: Tuesday, July 29, 2008
Please note: portions of this chat 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 and Windows Mobile! We are pleased to welcome our Experts for today’s chat. I will have them introduce themselves now.
Introductions:
MikeCal [msft] (Expert):
Hi, I'm Mike Calligaro and I'm a developer on the tools team (Debugger, etc).
Matt Gosline [MSFT] (Expert):
Hi! My name is Matt and I am a developer on the WinCE Device Drivers team.
russellk_MSFT (Expert):
Hi, I'm Russ Keldorph. I work on native C++ compilers and runtime libraries.
Sing Wee [MS] (Expert):
Hi, I'm Sing Wee, part of the General Embedded BSP Test 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!
GLanger_MS (Expert):
Hi, I'm Glen Langer, a program manager with BSPs on the Windows Embedded CE team.
Rajran[MS] (Expert):
Hi, I,m Rajeev Rangappa, BSP PM in WinCE team.
Sue Loh [MS] (Moderator):
Let’s start the chat!
Start of chat:
Sing Wee [MS] (Expert):
Q: What are the latest features in Windows CE?
A: You might find the following "What's New in Windows Embedded CE 6.0" page useful:
https://msdn.microsoft.com/en-us/library/aa924105.aspx
Also, if you're looking for features specifically in CE 6.0 R2, this "What's New in Windows Embedded CE 6.0 R2" page will be useful to you: https://msdn.microsoft.com/en-us/embedded/bb894656.aspx
MikeCal [msft] (Expert):
Q: Hello experts, how can i received messages like WM_KEYDOWN from IVideoWindow in an .NET C# application?
I use p/invoke on a native code dll which builds and controls my filtergraph. this dll gets the Form.Handle of the C# application as IntPtr and then calls IVideoWindow.put_Owner() and IVideoWindow.put_MessageDrain() with this handle. This works without any error from this functions. But when rendering data and pressing keys or mousebuttons. my C# app never gets this messages! please help. Thx. we use CF 3.5 in windows ce 6.0
A: Does your app have focus? Shouldn't you be getting keyboard events through the normal OnKeyDown event handlers? I'd expect the keyboard events to be coming from the keyboard, not the Video window.
Matt Gosline [MSFT] (Expert):
Q: How can I add com4? and is the sysintr equal to (irq+10) by default ?
A: You will need to add registry entries for your serial device under HKEY_LOCAL_MACHINE\Drivers\BuiltInSerial appropriate for your hardware. See https://msdn.microsoft.com/en-us/library/aa909922.aspx
Matt Gosline [MSFT] (Expert):
Q: How can I add com4? and is the sysintr equal to (irq+10) by default ?
A: The SysIntr value is equal to 16 plus the value of the IRQ.
MikeCal [msft] (Expert):
Q: Here https://channel9.msdn.com/wiki/cedeveloper/bspvmoptimization/ says that one can use Reduce DLLs that go into slot 1 and overflowing into slot 0 using OEMDRIVERSHIGH. Does it work under windows CE 5.0? I could not find any reference in the PB 5.0 doc.
A: Yes, OEMDRIVERSHIGH is a CE 5.0 concept. In CE6 and beyond, we have enough virtual memory than we don't need to worry about filling up slots anymore.
MikeCal [msft] (Expert):
Q: Thanks, but where do I find information on how to use OEMDRIVERSHIGH?
A: The real documentation should be in the OEM docs, but there's a great blog article here:
https://blogs.msdn.com/hopperx/archive/2007/07/02/saving-vm-by-using-oemdrivershigh-package.aspx
Sue Loh [MS] (Moderator):
Q: we need the DevHealth tool also for WinCE 5.0...could be it possible to have it?
A: Sorry, but DevHealth was never released for anything but Windows Mobile, and only to WM OEMs. It included some WM-specific code so it wouldn't even run on plain CE.
Sue Loh [MS] (Moderator):
Q: Sue has a nice video about using mi full command, it would be great a followup explaining better how to find the heaps, stacks etc for every process...
A: Thanks, but besides DevHealth we don't have any nicer ways to find things. For heaps you could use ToolHelp to figure out what pieces are heap memory. There's no other tool for stacks than MI/DevHealth (which themselves don't help you figure out what thread it is).
Sue Loh [MS] (Moderator):
Q: We have a SDK privileged signed block driver based on the RAM disk sample. It works on every SDKCerts.cab PPC/Smartphone except the Pantech Duo and the Motorola Q9--ActivateDevice fails, GetLastError says ERROR_FILE_NOT_FOUND, and DllMain isn't entered. Is this a device.exe memory issue? Could ActivateDevice not be supported on these devices as MSDN suggests? How can I debug this device specific issue? LoadLibrary on the driver in \Windows does work, so it is not a dependency issue. Thanks!
A: Let me rephrase to make sure I understand right: on most devices the block driver works fine, but on a couple, ActivateDevice fails with FILE_NOT_FOUND. But on those devices, LoadLibrary succeeds on the same driver. Is that correct? Yeah, it is possible that this is a virtual memory problem in device.exe, but unlikely since the driver is not in ROM and not loaded into any other process at the time. It's also possible it's a signing issue, but again unlikely since it runs on other devices. I'm trying to think of other possible issues...
Sue Loh [MS] (Moderator):
Q: right, the block driver isn't loaded into any other process except when ActivateDevice is called. It is being installed in a CAB and that CAB is privileged signed as are the DLLs EXEs. It only happens on the Pantech Duo and Q9. LoadLibrary works on those. I've read that device.exe can have problems if there are too many drivers. There won't be enough memory once my driver is loaded on demand? And then ActivateDevice will return ERROR_FILE_NOT_FOUND. Device.exe already has 101 DLLs loaded on the Pantech.
A: So I've been looking and it does seem that the device manager generically reports FILE_NOT_FOUND in a lot of cases, including low virtual memory. And that error is common for low virtual memory issues. So this might be your problem.
Unfortunately we don't provide many tools to investigate how much virtual memory is available, to non-OEMs. But the way you can investigate is by looping through the virtual memory of device.exe with VirtualQuery(), to see how much address space is left.
Travis Hobrla is separately trying to see if these OEMs might have locked down the devices, and will answer separately.
Travis Hobrla [MS] (Expert):
Q: Also MSDN says that ActivateDevice may not be supported--an OEM decision. Could Pantech/Motorola disable 3rd party drivers?
A: It's possible with some special reworking of the OS code but it is extremely unlikely. I think you're looking at an out-of-memory condition, which Sue can describe more. One question: when you say "LoadLibrary works on those", what are "those"?
Travis Hobrla [MS] (Expert):
Q: Is there anything else I can do to debug why ActivateDevice is failing on these certain devices?
A: If you're not an OEM, you're unfortunately pretty limited in OOM conditions. You don't really have control over which drivers get loaded at boot time so it's difficult for you to free up more virtual memory for yourself.
Travis Hobrla [MS] (Expert):
Q: Thanks Travis. LoadLibrary works on the Pantech Duo and the Q9. Basically I have some test code after ActivateDevice fails which does a LoadLibrary to make sure its not a dependency issue. That always succeeds and coredll.dll is the only dependency anyway.
A: It's possible that there's no virtual memory left in device.exe but there is memory left in your application process. This could explain why LoadLibrary works otherwise.
Sing Wee [MS] (Expert):
Q: HI, how can I use CEDebugX with a WinCE 5.0 project? The documentation names a dll (CeDebugX50.dll) but it does not explain how to use it...
A: In your Target Control window, you can use ".listext" to see the debugger extensions that are already loaded. Assuming CEDebugX isn't listed, then you can do the following:
.unloadall
.load
(At this point, a window should pop up asking you to find the CEDebugX.dll)
After selecting the DLL, you can then type "!help" to find a list of commands. The online documentation is also useful: https://msdn.microsoft.com/en-us/library/bb509784.aspx
MikeCal [msft] (Expert):
Q: How to expose Windows CE 5.0 as COM port to XP machine instead of activesync?
A: Sorry, but I need to ask some clarifying questions. Are you an OEM or an ISV (do you have the ablity to change the device's drivers or not)? Is this a Windows Mobile device, or a General Embedded device? Are you trying to plug into a serial port or are you trying to use USB and have it show up as a COM port?
Matt Gosline [MSFT] (Expert):
Q: To use the High Speed Serial Port Driver, the documentation states that it is needed to link the serial driver with the SER16550.lib, and also to add isr16550.dll and IsrHandler to the registry. But it seems that it is not enough. It seems that the implementation needs to be changed. What else do we need to do to use the Speed Serial Port Driver with a OO16550 based driver?
A: You need to make sure you have a registry entry for your device under HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial and you need to either include the binary in your image.
Matt Gosline [MSFT] (Expert):
Q: Thanks Matt, I have also that entry in my registry...
A: Have you tried running your driver on a checked build and running KITL and Platform Builder to capture error messages? The error logging is much more verbose on checked builds and may help you determine why your serial driver is not loading.
Jaspet_MSFT (Expert):
Q: Hi, I have a query on Windows Mobile, Do this Windows Mobile OS platform supports GPS Module to have a satellite navigation?
A: Hi, Yes, WM does support GPS.
PaulT [MVP] (Expert):
Q: Hi, I have a query on Windows Mobile, Do this Windows Mobile OS platform supports GPS Module to have a satellite navigation?
A: As with anything, the answer is "That depends". Since most GPS devices appear like serial ports, yes, some will work with almost any Windows Mobile device. However, that does NOT mean that there's some mapping software in there!
murtuzab_MSFT (Expert):
Q: How can I programatically control media files such as mp3 with play/pause,next,previous,stop controls through the media player included in windows ce ?
A: Hi, you can either host the WMP OCX in your app and use the Windows Media Player Methods (https://msdn.microsoft.com/en-us/library/aa908943.aspx) or if you are writing your own DirectShow based app, you can use IMediaControl (https://msdn.microsoft.com/en-us/library/aa916467.aspx) to play/pause/stop etc the graph.
Sue Loh [MS] (Moderator):
Q: Could it be said that a tilt sensor (accelerometer) would become standard in Windows Mobile devices? If so would there we support for this in the Compact Framework or part of the Windows Mobile Managed APIs?
A: Sorry, we cannot discuss features that may or may not be in future releases. We can only discuss publicly announced information.
GLanger_MS (Expert):
Q: Hi I have a question about Navready 2009. Whethere Navready profile provides support for activesync over on Windows CE 5.0?
A: NavReady 2009 is a PND-specific Feature Pack for Windows CE 5.0. NavReady inherits all the features and support available in CE 5.0, including support for ActiveSync.
MikeCal [msft] (Expert):
Q: How can I set systemIdle time in Windows Mobile device ? Is there any control panel applet as in Windows CE?
A: Are you asking about setting the time that the system waits before it goes idle? Different devices will have different control panels, but all of them have some way to set that. It's often under "Power Management" and usually has times for when the device is on battery power and when plugged in. Sorry I can't be more specific. Our OEMs can create their own control panels, so where these settings will be can change from device to device.
Crystk_MSFT (Expert):
Q: Hello, how is it possible to connect from a Windows Mobile 6.1 device over PAN (Bluetooth) to other devices. There is the MS BT stack installed and the PAN profile is listed. I want to create a connection over PAN and then communicate over sockets
A: Winsock has an option to use Bluetooth as the transport. So you should only need to establish a winsock connection to be able ot communicate between devices
Crystk_MSFT (Expert):
Q: Winsock has an option to use Bluetooth as the transport-right. But as I have understood, the winsock is communicating over RFCOMM, but I have a device which can only be connected via PAN profile which is not part of RFCOMM.Right? So - How?
A: This doc shows you how to establish a bluetooth socket. https://msdn.microsoft.com/en-us/library/aa916859.aspx
Jaspet_MSFT (Expert):
Q: On https://msdn.microsoft.com/en-us/library/aa915806.aspx there is described how to create a BT PAN connection. Is somewhere a sample for it? It would be very helpful.
A: I don't think we have a BT PAN sample in the WM SDK at this point. We will consider it for a future release.
GregScott_MSFT (Expert):
Q: Hello, how is it possible to connect from a Windows Mobile 6.1 device over PAN (Bluetooth) to other devices. There is the MS BT stack installed and the PAN profile is listed. I want to create a connection over PAN and then communicate over sockets
A: Short answer is that we do not support this.
Sue Loh [MS] (Moderator):
Q: Where to find DCS (Device Command Shell) Tool for Visual Studio? I cannot find it anywhere. I found it on https://blogs.msdn.com/vsdteam/archive/tags/Author_3A00_+Ori+Amiga/default.aspx
A: Try contacting the VSD team bloggers using the contact form at https://blogs.msdn.com/vsdteam/contact.aspx.
Tom [MSFT] (Expert):
Q: GAPI is going to be deprecated and Microsoft is recommending DirectDraw instead (https://tinyurl.com/5lv4k9). However, a lot of people is complaing about focus changing and key handling issues. Are you addressing those issues?
A: We will try to address issues if we are aware of them. Can you explain what the issues are that you feel need to be addressed?
murtuzab_MSFT (Expert):
Q: any expert with knowlage of IVideoWindow in DSHOW ?
A: I can try to help, what is your question?
MikeCal [msft] (Expert):
Q: Thx, my c# app does not get messages (WM_KEYDOWN etc) while the IVideoWindow is used to render data
A: I wouldn't expect a C# app to get WM_KEYDOWN messages. I expect your OnKeyDown event to get signaled. Or are you saying that it works when you're not connected to an IVideoWindow but doesn't when you are connected?
dcook [MS] (Expert):
Q: Right, only when not connected i receive events
A: When your form's window has focus, you will receive events for your form. When the IVideoWindow has focus, it receives the events instead of your form's window.
luciad_MSFT (Expert):
Q: I use OnKeyDown, and only get messages (keydown event) when the videowindow is not active.
A: Did you call put_MessageDrain?
luciad_MSFT (Expert):
Q: Yes i do. but i have the filtergraph in a native code dll and make p/invoke to initialize the filtergraph. to my init(HWND hwnd,...) i pass the Form.Handle as IntPtr and use this as HWND to put_MessageDrain. HRESULT is 0x0, so no error ?
A: Yes, 0 means no error. You will need to turn on debugging msgs in quartz to verify what is happening to them. Turn on debugging msgs by setting CE Debug Zones/quartz - the first 4 debug zones should be on. To forward video window messages to the parent window, use the IVideoWindow::put_MessageDrain https://msdn.microsoft.com/en-us/library/ms931982.aspx method, supplying the window handle of the parent window. This method does not post messages automatically.
Tom [MSFT] (Expert):
Q: Hi,I hav a query,Do the windows mobile platform supports DVB-H receiver module to receive TV Signals?
A: Microsoft does not provide any direct support for DVB-H, but it should be possible to add this support. I would recommend adding it as a DirectShow source filter.
MikeCal [msft] (Expert):
Q: Hi,I hav a query,Do the windows mobile platform supports DVB-H receiver module to receive TV Signals?
A: While the OS itself doesn't have specific support for this, our OEMs can write drivers to support just about anything. I know that we've had TV enabled devices in the past. I'm not sure if they were DVB-H or another standard, though.
MikeCal [msft] (Expert):
Q: I hav a query,How can i connect HSPDA/UMTS?As im not aware of UMTS NETWORK coz India network operators doesn't support UMTS NETWORK?So can any expert can explain me this?
A: If you need to connect to UMTS, you need a UMTS network to connect to. Are you doing development that needs to target UMTS specifically? Maybe you can outsource some of the development to people living in a country that does have local UMTS available?
MikeCal [msft] (Expert):
Q: I have a query,Can i avail secret codes for instant battery backup in windows Mobile? Example:like some codes in Nokia does provide for instant battery Backup
A: Can you explain what you mean by "Instant Battery Backup"? What do you want to back up? Because we store our data in Flash, we don't lose anything when the batteries die.
MikeCal [msft] (Expert):
Q: Why windows mobile doesn't support IR Module?
A: It does. We've had support for IR for a very long time now. However, our OEMs choose whether or not to put IR in their devices. IR was very important when there was no other way to connect to other devices, but most people prefer Bluetooth now. So many OEMs are leaving IR out and using Bluetooth instead.
PaulT [MVP] (Expert):
Q: Why windows mobile doesn't support IR Module?
A: Windows Mobile *does* support IR modules. The reason no new WM devices have IR should be obvious: no users want them.
Sue Loh [MS] (Moderator):
Q: Hello Experts,I have a query,Do this Windows Mobile OS Platform Supports 4G?
A: If an OEM wishes to create a phone that includes 4G support then I don't think there is anything in Windows Mobile to prevent that. But I if you are asking whether ALL WM phones support 4G then the answer is no.
Jaspet_MSFT (Expert):
Q: I wanna develop applications for Windows Mobile,So where can i avail SDK'S?
A: Please check out the following site that has a bunch of information about WM SDKs. https://msdn.microsoft.com/en-us/windowsmobile/default.aspx
PaulT [MVP] (Expert):
Q: I wanna develop applications for Windows Mobile,So where can i avail SDK'S?
A: www.microsoft.com/downloads. Search for the SDK you want, something like "windows mobile 5 pocket pc sdk" should do it.
Sue Loh [MS] (Moderator):
Q: Why Microsoft windows mobile doesn't provide internal memory/internal harddisk? example:like 8GB INTERNAL HARDDISK FOR NOKIA N95
A: OEMs are welcome to build whatever storage they want into their devices, but Microsoft does not dictate that they must do this. All WM devices have some storage, and I believe they all support some form of removable storage card as well.
Sue Loh [MS] (Moderator):
Q: Do windows mobile OS PLATFORM supports java mobile applications?
A: Microsoft does not ship any Java support, but I think there are 3rd party java VMs you can download
dcook [MS] (Expert):
Q: Do microsoft windows mobile OS platform supports Virtualization of platforms like Symbian OS, Windows Mobile OS on a single desktop in mobile? Example: like in windows we are able to run Multiple OS in single desktop using virtual PC, Can i avail virtualization software application for windows mobile?
A: Microsoft does not offer any virtualization software for running other operating systems under Windows Mobile.
Sue Loh [MS] (Moderator):
Q: I have a query, Do windows mobile support APACHE SERVER? Can i avail the APACHE MOBILE SERVER APPLICATION PLATFORM?
A: I don’t think Microsoft ships any web servers. If you wish to write one, buy one from a 3rd party or port one, there is nothing stopping you from putting one on your phone. Someone may have already ported Apache to Windows CE/Mobile.
PaulT [MVP] (Expert):
Q: I have a query, Do windows mobile support APACHE SERVER? Can i avail the APACHE MOBILE SERVER APPLICATION PLATFORM?
A: Venu: All of these sorts of questions are essentially the same: "Does WM support <hardware device>?" The answer is almost always going to be the same, "Not directly in the OS with some API, but the OS can have a driver for the device installed."
Jaspet_MSFT (Expert):
Q: I have a query, Do windows mobile support APACHE SERVER? Can i avail the APACHE MOBILE SERVER APPLICATION PLATFORM?
A: Hi Venu. I suggest you take a look at the WM documentation on MSDN to find answers to all of your questions about what is supported by the OS. https://msdn.microsoft.com/en-us/library/bb158532.aspx
Travis Hobrla [MS] (Expert):
Q: In CEPC (x86) platform.reg on line 128 and 294 you get the error messages "@ XIPREGION IF without matching @XIPREGION IF" yet you can always build this project ? is this a mistake on VStudios part ? or should we close the regions ourselves ?
A: Did you modify platform.reg at all? I don't recall this error in our testing.
Travis Hobrla [MS] (Expert):
Q: Travis, you get this with the default build on platform.reg but you can always build the project anyways
A: This is Windows CE6.0, yes? I am looking at the file now and I see where the problem is. You should be able to ignore it safely.
dcook [MS] (Expert):
Q: how can I find out the devices own IP-Address from managed code?
A: Use System.Net.Dns.GetHostAddresses("");
dcook [MS] (Expert):
Q: I would if wouldn't return an exception!
A: Oh, right - that is not available on CF. GetHostEntry should work.
dcook [MS] (Expert):
Q: GetHostEntry also returns a SocketException - any native API I could P/Invoke?
A: That means the system was unable to look up the information. You would get this error if your device did not have an IP address assigned at the time of the query. You could try p/invoke to winsock's gethostname followed by getaddrinfo (call WSAStartup first), though you might get the same result (fail to resolve an address).
Sue Loh [MS] (Moderator):
Q: Hi, I would like to know if there is any possibility to access a network share under WindowsCE, based on IP-addresses. I know that WindowsCE doesn't support network access (with copy or net use) based on hostnames only, but is there any workaround?
I have already tried to create a static ip-to-hostname mapping in registry (\HLKM\comm\tcpip\hosts), which works great for pining the destination device, but copying an file still failes.
A: Hi, unfortunately it seems we don't have anyone from our networking team on the chat today to help with this. I think there is a way to do this. I suggest posting on one of our newsgroups (like microsoft.public.windowsce.platbuilder) and/or contacting the networking team through their blog contact form (https://blogs.msdn.com/cenet/ - email link on right).
PaulT [MVP] (Expert):
Q: Hi, I would like to know if there is any possibility to access a network share under WindowsCE, based on IP-addresses. I know that WindowsCE doesn't support network access (with copy or net use) based on hostnames only, but is there any workaround?
I have already tried to create a static ip-to-hostname mapping in registry (\HLKM\comm\tcpip\hosts), which works great for pining the destination device, but copying an file still failes.
A: You can access network shares on Windows desktop machines from Windows CE, if you include the network redirector component in your OS build. You do want to use IP? There's a net use command that does that, exactly...
**PaulT [MVP] (Expert):
Q:**as far as I have discovered "net use" on windows CE doesn't work with IPs
A: OK, so you can successfully do your mapping, as long as you specify a host name, just not an IP address? I'll think about that and see if something other than what you've already tried comes to mind...
**PaulT [MVP] (Expert):
Q:**as far as I have discovered "net use" on windows CE doesn't work with IPs
A: It looks to me like the most-promising way would be to use the registry: HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts\<host name entry>. Take a look in the help and see if this might work for you. It's just doing a NETBIOS name lookup, so I don't see a way to do that. You might try gethostbyaddr(), then using that name...
Travis Hobrla [MS] (Expert):
Q: anyway I can programatically control the backlight of my windows ce 6 device ?
A: Are you talking about for a single device or all devices?
Travis Hobrla [MS] (Expert):
Q: as in device I mean the one running windows ce itself, thought maybe there was a general call to some libraries that controlled the backlight in anyway like lowering the brightness as in sceensaver mode
A: Currently, most devices implement a custom backlight - it could be controlled by a legacy-named 'BKL' device, or it may be tied to the display driver. Some OEMs implement a custom control panel app for controlling it. So it's really device-dependent at this point. There's no consistent way to control it from an app. If you want it on you should be able to do that by setting power requirements in your app. But controlling dimming is something that most OEMs don't want apps to do - the driver would have to manage conflicting requirements in an intelligent way. Instead, the driver and power manager take that responsibility on themselves.
Sue Loh [MS] (Moderator):
Q: When network connectivity is lost on a DHCP-configured CE5 device, I often get an error dialog saying that DHCP server couldn't be reached, etc. How do I avoid that best and cause attempts to get an address to continue forever?
A: Sorry Paul, I don't think anyone from our networking team is online to help you. If you've posted on a newsgroup, forward me a link or something, and I'll try to get someone to help.
PaulT [MVP] (Expert):
Q: I think we need more example for windows service on CE6.. I have seen some on MSDN, but those require too many tweak. We need simple managed web service example or tutorial
A: There are Send Feedback links on most pages of the CE6 help. Pick a suitable page where you'd like to see a better example, and use that link. The docs guys do, actually, read those messages!
Sue Loh [MS] (Moderator):
Hello everyone, we are just about out of time. Thank you for joining us today for our Windows Embedded CE 6.0 and Windows Mobile chat today!
A special thank you to the product group members for coming out. Please check https://msdn.microsoft.com/chats for the list of upcoming chats.
If you still have unanswered questions, let me suggest that you post them on one of our newsgroups, such as Microsoft.public.windowsce.platbuilder.