System.Win.Registry.TRegistry.RegistryConnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RegistryConnect(const UNCName: string): Boolean;

C++

bool __fastcall RegistryConnect(const System::UnicodeString UNCName);

Properties

Type Visibility Source Unit Parent
function public
System.Win.Registry.pas
System.Win.Registry.hpp
System.Win.Registry TRegistry

Description

Establishes a connection to a registry on another computer.

Call RegistryConnect to establish a connection to a registry on another computer running Windows 95 or Windows NT. UNCName is the name of the remote computer, and must take the following form:

\\computername

where computername is the name of the remote computer. If UNCName is nil (Delphi) or NULL (C++), the local machine name is used.

Note: Before calling RegistryConnect, an application must set the RootKey property for its registry object to HKEY_USERS or HKEY_LOCAL_MACHINE.

If connection is successful, RegistryConnect sets the RootKey property to the root key of the remote computer and returns true. If unsuccessful, RegistryConnect returns false, and RootKey remains unchanged.

See Also