Windows CE .NET

Posted April 1, 2003

Chat Date: March 18, 2003

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

Chat Participants:

  • Susan Loh, a developer on the Windows CE OS
  • Mike Markley, a developer on the Windows CE Compiler Team
  • Brian Kramer, Windows CE Compiler Dev Lead
  • John Eldridge, a developer on the Windows CE Core OS
  • Upender Sandadi, a developer on the Windows CE Tools team

Moderator: Ken (Microsoft)
Welcome to today's MSDN Chat. Our topic is Windows CE .NET. Questions, comments, and suggestions are welcome.

And welcome to our hosts today.

Host: Susan (Microsoft)
Hi, I'm Susan Loh, a developer on the Windows CE OS. I've worked in the past on the file system / registry / databases, and now I work on system performance.

Host: Mike (Microsoft)
Hi, I'm Mike Markley, a developer on the Windows CE Compiler Team. I've worked on the compilers, developed drivers and BSPs.

Host: Brian (Microsoft)
Brian Kramer. Windows CE Compiler Dev Lead.

Host: John (Microsoft)
Hi, I'm John Eldridge, a developer on the Windows CE Core OS. Areas of expertise include kernel and device drivers.

Host: Upender (Microsoft)
Hi, I'm Upender Sandadi, a developer on the Windows CE Tools team. I've worked on the KITL desktop components, download services, and Remote tools.

Host: John (Microsoft)
Q: I'm implementing my own security manager the for 4.1 BT stack. I could not install my HCI extension because the component btsysd (btshell) which implements MS BT security manager could not be removed and I get linker errors if I do so.

A: Investigating now for you.

Host: Brian (Microsoft)
Q: I would like to know about upward compatibility for applications built with eVC. My initial tests show executables built with eVC don't run under CE.NET. Is that true? My test app was a WinMain that just called ::GetMessage

A: Several things may be involved here. Can you give more information on how your test app fails?

Host: John (Microsoft)
Q: How do I suspend/resume LCD connected to COM1 on the custom platform built with PB 4.1 from within application?

A: How is your LCD connected to COM1? What driver control do you have of it?

Host: Susan (Microsoft)
Q: Would it be better for me to use only CeopenDatabaseex instead of Ceopendatabase? I have a dialog with some edit boxes...

A: It depends on what you're trying to do. CeOpenDatabase only opens databases that are in the object store, not a separate volume, and it doesn't support the CEDBASEINFOEX structure which gives you multiple-property sort orders.

Host: Brian (Microsoft)
Q: Yes, I get a message saying it is not a valid windows CE application.

A: In general, you should be able to take an app built for a particular version (say 4.00) and run on an os of a higher version (say 4.20). But you need to make sure the image type is the same. Use dumpbin -headers on your executable to verify that the image type matches the OS and the linker subsystem version is no greater than the OS's version.

Host: Susan (Microsoft)
Q: I am aware of the user mode API. For some reasons, I have to replace the btsysd. I noticed that only the functions begin with btshell_ in btsysd implement the security manager. correct?

A: That is correct. The source for it is part of private source release, you should probably get it (there's NDA to sign if I remember correctly) to reference as you are replacing it.

Host: Susan (Microsoft)
Q: Can I just implement them if MS could provide security manager as a separate module?

A: We currently don't, so I don't think this is a path that would answer your needs within the current release.

Host: Susan (Microsoft)
Q: My database is in my compact flash... so I should use ceopendatabaseex2?

A: I'd suggest you use the most recent API, yes.

Host: Brian (Microsoft)
Q: If the image type is wrong, what do I need to change in eVC?

A: The linker /subsystem:windowsce,x.yy controls the version number. /machine controls the image type. Are you running on an SH3 device by any chance? There was a change in the alignment. You need the /align:4096 linker flag when running on 4.10.

Host: Susan (Microsoft)
Q: Susan: The source is available for PB 4.1?

A: No, it's in McKendric 4.2

Host: Susan (Microsoft)
Q: We are utilizing Disk-On-Chip (FAT) in custom CE device (PB 4.1). Can I somehow utilize built-in tools to perform scan/defrag from within my application? Or can I utilize NTFS or other FS better than FAT? I need to boot from DOC also.

A: Check fatutils in public\common\oak\drivers\fsd\fatutil

Host: Sridhar (Microsoft)
Q: We are utilizing Disk-On-Chip (FAT) in custom CE device (PB 4.1). Can I utilize built-in tools to perform scan/defrag?

A: Yes, we ship Scan and Defrag tools in PB that you can use on your DiskOnChip device that is managed by FAT FS.

Host: Susan (Microsoft)
Q: I posted my code earlier in this chat. When I try to create my database, the ceoid = 0. Any ideas on that?

A: It is difficult to get a lot of details out of code posted in a chat room, but a common problem is that you don't initialize all of the fields in the structs. Make sure to set wVersion in both the database info and all of the sort orders you're using.

Host: Susan (Microsoft)
Q: So, can I mount non-FAT system to CE? Which one?

A: The OS lets you mount any file system you have a driver for, but drivers provided by CE are FATFS, CDFS/UDFS... There may be more but I can't think of them. We do not have a file system driver for NTFS.

Host: John (Microsoft)
Q: No, I built for ARM and tried to run on XScale

A: You got an error targeting ARM (which type) for build and running on XScale silicon?

Host: Susan (Microsoft)
Q: I set the two edit boxes like this: CEDBInfo.rgSortSpecs[0].rgPropID[0] = DBID_NAME; CEDBInfo.rgSortSpecs[0].rgPropID[1] = DBID_ID. I'm not sure the rgSortSpecs... Do I have to set both [0]?

A: I'm sorry, I don't understand what you mean when you're talking about edit boxes with the database. Are DBID_ID and DBID_NAME different from each other? Did you initialize the rgdwFlags? This may be better to carry out as a discussion on our newsgroups so that you can post more code.

Host: Shun (Microsoft)
Q: Does msxml on PPC 2002 support schema?

A: PPC2002 includes MSXML 2.5 which include some XML Schema support, but no XSD support.

Host: Susan (Microsoft)
Q: Any suggestion on how to avoid lost clusters and other FAT problems when device looses power and there files open for writing?

A: There's no way to make sure FATFS is 100% bullet-proof. If power is turned off at the wrong time, the FAT could be corrupted.

Host: Susan (Microsoft)
Q: I mean I have a dialog with two edit boxes. I want to keep the values enter by the user in the edit box in my database. No, I do not initialize rgdwFlags... Should I initialize it to CEDB_SORT_NONNULL

A: It depends on what you want. You should read through the help article on SORTORDERSPECEX to decide. If you don't want any of the flags then set it to 0.

Host: Susan (Microsoft)
Q: Susan, Sridhar: Doesn't Disk On Chip use a hardware type of indirection (similar to FlashFX S/W remapping)? If so, then defrag would be a wasted effort...

A: With a flash type device you can have two types of fragmentation. You can have logical and physical sector fragmentation. Defrag on the logical sector's will still help FAT read files in less time by coalescing the reads into larger chunks.

Host: Susan (Microsoft)
Q: Yes, that's the problem. We are storing registry hive on disk-on-chip and from time to time it gets corrupted... Can we somehow allocate part of the DOC to CE native FS? I understand FAT very good from DOS times

A: Well, no, you can't put the RAM file system on your DOC but you could write your own transacted file system. :-) Hopefully in the near future there may be a release of CE that includes a new transacted file system you can use. ;-)

Host: Susan (Microsoft)
Q: thanks... I'm not sure thought if I understand well.By properties for WNumProps, is that ok to set it to 2? (I have to different DBID, therefore WnumProps = 2)? Is that correct to have rgSortSpecs[0] and only the rgPropId changing?

A: 2 is a valid value, yes, and setting each of the values under rgSortSpecs[0] is valid. What you need to understand is what it means to have one sort order with two properties vs. two sort orders with one property each. The former case sorts primarily on the first property and only uses the second property if two records have matching first-properties. The latter is two totally separate sort orders.

Host: Susan (Microsoft)
Q: Susan, so there is NO standard way to store registry hive safely on the Disk-on-chip? Right?

A: Yes, on CE 4.0 and 4.1 that is correct.

Host: Susan (Microsoft)
Q: I see, thanks. We have to wait for 4.2 with TFAT? (found your answer in previous chats)

A: I am not able to answer questions about 4.2 in this chat, mmmm, but I can say that I hope so.

Host: Susan (Microsoft)
Q: In my case, I want to use the psort only to make sure that when I'm going to read my record, that the values will be read in order (in order to display them in the correct edit box in my dialog...) Do I have to use the psort then?

A: If you only care about the order of properties in a record, as returned by CeReadRecordProps(Ex), then the sort does not matter. Pass the order you want in the rgPropID parameter to CeReadRecordProps(Ex). Amy, if you have further questions about how to write code for the database, I suggest you post them on our newsgroups.

Host: Upender (Microsoft)
Q: Is It possible With emulator go on net?

A: Yes. As long as you boot the emulator with NAT or virtual Switch option selected in the emulator configuration dialog in PB

Moderator: Ken (Microsoft)
Thanks for joining us today and for all the great questions. It's time for us to go now.

For further information on this topic please visit the following:

Newsgroups: Mobile and embedded application development topics

Embedded Transcripts: Read the archive

Website: Visit the Mobile & Embedded Developer Center

Top of pageTop of page