顯示具有 Windows CE 標籤的文章。 顯示所有文章
顯示具有 Windows CE 標籤的文章。 顯示所有文章

2013年10月30日 星期三

如何自动cradle wince模拟器

http://m.blog.csdn.net/blog/chief1985/5429861#

wince的模拟器有个Device Emulator Manager,这里面可以对模拟器进行cradle,之后Device Emulator Manager会是activesync和模拟器建立连接(DMA方式),之后wince的一些工具就可以用了。例如cecopy.exe,cedir.exe等,下面是一个列表:
cecopy.exe:拷贝文件到wince设备或模拟器(反过来也可以)
cedel.exe:删除wince设备或模拟器上的文件
cedir.exe:列举文件
ceexec.exe:执行程序
cegetinfo.exe:获取剩余空间信息
cemkdir.exe:创建目录
cereg.exe:注册表操作
这些工具的意义看名字就知道了,可以在http://www.microsoft.com/downloads/details.aspx?familyid=74473FD6-1DCC-47AA-AB28-6A2B006EDFE9&displaylang=en下载,这里面还有一些别的工具。
cradle一般的做法是Device Emulator Manager右键来选择。对于喜欢命令行一键搞定的程序员来说,cradle是一个比较麻烦的事,有没有可以在命令行里面cradle的方法呢?
答案是肯定的。在msdn里面,微软提供了一个对Device Emulator Manager编程的方法(http://msdn.microsoft.com/en-us/library/bb887543.aspx)。大家可以从http://download.microsoft.com/download/3/6/1/361517d0-2054-4d41-af95-36d18e141df5/DEMAutomationSetup.msi下载这个例子,然后进行编译,编译一般会报错,说找不到DEMComInterface.tlb,这就需要更改一些工程的Include目录。例子的作者将Device Emulator装在d盘,我们只需要将这个目录改为自己的Device Emulator安装地方就可以了。DEMAutomation支持如下命令,其中就有cradle 。Device Emulator Manager提供的API可以参考http://msdn.microsoft.com/en-us/library/bb531169.aspx
List :列举模拟器
bringtofront [VMID|Name] :窗口置顶
connect [VMID|Name] :连接
cradle [VMID|Name]
clearsavestate [VMID|Name]
getconfiguration [VMID|Name] [existing device configuration file]
reset [VMID|Name]
uncradle [VMID|Name]
setconfiguration [VMID|Name] [device configuration file to create]
shutdown [VMID|Name]

参考网址:
http://msdn.microsoft.com/en-us/library/bb887543.aspx
http://msdn.microsoft.com/en-us/library/bb531169.aspx
http://social.msdn.microsoft.com/Forums/en-US/microsoftdeviceemu/thread/84fb02dc-2510-46b4-98e9-541297d555c4

2013年10月27日 星期日

Something relating to Windows CE/ Mobile


.NET Compact Framework

Microsoft .NET Compact Framework 是 Windows Mobile 和 Windows Embedded CE 裝置上不可或缺的元件,它可讓您建置和執行 Managed 應用程式以及使用 Web 服務。.NET Compact Framework 包含經最佳化的 Common Language Runtime (CLR) 和 .NET Framework 類別庫 (Class Library) 子集,後者支援如 Windows Communication Foundation (WCF) 和 Windows Form 等功能。此外,其中也包含專為 .NET Compact Framework 設計的類別。

.NET Compact Framework 可支援 Visual Basic 和 Visual C# 開發。目前它並不支援 C++ 開發。

.NET Compact Framework 繼承 Common Language Runtime 的完整 .NET Framework 架構,可用於執行 Managed 程式碼,還提供與 Windows CE 作業系統裝置的互通性 (Interoperability),使您可以存取原生 (Native) 的函式,並將您最喜歡的原生元件整合到應用程式中。

下列圖例摘要說明 .NET Compact Framework 平台架構。

.NET Compact Framework 架構圖形



.NETCF and Window Phone 7

Windows Phone 7 Series Application development platform is based on Microsoft Silverlight and XNA Framework – that are underneath powered by .NET Compact Framework (.NETCF). .NETCF provides the managed runtime environment for both Silverlight and XNA applications targeting Windows Phone 7.



Windows Mobile 5.0 - Emulators: copying files and ActiveSync

Shared Folder

The emulators allow you create a shared folder - a folder on your desktop PC, that appears as a Storage Card on the emulated device. Open up the Emulator's properties from "File / Configure.." and then select a Shared Folder from the textbox.

ActiveSync

Now this is really cool. The new emulators can actually connect to the copy of ActiveSync running on your desktop, and they behave like a real, physical device. This means you can select Explore, and wander through their file system copying and pasting files. This is by far the simplest way to copy your support files to your emulator. You can even copy CAB files, and test your new installers (something I'll cover in another blog entry very soon).

To get ActiveSync working, first configure ActiveSync itself (you'll need the very latest version), by opening "Connection Settings", and changing the pull-down under "Allow connections to one of the following" to "DMA". DMA is "Direct Memory Access", and allows the emulator to create a direct connection with ActiveSync without any extra wires.

Next, from within Visual Studio, open the Tools menu and select "Device Emulator Manger". From within this dialog, find the current emulator you are using, right click, and select "Cradle".

Then on the emulated device itself, open the ActiveSync tool, and select "Connect via DMA..." from the menu option.

And that's it! You should see ActiveSync starting as if the emulator was a real device. Now if you click Explore on the ActiveSync dialog, you can drill down to whatever location you need to copy and paste files.


Step by Step: Using Microsoft Device Emulator In-Depth in Your Application Development Experienc



Getting Started with Building Windows Mobile Solutions with Visual Studio and Windows Mobile 6 SDK


Windows 7 - Using the Windows Mobile Emulator