이 페이지가 유용했습니까?
이 콘텐츠에 대한 여러분의 의견은 중요합니다. 의견을 알려주십시오.
추가 의견
1500자 남음
내보내기(0) 인쇄
모두 확장
EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

RegCopyTree function

Copies the specified registry key, along with its values and subkeys, to the specified destination key.

Syntax


LONG WINAPI RegCopyTree(
  _In_     HKEY    hKeySrc,
  _In_opt_ LPCTSTR lpSubKey,
  _In_     HKEY    hKeyDest
);

Parameters

hKeySrc [in]

A handle to an open registry key. The key must have been opened with the KEY_READ access right. For more information, see Registry Key Security and Access Rights.

This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the predefined keys.

lpSubKey [in, optional]

The name of the key. This key must be a subkey of the key identified by the hKeySrc parameter. This parameter can also be NULL.

hKeyDest [in]

A handle to the destination key. The calling process must have KEY_CREATE_SUB_KEY access to the key.

This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the predefined keys.

Return value

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

This function also copies the security descriptor for the key.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Winreg.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

Unicode and ANSI names

RegCopyTreeW (Unicode) and RegCopyTreeA (ANSI)

See also

Registry Functions

 

 

커뮤니티 추가 항목

추가
표시:
© 2015 Microsoft