INtime SDK Help
RtRegConnectRegistry
INtime SDK v6 > About INtime > INtime Kernel > Registry access > RtRegConnectRegistry

Establishes a connection to a predefined registry handle on another computer.

When you no longer need a handle returned by this call, you should close it by calling RtRegCloseKey.

LONG RtRegConnectRegistry(
    LPTSTR lpMachineName,  // address of name of remote computer
    HKEY hKey,             // predefined registry handle
    PHKEY phkResult        // address of buffer for remote registry handle
);

Parameters

lpMachineName
Pointer to a null-terminated string that contains the remote computer's name. The string has this form:

\\computername

If lpMachineName is NULL, the local Windows host computer name is used.
hKey
Specifies the one of these predefined registry handles on the remote computer:

HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_PERFORMANCE_DATA

You cannot specify the HKEY_CLASSES_ROOT or HKEY_CURRENT_USER value for this parameter.
phkResult
Pointer to a variable that receives a key handle identifying the predefined handle on the remote computer.

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure. To determine the status, call GetLastRtError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Registry system calls, RtRegCloseKey