C++ 用于 Visual Studio 2008 的 Windows CE SDK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1440537/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 19:58:56  来源:igfitidea点击:

Windows CE SDK for Visual Studio 2008

c++visual-studio-2008windows-mobilewindows-ce

提问by Sujay Ghosh

I am new to Windows CE programming.

我是 Windows CE 编程的新手。

I have Visual Studio 2008 and Visual Studio 2005. I have found the following SDK for Windows Mobile

我有 Visual Studio 2008 和 Visual Studio 2005。我找到了以下适用于 Windows Mobile 的 SDK

http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&displaylang=en

http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&displaylang=en

Please help me in deciding if this is the correct one, or please feel free to redirect me the correct one

请帮助我确定这是否正确,或者请随时将正确的重定向给我

Thanks in advance Sujay

提前致谢 苏杰

回答by Shaihi

If you are targetting a Windows CE device (and not Windows Mobile), then each device has it's own specific SDK. If you are not using a device specific functionality, you create a C# for Windows CE 5.0 application and it will work on every Windows CE device that has the .Net component included in the image.
Don't mix Windows CE and Windows Mobile. Windows Mobile 5-6.5 is based on Windows CE 5.0, but has a standard SDK (different SDK's for different versions of the Windows Mobile at use). Windows CE, as I mentioned, is used in specific solutions and you should get the SDK form the OEM.

如果您的目标是 Windows CE 设备(而不是 Windows Mobile),那么每个设备都有自己特定的 SDK。如果您没有使用特定于设备的功能,您可以为 Windows CE 5.0 应用程序创建一个 C#,它可以在映像中包含 .Net 组件的每个 Windows CE 设备上运行。
不要混合使用 Windows CE 和 Windows Mobile。Windows Mobile 5-6.5 基于 Windows CE 5.0,但具有标准 SDK(不同版本的 Windows Mobile 使用不同的 SDK)。正如我所提到的,Windows CE 用于特定解决方案,您应该从 OEM 获取 SDK。

回答by Mike Z

If you need a Windows CE Emulator get it here http://www.microsoft.com/downloads/thankyou.aspx?familyId=a120e012-ca31-4be9-a3bf-b9bf4f64ce72&displayLang=en

如果您需要 Windows CE 模拟器,请在此处获取 http://www.microsoft.com/downloads/thankyou.aspx?familyId=a120e012-ca31-4be9-a3bf-b9bf4f64ce72&displayLang=en

and to setup the Emulator look at this guide http://www.hpc.net/chat.asp?ObjectID=97662

并设置模拟器查看本指南http://www.hpc.net/chat.asp?ObjectID=97662

Edit: The hpc.net link is now dead so here is what was found on the page using the wayback machine. https://web.archive.org/web/20070428121320/http://www.hpc.net/chat.asp?ObjectID=97662

编辑:hpc.net 链接现已失效,因此这是使用回溯机器在页面上找到的内容。https://web.archive.org/web/20070428121320/http://www.hpc.net/chat.asp?ObjectID=97662

Connecting the CE 5.0 Emulator to VS2005

将 CE 5.0 仿真器连接到 VS2005

  1. This uses the network method and saves the emulator state. It does not use activesync, communications ports or a null modem cable.

    Start the emulator using a shortcut command that is something like this:

    "C:\Program Files\Windows CE 5.0 Emulator\Emulator_500.exe" nk.cem /video 640x480x16 /Ethernet virtualswitch /sharedfolder "C:\CE5SharedFolder"

    The shared folder appears on the emulator as \My Device\Storage Card. Using the shared folder, copy the following files to the \My Device\Windows\ folder on the emulator. These files are located on the host at \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\x86, or similar

    • Clientshutdown.exe
    • ConmanClient2.exe
    • CMaccept.exe
    • eDbgTL.dll
    • TcpConnectionA.dll
  2. Select Emulator -> Start Menu -> run -> \Windows\conmanclient2.exe.

  3. Get the IP address of the emulator by double-clicking on the T networking symbol bottom left. If it has no ip address try installing Microsoft Loopback Adapter on the host, check for Virtual Machine Network Services, or other host networking hacks. (This is the difficult bit).

  4. To check that the emulator is responding, on the host type Ping at a DOS prompt.

  5. To get "Save State" working on the emulator, shut down the emulator using the "Save State" option. Then navigate to Host -> My Documents -> My Virtual Machines

  6. The saved state is in the folder that is named with a curly brackets string similar to {06A8A448-EB8B-4E0B-8A88-451412A10C66} say, and known as a GUID. Attempt to rename this folder so that you can highlight and copy the GUID string itself (not the folder).

  7. Then add an option, which is similar to /vmid {06A8A448-EB8B-4E0B-8A88-451412A10C66}, to the emulator shortcut command above.

  8. The shortcut should now start the emulator from its saved state. It is a good idea to back up the saved state folder.

  9. On the host select Visual Studio 2005 -> Tools -> Options -> Device Tools -> Devices

  10. Then select Windows CE 5.0 Device -> Properties -> Configure

  11. In the "Configure TCP/IP Transport" dialog box, select "Use specific IP address", and then type the emulator IP address you found above.

  12. Close the dialog boxes.

  13. Select Emulator -> Start -> run -> \Windows\cMaccept.exe and connect to the emulator from VS2005 within three minutes.

  14. Run your application from Start Debugging in VS2005 and VS2005 should deploy the two cab files nectcfv2.wce5.x86.cab and system_SR_enu.cab first (this may take some time), and then your application.

  15. Close your application in the emulator (I've had trouble using the Stop button on the host).

  16. Shut down the emulator using the "Save State" option.

  17. You may need to re-run cMaccept each time you restart the emulator or VS2005, but the cab files should not need to deploy again, and the emulator ip address should remain the same.

  18. To avoid cMaccept navigate host -> programs -> Microsoft Visual Studio 2005 -> Visual Studio Remote Tools -> Remote Registry Editor

  19. In the "Select a Windows Device" dialog box that appears highlight the "Windows CE 5.0 Device" option

  20. In the emulator run cMaccept and then immediately click OK in the Remote Registry Editor

  21. Highlight Windows CE 5.0 -> HKLM -> System

  22. Right click in the right hand pane and select New DWORD value.

  23. In the name field type (exactly and without the quotes) "CoreConOverrideSecurity" and set its value to 1

  24. Close the editor. Shut down the emulator with Save State.

  1. 这使用网络方法并保存模拟器状态。它不使用 activesync、通信端口或空调制解调器电缆。

    使用如下所示的快捷命令启动模拟器:

    "C:\Program Files\Windows CE 5.0 Emulator\Emulator_500.exe" nk.cem /video 640x480x16 /Ethernet virtualswitch /sharedfolder "C:\CE5SharedFolder"

    共享文件夹在模拟器上显示为 \My Device\Storage Card。使用共享文件夹,将以下文件复制到模拟器上的 \My Device\Windows\ 文件夹中。这些文件位于主机上的 \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\x86 或类似位置

    • 客户端关闭程序
    • ConmanClient2.exe
    • CMaccept.exe
    • 数据库文件
    • TcpConnectionA.dll
  2. 选择模拟器 -> 开始菜单 -> 运行 -> \Windows\conmanclient2.exe。

  3. 通过双击左下角的 T 网络符号获取仿真器的 IP 地址。如果它没有 ip 地址,请尝试在主机上安装 Microsoft Loopback Adapter,检查虚拟机网络服务或其他主机网络黑客。(这是困难的一点)。

  4. 要检查模拟器是否有响应,请在主机上的 DOS 提示符下键入 Ping。

  5. 要在模拟器上运行“保存状态”,请使用“保存状态”选项关闭模拟器。然后导航到主机 -> 我的文档 -> 我的虚拟机

  6. 保存的状态位于以类似于 {06A8A448-EB8B-4E0B-8A88-451412A10C66} 的大括号字符串命名的文件夹中,称为 GUID。尝试重命名此文件夹,以便您可以突出显示并复制 GUID 字符串本身(而不是文件夹)。

  7. 然后在上面的模拟器快捷命令中添加一个类似于 /vmid {06A8A448-EB8B-4E0B-8A88-451412A10C66} 的选项。

  8. 快捷方式现在应该从其保存的状态启动模拟器。备份保存的状态文件夹是个好主意。

  9. 在主机上选择 Visual Studio 2005 -> 工具 -> 选项 -> 设备工具 -> 设备

  10. 然后选择 Windows CE 5.0 设备 -> 属性 -> 配置

  11. 在“配置 TCP/IP 传输”对话框中,选择“使用特定 IP 地址”,然后键入您在上面找到的仿真器 IP 地址。

  12. 关闭对话框。

  13. 选择 Emulator -> Start -> run -> \Windows\cMaccept.exe 并在三分钟内从 VS2005 连接到模拟器。

  14. 在 VS2005 和 VS2005 中从开始调试运行您的应用程序应该首先部署两个 cab 文件 neccfv2.wce5.x86.cab 和 system_SR_enu.cab(这可能需要一些时间),然后是您的应用程序。

  15. 在模拟器中关闭您的应用程序(我在使用主机上的停止按钮时遇到了问题)。

  16. 使用“保存状态”选项关闭模拟器。

  17. 每次重启模拟器或者VS2005可能需要重新运行cMaccept,但是cab文件应该不需要再次部署,模拟器ip地址应该保持不变。

  18. 避免 cMaccept 导航主机 -> 程序 -> Microsoft Visual Studio 2005 -> Visual Studio 远程工具 -> 远程注册表编辑器

  19. 在出现的“选择 Windows 设备”对话框中突出显示“Windows CE 5.0 设备”选项

  20. 在模拟器中运行 cMaccept,然后立即在远程注册表编辑器中单击确定

  21. 突出显示 Windows CE 5.0 -> HKLM -> 系统

  22. 右键单击右侧窗格并选择新建 DWORD 值。

  23. 在名称字段中键入(完全没有引号)“CoreConOverrideSecurity”并将其值设置为 1

  24. 关闭编辑器。使用 Save State 关闭模拟器。

回答by Rap

First off, Sujay, I'll assume you didn't mean Windows CE explicitly. I'll assume you meant programming for handheld devices running a Microsoft operating system. CE hasn't been used for five or six years. The devices are all running Windows Mobile. 6.5 is the most popular now.

首先,Sujay,我假设您不是明确指的是 Windows CE。我假设您的意思是为运行 Microsoft 操作系统的手持设备编程。CE 已经有五六年没有使用了。这些设备都运行 Windows Mobile。6.5是现在最流行的。

You do not need an SDK to program for Windows Mobile in Visual Studio. It is already baked in. If you want to get the latest tools to develop on Windows Mobile 6, then yes, the locationyou specified is perfect.

在 Visual Studio 中为 Windows Mobile 编程不需要 SDK。它已经内置了。如果您想获得在 Windows Mobile 6 上开发的最新工具,那么是的,您指定的位置是完美的。

Here's another great place to get high-level info: Windows Mobile Development Center

这是获取高级信息的另一个好地方:Windows Mobile 开发中心

回答by Naruto

I think you can use C# and create smartdevice project, and use c# for making apps,use unmanaged code by improting DLL's..

我认为您可以使用 C# 并创建智能设备项目,并使用 C# 制作应用程序,通过引入 DLL 来使用非托管代码..

for more sample just see "Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CPP" here u get some samples.

有关更多示例,请参阅“Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CPP”,您可以在此处获取一些示例。