SideShow Console Sample (Windows CE 5.0)
10/16/2008
The SideShow console sample application illustrates the use of the SideShow API. It is a managed C# application and requires .NET Compact Framework 2.0.
Getting Started
The compiled sample generates a SideShowConsole.exe executable program. When it is run on a Windows Embedded CE powered device that includes both the SideShow service and .NET Compact Framework 2.0, a console window appears and the SideShowMgr_Start function is called to start the application's interaction with the SideShow service. Once the Windows Embedded CE powered device is connected with a Windows Vista computer using the active SideShow transport, SideShow data and message notifications will appear in the console window.
The active transport is determined by the Sysgen variable settings used to create your image. For more information about these settings, see SideShow OS Design Development.
Commands
The window has a File menu with a list of available commands.
- Force Connect
Invokes the SideShowMgr_ForceConnect function, which forces the SideShow service to immediately attempt to connect with the Windows Vista computer.
- Force Disconnect
Invokes the SideShowMgr_ForceDisconnect function, which forces the SideShow service to immediately attempt to disconnect with the Windows Vista computer. Gadgets and their items will still be available for retrieval from the SideShow cache on the Windows Embedded CE powered device.
- Connection
Displays a dialog box containing the active SideShow transport and a list of available transports. The user can select a SideShow transport. When a transport is selected and the OK button is clicked, the SideShow service is stopped using the SideShowMgr_Stop function. The service is unloaded, the registry is updated with information for the selected transport, and the SideShow service is reloaded using the SideShowMgr_Start function.
- User
Allows you to choose from a list of available users on the Windows Vista computer. This command uses the SideShowMgr_GetSizeOfAvailableUserNames and SideShowMgr_GetAvailableUserNames functions to populate a dialog box.
- Clear Screen
Removes all text from the console window.
- Close
Calls the SideShowMgr_Stop function and then exits the console application.
Usage Scenario
The following steps describe a typical usage scenario for using the Bluetooth transport:
To use the Bluetooth transport
Complete Bluetooth pairing with the Windows Vista computer.
Start SideShowConsole.exe. On the File menu, click Connection. If the Windows Embedded CE operating system (OS) includes the Bluetooth transport, it will appear in the resulting dialog box. Select the Bluetooth transport.
In the Bluetooth Devices control panel application on the Windows Vista computer, select the connected Windows Embedded CE powered device and click the Properties button. Under the Services tab, check "Windows SideShow", and then (if necessary) install the Windows SideShow driver.
The console should begin to receive WM_SIDESHOW_SELECT_USER messages.
In the SideShow console application, use the Users command to select your user name on the Windows Vista computer.
In the SideShow control panel application on the Windows Vista computer, turn on some gadgets for your Windows Embedded CE powered device. Gadget data will begin to appear in the console application window.
Missing Features
This sample application is missing some key features an OEM might want to implement in shipping a SideShow viewer application. Those missing features include include (but are not limited to):
- Rendering of SCF menus, context menus, content pages, dialog boxes, and notifications.
- When connected, provide the option to disconnect and vice-versa.
- Preventing users from entering online-only gadgets when the connection state is "disconnected".
Sample Location
The SideShow console sample application is located in the following folder:
%_WINCEROOT%\Public\Servers\SDK\Samples\SideShow\Console
Note
To make the sample-application code easier to read, security checking and error handling are not included, nor has the sample been thoroughly tested. This code sample should not be used in a release configuration unless it has been modified to include them.
Dependencies
.NET Compact Framework 2.0 (SYSGEN_DOTNETV2).
See Also
Concepts
SideShow OS Design Development