Microsoft KB Archive/253170

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 253170

Article Last Modified on 8/19/2005



APPLIES TO

  • Microsoft Windows CE Platform Builder 2.12
  • Microsoft Windows CE Toolkit for Visual Basic 6.0



This article was previously published under Q253170

SYMPTOMS

You can use Microsoft Windows CE Platform Builder version 2.12 (PB 2.12) to export a custom software development kit (SDK) for the Windows CE Toolkit for Visual Basic version 6.0 (VBCE 6.0) and successfully install it on the VBCE 6.0 development computer. However, when you start a VBCE 6.0 application for the custom platform by using the Start menu, and clicking on Run, the F5 key, the Debug/Step Into menu, the F8 key, or the Start toolbar button, the following error messages are displayed:

The platform manager could not connect to the device. This happens if the project type does not match the connected device, or if a required file in Windows CE Services, or the Platform SDK is missing or corrupt. [ErrorCode=0x80004018].

-or-


The device you are connected to is not compatible with the project type. Please check your device connection again, or choose the correct project type.

Clicking OK may result in a second error message being displayed:

There is no support on this development computer for a project of this type. You may need to install an appropriate Platform SDK or reinstall Windows CE Toolkit for Visual Basic 5.0.

NOTE: This is not a Platform Manager connection problem. The Windows CE remote tools, such as the Windows CE Remote Heap Walker, Windows CE Remote Process Viewer, Windows CE Remote Registry Editor, Windows CE Remote Spy, and Windows CE Remote Zoomin all work as expected.

NOTE: If running a VBCE application generates the preceding errors and the remote tools work without any problem, the incorrect project type is being used for a particular device. For example, these errors are generated if you attempt to run an HPC Pro project on a Palm-size PC. In VBCE, the project type must match the device type.

CAUSE

PB 2.12 is generating an incorrect key for the custom VBCE SDK. A unique key (GUID) is created for every type of Windows CE platform. This key can be found in the CEPC's or custom device's registry under:

      HKEY_LOCAL_computer\Windows CE Services\Platform
                

If this key does not match the key for the custom SDK, which is found under the "Platforms" key under the following key in the desktop development computer's registry:

      HKEY_LOCAL_computer\SOFTWARE\Microsoft\Windows CE Tools\PlatformManager
                

then the preceding error messages are displayed.

RESOLUTION

  1. Start Microsoft Windows CE Platform Builder 2.12.
  2. Open the Workspace for the custom platform.
  3. On the Build menu, click to select Build Platform to build the nk.bin file for the custom platform.
  4. Select the Platform\Export SDK\Windows CE Toolkit for Visual Basic menu item. Follow the instructions to export the VBCE SDK.
  5. Exit Microsoft Windows CE Platform Builder 2.12.
  6. Copy the exported VBCE SDK's .exe file to the VBCE 6.0 development computer.
  7. Run the VBCE SDK's .exe file by double-clicking on it in the Windows Explorer or by locating the Start menu, clicking Run, and then browsing to the .exe file. Follow the instructions to install the VBCE SDK.
  8. Run RegEdit. (RegEdit can be run by locating the key in the Start menu, clicking Run, and then browsing to the Windows directory for RegEdit.exe.)
  9. Go to the Platforms key at:

          HKEY_LOCAL_computer\SOFTWARE\Microsoft\Windows CETools\PlatformManager\{F384D888-F9AA-11D1-BB9E-00A0C9C9CCEE}
                        
  10. Under the Platforms key, select the key for the custom platform. (The Data field displays the name of the custom platform.)
  11. On the Edit menu, click Copy Key Name, and then exit RegEdit.
  12. Start Microsoft Notepad and paste the key into the file. Delete the leading part of the key, leaving only the portion specific to the custom platform. Save the file as CustomPlatform.txt.
  13. Copy CustomPlatform.txt file to the Windows CE Platform Builder computer.
  14. Open CustomPlatform.txt and copy the key.
  15. Go to the Oak\FILES folder for the custom platform and open Project.reg with Notepad.
  16. Find the following string in Project.reg:

          HKEY_LOCAL_computer\Windows CE Tools
                        
  17. Replace the key in Project.reg with the key from CustomPlatform.txt. The key follows "Platform"=".
  18. Save and exit Project.reg.
  19. Save and exit CustomPlatform.txt.
  20. Start Microsoft Windows CE Platform Builder 2.12.
  21. Open the Workspace for the custom platform.
  22. On the the Build menu, select Rebuild Platform to rebuild the nk.bin file for the custom platform.
  23. Exit Microsoft Windows CE Platform Builder 2.12. The new key in the Project.reg file replaces the original key created by PB 2.12. The target device now has a key that matches the one in the VBCE SDK.


STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Windows CE Platform Builder 2.12.
  2. Open the Workspace for the custom platform.
  3. On the Build menu, select the Build Platform item to build the nk.bin file for the custom platform.
  4. Select the Platform\Export SDK\Windows CE Toolkit for Visual C++ menu item. Follow the instructions to export the VCCE SDK.
  5. Select the Platform\Export SDK\Windows CE Toolkit for Visual Basic menu item. Follow the instructions to export the VBCE SDK.
  6. Exit Microsoft Windows CE Platform Builder 2.12.
  7. Copy the exported VCCE SDK's .exe file to the development computer.
  8. Copy the exported VBCE SDK's .exe file to the development computer.
  9. Run the VCCE SDK's .exe file by double-clicking on it in the Windows Explorer or by locating the Start menu, clicking Run, and then browsing to the .exe file. Follow the instructions to install the VCCE SDK.
  10. Run the VBCE SDK's .exe file. Follow the instructions to install the VBCE SDK.
  11. Verify that the custom device is connected to the development computer. This can be done by running one of the Windows CE remote tools.
  12. Start the Windows CE Toolkit for Visual Basic 6.0.
  13. Create a new project by selecting the custom platform project type.
  14. Verify that "Run on Target:" in the Project Properties dialog box has the custom platform's "(Default Device)" selected.
  15. Start the VBCE application by locating the Start menu and selecting Run, or by pressing the F5 key, or by using the Start toolbar button. Note that the error messages in the "Symptoms" section of this article are displayed.


Keywords: kbbug kbpending KB253170