beautypg.com

Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 18

background image

Publication 2711P-UM005A-EN-P - March 2007

18 Introduction to the PanelView Plus CE Terminal

Restoring the Default Registry

There are times when it is necessary to remove the Persistent Registry
and restore the Default Registry. There are 2 methods for achieving
the Default Registry:

1. Startup in the Safe Mode by pressing the Default and Reset

buttons on the right side of the chassis.

See the User Manual for details. The Safe Mode ignores the
Persistent Registry and uses the Default Registry. Note that the
Persistent Registry is not altered and returns on the next startup;
unless, the Default Registry is flushed. If flushed, the Default
Registry replaces the Persistent Registry. Normally, flushing the
Registry while in Safe Mode is undesirable because the Persistent
Registry is lost.

2. Remove the Persistent Registry and force a retreat to the Default

Registry.

The system parameter
RM_PARAMETER_PERSISTENT_REGISTRY_PRESENT allows an
application to delete the Persistent Registry. Note that until
rebooted, the Registry in RAM remains unchanged, so flushing
the Registry will effectively cancel the delete action. Normally, a
reboot immediately follows the call to delete the Registry. The
program RestoreRegistry.exe that is distributed on the Accessory
CD utilizes this system parameter.

When manipulating the Registry, applications and users should
exercise the same degree of caution that would be required of a
Windows NT/2000/XP system. Errant changes to the Registry can have
disastrous consequences, such as when device drivers are involved.
The Safe Mode provides a means to recover.

Registry Flushing

A specialized service runs continuously in the background and
monitors the Registry for changes every 2.5 seconds. Registry changes
may occur programmatically or by a User via Control Panel. When a
change is detected, the Registry is automatically flushed. This
mechanism is sometimes referred to as lazy flush since no other action
is required. Alternatively, the Registry can be persisted explicitly and
immediately by calling DeviceIoControl() with
CTL_SYSMON_FLUSH_REGISTRY. This is recommended whenever a
shutdown might occur before the lazy flush can confidently store
away the Registry changes.