次の方法で共有


Using the Sample UI to Create a Network Projector User Interface (Windows Embedded CE 6.0)

1/5/2010

The sample network projector user interface demonstrates an example of how the functionality in the Windows Network Projector service can be used to create your custom network projector menu and UI. You can use, customized, and extended these building blocks to differentiate your device and add options for your customers.

The code for the Windows Network Projector sample UI is located in %_WINCEROOT%\PUBLIC\RDP\OAK\PICTOR\PICTORAPP.

The registry settings file for the Windows Network Projector sample UI are located in %_WINCEROOT%\PUBLIC\RDP\OAK\FILES\rdp.reg.

The sample UI is provided in English.

Projector Name

During the projector discovery phase, the projector name is broadcast over the IP network and displayed in the Connection Wizard's Available Projector list during the search operation. This name is the friendly name that is displayed on the Windows Network Projector splash screen.

The sample UI demonstrates one example of how any user is able to modify the projector's friendly name. You can modify the code provided in the sample to add password protection to your device's custom UI. This would allow your customers to limit access to the projector's name to network administrators during deployment.

The projector name is defined with the following source files in %_WINCEROOT%\PUBLIC\RDP\OAK

  • PICTOR\PICTORAPP\MAIN\projectorinfo.cpp
  • \INC\projectorinfo.hpp

The name of the projector name is in Unicode and its length is limited to 50 characters, which included the terminating null character, as shown by the following code.

static const int s_MAX_FriendlyNameLength = 50;

The default projector name is CeProjector. To change the default name for your device, modify the following entry in rdp.reg.

[HKEY_LOCAL_MACHINE\Software\Microsoft\PictorService]
   "ProjectorName"="CeProjector"

The sample Network Projector application uses the functions in the Windows Network Projector service to set the projector name when it is updated by the user through the UI.

When adding the Windows Network Projector features to your existing or custom UI menu, the projector password can be updated through the follow steps.

  1. Get the current projector password (PICTOR_IOCTL_GETPASSWORD)
  2. Set the new projector name (PICTOR_IOCTL_SETNAME)
  3. Refresh the Windows Network Projector service to complete the projector name update and broadcast the new projector name for discovery (IOCTL_SERVICE_REFRESH)
  4. Reset the projector password with the value obtained in step one above (PICTOR_IOCTL_SETPASSWORD)

You can use the Windows Network Projector sample application source code in Projectorinfo.cpp as a reference.

Device Name

In addition to the projector name, the projector also has a device name. The Windows Network Projector device name can be used to connect to the projector without having to know the projector IP address. When connecting to the Windows Network Projector from a Windows Vista-based PC, the user can manually enter the device name if the network server is able to resolve the device name to the assigned IP address.

The sample network projector UI provided does not provide the projector device name, however this can be exposed in your custom device UI. You can find the public code to alter the sample layout and functionality can be found in the file %_WINCEROOT%\PUBLIC\RDP\OAK\PICTOR\PICTORAPP\MAIN\projectorinfo.cpp

To store a default value, store the device name should be stored under the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\PictorService.

Value : type Description

DeviceName : STRING

The name of the device

Projector Password

The projector password is a configurable value used to create a secure session between the Windows Network Projector and the Windows Vista-based PC. The projector password is displayed on the network projector's splash screen so that Windows Vista users within view of the projector will know the current password needed to connect.

The sample UI projector password is randomly generated and is configured to change dynamically based on a fixed time interval, regardless of connection status. You can modify the password update behavior and the options provided to the Windows Network Projector users by exposing the function settings through your custom UI.

The following list shows the files that you must modify to configure the Windows Network Projector password settings.

  • %_WINCEROOT%\PUBLIC\RDP\OAK\PICTOR\PICTORAPP\MAIN\projectorinfo.cpp
  • %_WINCEROOT%\PUBLIC\RDP\OAK\INC\passwordmanager.hpp

The registry key HKEY_LOCAL_MACHINE\Software\Wireless Projector stores the parameters related to the network projector's password. The configured settings for the sample Windows Network Projector UI are listed in the table below.

Value : type Description

PasswordLength : DWORD

The default value is 8.

Sets the length of the password.

The allowable range for values for this setting in the sample UI is 4 through 24.

The maximum password length in general is 100.

PasswordChars : DWORD

This setting determines whether the projector will use a numeric or alphanumeric password. Set this value to 0 for numeric passwords.

Set this value to 1 for alphanumeric passwords.

AutomaticPasswordChange : DWORD

This setting defines the method for forcing a password change. The following values are allowed

0 - No password change required

1 - Timer-based change

2 - Policy-based change

PasswordTimer : DWORD

The default value is 5.

Sets the amount of time, in minutes, for the password timer.

The allowable range of values for this setting is 1 through 1440.

PasswordPolicy : DWORD

Set this value to AfterSuccessfullSession or AfterUnsuccessfullSession

PasswordPolicySessionNums : DWORD

The default value is 1.

Sets the number of sessions for connecting to projector

The allowable range of values for this setting is 1 through 20.

The default network projector password is hard coded in private code as "1234" and cannot be changed. To provide a different default static password for your network projector, your custom UI must manage and enforce the password default value.

Splash Screen

The network projector splash screen is displayed when the Windows Network Projector is powered on. The splash screen provides the Windows Vista user with the necessary information about the projector to discover the device and create a secured display session.

The following source files in %_WINCEROOT%\PUBLIC\RDP\OAK\PICTOR\PICTORAPP\MAIN control the splash screen.

  • splashscreen.hpp
  • splashscreen.cpp

In its default configuration, the splash screen for the sample Network Projector UI displays the following information.

Projector: <Projector device name>

Password: <Static/dynamic password used to create a secure projector session>

URL: <Projector URL or IP address>

Password changes in: <minutes>

See Also

Other Resources

Customizing a Windows Network Projector