Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NETCF 3.5 + WinCE 6.0 Emulator question

92 views
Skip to first unread message

Scott Anderson

unread,
Sep 9, 2008, 1:04:07 PM9/9/08
to
I posted this question on the NETCF compact framework forum:

I am developing a NETCF 3.5 application for a device that will run Windows
CE 6.0. We have not designed the operating system on Platform Builder yet,
nor do we have the target hardware complete. I am wondering if there is a
generic Windows CE 6.0 emulator I can use for testing in the mean time, or if
I have to wait for the OS to be developed first, and use the emulator created
specifically for it. Also, I am using VS 2008 for NETCF development, so if
we have to use the emulator created specifically for the OS designed by
platform builder, can it be used in VS 2008?

They suggested I try the MSDN virtual lab to create an example platform to
emulate and test a NETCF application. I tried this but could not get the
example platform to compile on my PC. They also referred me to this newsgoup
for help, since that method only supported VS2005 anyway.

I have also tried creating a platform, rolling an SDK, installing the SDK
and then trying to target the emulator for it in VS2008, but I only get a
blank screen when I debug. I googled it and found that disabling KITL in the
OS fixed the problem for some people, but it didn't fix it for me.

Does anyone have a suggestion to get me going in the right direction?

Paul G. Tobey [eMVP]

unread,
Sep 9, 2008, 1:17:07 PM9/9/08
to
No, "generic" has no meaning in embedded development. Would a generic
device, for example, have a display? Many devices don't. Networking
support? Ditto. There used to be this totally-misnamed thing called the
"Standard SDK" that had an emulator, but everyone immediately thought that
is was somehow standard, which caused a lot of confusion.

If it were me and I wasn't sure about the hardware yet and, of course, there
was no OS configuration yet established, I'd get Platform Builder, target
the Emulator BSP only, figure out what things were almost-certainly going to
be in the real OS configuration, add those to the catalog and build myself
an SDK that only had an emulator, no real device target, as it seems you've
tried. Once you install that SDK, you should be able to target it from
VS2008. As long as your application code is just user interface and normal
API stuff, that should be good enough. You obviously won't be able to write
your super-duper-Star-Trek-transporter application until you have the
hardware and drivers for that device done, but generic application work
should be practical. When you're generating this generic emulator, make
sure you're using a Retail build, not Debug. Debug is going to be expecting
a Platform Builder connection and that's not what you want. Obviously, your
Retail build should have Kernel Debugger and KITL turned off.

Paul T.

"Scott Anderson" <ScottA...@discussions.microsoft.com> wrote in message
news:B3658BB8-C9DC-4039...@microsoft.com...

Paul G. Tobey [eMVP]

unread,
Sep 9, 2008, 4:07:45 PM9/9/08
to
And, by the way, setting the emulator peripheral options to 'Create text
console window for serial port 1', will show any serial debug messages from
the OS (such as "InitDMAKitl...Connecting to Desktop", which would indicate
the source of the problem: it's trying to talk to PB).

I went through the process I mentioned below and verified that I can build a
suitable emulator-only SDK with no problem and use it from VS2008.
Surprisingly, KITL is enabled, by default, even in Retail builds, which
seems stupid, but there you are: you have to turn it off. Once you do that,
build the emulator-based OS, build the SDK, install the SDK, you can do what
you want with it.

Paul T.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:OZXhi$pEJHA...@TK2MSFTNGP06.phx.gbl...

Scott Anderson

unread,
Sep 9, 2008, 7:52:00 PM9/9/08
to
Thanks Paul...I am now able to debug my NETCF application on a Windows CE 6.0
emulator using the method you described. Now I just need to figure out how
to get SQL Server Compact 3.5 deployed properly. VS2008 only deploys
System.Data.SqlServerCe.dll and doesn't install the cabs on the emulator, so
I get a PInvoke exception. I am trying to manually install the cabs on the
emulator but I am having problems copying the files. The solution I found on
google suggested that I create a shared folder on my PC and navigate to it
from the emulator. However when I try to enable networking on the emulator
it complains that I don't have Virtual PC 2007 installed. I installed
Virtual PC 2007, but I get the same error when I try to enable networking on
the emulator. Am I on the right track or is there a better way to accomplish
this?

Thanks a million!

Paul G. Tobey [eMVP]

unread,
Sep 9, 2008, 8:16:12 PM9/9/08
to
I'd say, "Use Remote File Viewer from the VS2008 program group on your Start
menu to copy files to the emulator." It seems to me that there was some
built-in way in the emulator to add a folder on the host PC for use as a
shared folder, but I don't use the emulator that much (this scheme wouldn't
require networking to be on).

The Virtual PC networking thing is probably because of a missing service
that should be attached to the real network adapter in the PC, Virtual
Machine Network Services. I don't recall there being a big issue with
getting that to install and work, but you could check and see if it's there
(open the properties of your network adapter from the Network Connections
applet; it should show up in the list, just like TCP/IP, Client for
Microsoft Networks, etc.) A search on that error message will probably find
you something, too.

Paul T.

"Scott Anderson" <ScottA...@discussions.microsoft.com> wrote in message

news:B8F505F5-B087-4AB7...@microsoft.com...

Chris Tacke, eMVP

unread,
Sep 10, 2008, 9:20:05 AM9/10/08
to
Add the SQL CE files as Content files to your app, mark them for "copy if
newer" and deploy.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Scott Anderson" <ScottA...@discussions.microsoft.com> wrote in message

news:B8F505F5-B087-4AB7...@microsoft.com...

Scott Anderson

unread,
Sep 11, 2008, 2:04:01 AM9/11/08
to
Thanks, I actually took a different route and installed all of the updates
for platform builder. I think it was the July update that added SQL Server
Compact to the catalog. After I selected this item, rebuilt the OS, and
rolled the SDK, the emulator had the native SQL Server Compact dlls.

Unfortunately now I am up against a different issue: when I execute a query
against the SQL Server Compact database, I get a native error:

ExceptionCode 0xc0000005 at NativeMethods.GetKeyInfo

I googled it and found one thread on the SQL Server Compact forum, which had
a solution that doesn't apply to my situation. I asked them if they had any
other ideas but I thought I'd see if you guys knew.

Thanks for any suggestions!

Scott Anderson

unread,
Sep 12, 2008, 2:20:00 PM9/12/08
to
I was able to solve this issue by taking a couple of actions...I'm not sure
which one did it:

1) I deleted the reference to System.Data.SqlServerCe in my projects and
re-added them. They were referencing version 3.5.0 of the assembly and now
they reference version 3.5.1.
2) In platform builder, I removed the catalog items "SQL Compact Managed
Provider" and "SQL Server Managed Provider" but left the item "SQL Compact."
In the release notes of the July update it said something about the managed
providers referencing the NETCF 2.0 assemblies by default, and if you only
select NETCF 3.5 and SQL Compact, then it would reference the 3.5 assemblies.

I am now able to access the SQL Compact DB but I have some pretty
significant performance issues. Actions like opening connections, executing
queries, etc are taking forever. Is this just because of the emulator
environment or are there steps I can take to optimize using SQL Compact? I
have tried removing items in the catalog that aren't needed, and increasing
the memory in the SDK, but it is still painfully slow.

Thanks for any advice.

Paul G. Tobey [eMVP]

unread,
Sep 15, 2008, 12:38:50 PM9/15/08
to
SQL CE 3.5 seems pretty quick on my real devices. I guess I'd try a real
device before concluding that there's something wrong with the database
stuff itself. I think that the emulator is a more-likely culprit for
performance problems.

Paul T.

"Scott Anderson" <ScottA...@discussions.microsoft.com> wrote in message

news:318BE004-87CF-49C0...@microsoft.com...

0 new messages