INtime SDK Help
RegConnectRegistry (iwin32)
INtime SDK v7.1 > About INtime > Alternate APIs > iwin32 API > iwin32 API > RegConnectRegistry (iwin32)

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 RegCloseKey.

LONG RegConnectRegistry(
    LPTSTR lpMachineName,
    HKEY hKey,
    PHKEY phkResult
);

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.

Remarks

You cannot specify the value HKEY_CLASSES_ROOT or HKEY_CURRENT_USER for hKey.

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure. For extended error information, see GetLastError.

Requirements

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

Note

This function operates in the real-time portion of your application.

See Also

RegCloseKey, iwin32 API, iwin32 Overview