3.1.7 Other Local Events

The remote registry server supports access to the registry key namespace (KEYS32 and KEYS64) on the local server by using the same interface as used in remote access, except for the remote server binding. The behavior of local APIs is consistent with locally invoking the Windows Remote Registry Protocol methods on the server.

In addition, the remote registry server MUST be notified of the following local system-wide events, and take the corresponding action as described in the Windows Remote Registry Protocol methods in the preceding sections.

Startup

The remote registry server is made aware of system startup or initialization and perform any preliminary processing required to prepare the remote registry server for client requests. Specifically, the server MUST:

  • Set the value of the SHUTDOWNINPROGRESS ADM element to FALSE.

  • Initialize the FLUSH_TIMER interval and activate the periodic timer.

  • Initialize the HANDLETABLE. The HANDLETABLE SHOULD have no pre-populated data.

Shutdown

The remote registry server is made aware of system shutdown or termination and fail incoming client requests during system shutdown. Methods in the remote registry protocol will fail and return ERROR_WRITE_PROTECT when server shutdown has been initiated. The server MUST set the value of the SHUTDOWNINPROGRESS ADM element to TRUE when a shutdown operation begins.

The server MUST process the key and value data flush event as described in Key and Value Data Flush.

Any keys with a KEYTYPE of volatile (0x00000001) MUST be deleted (see Key Types (section 3.1.1.2)).

Any keys with a KEYTYPE of nonvolatile (0x00000000) MUST be persisted to the backing store and are preserved when the registry server loses context due to a system restart, reboot, or shut down process (see Key Types (section 3.1.1.2)).

If the server host operating system supports a method to stall the system shutdown, this protocol server MUST stall the system shutdown until all operations in this shutdown event have completed.

Key and Value Data Flush

The flush event occurs due to the expiration of the FLUSH_TIMER as part of the FLUSH_TIMER_EVENT, and also when system shutdown occurs.

When the FLUSH_TIMER expires, the server MUST write all key and value data from KEYS32 and KEYS64 to the backing store for each key that does not have the KEYNOPERIODICFLUSH property set.

When system shutdown occurs, keys that have the KEYNOPERIODICFLUSH property set are discarded.