please dont rip this site Prev Next

RegConnectRegistry info  Overview  Group

The RegConnectRegistry function establishes a connection to a predefined registry handle on another computer.

LONG RegConnectRegistry(

    LPTSTR lpMachineName,

// address of name of remote computer

    HKEY hKey,

// predefined registry handle

    PHKEY phkResult 

// address of buffer for remote registry handle

   );

Parameters

lpMachineName
Points to a null-terminated string containing the name of the remote computer. The string has the following form:

\\computername

If lpMachineName is NULL, the local computer name is used.

hKey
Specifies the one of the following predefined registry handles on the remote computer.

HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_PERFORMANCE_DATA
, if the remote computer is running Windows NT
Windows 95 only: HKEY_DYN_DATA, if the remote computer is running Windows 95
Windows 95 only: HKEY_CURRENT_CONFIG, if the remote computer is running Windows 95

You cannot specify the HKEY_CLASSES_ROOT or HKEY_CURRENT_USER value for this parameter.

phkResult
Points to a variable that receives a key handle identifying the predefined handle on the remote computer.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in WINERROR.H. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.

Remarks

When a handle returned by RegConnectRegistry is no longer needed, it should be closed by calling RegCloseKey. However, this may not terminate the session. To terminate the session, call the WNetCancelConnection2 function with \\server\ipc$ as the name of the resource to disconnect.

See Also

RegCloseKey, WNetCancelConnection2


file: /Techref/os/win/api/win32/func/src/f72_2.htm, 3KB, , updated: 2001/9/14 11:04, local time: 2024/11/23 19:26,
TOP NEW HELP FIND: 
3.135.206.229:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/Techref/os/win/api/win32/func/src/f72_2.htm"> RegConnectRegistry</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .