다음을 통해 공유


AfxSetPerUserRegistration

Sets whether the application redirects registry access to the HKEY_CURRENT_USER (HKCU) node.

void AFXAPI AfxSetPerUserRegistration(
   BOOL bEnable
);

매개 변수

  • [in] bEnable
    TRUE indicates that the registry information is directed to the HKCU node; FALSE indicates that the application writes registry information to the default node. The default node is HKEY_CLASSES_ROOT (HKCR).

설명

Before Windows Vista, applications that access the registry usually use the HKEY_CLASSES_ROOT node. However, with Windows Vista, you must run an application in elevated mode to write to HKCR.

This method enables your application to read and write to the registry without running in elevated mode by redirecting registry access from HKCR to HKCU. 자세한 내용은 링커 속성 페이지을 참조하십시오.

If you enable registry redirection, the framework redirects access from HKCR to HKEY_CURRENT_USER\Software\Classes. Only the MFC and ATL frameworks are affected by the redirection.

The default implementation accesses the registry under HKCR.

요구 사항

Header: afxstat_.h

참고 항목

참조

매크로, 전역 함수 및 전역 변수

AfxGetPerUserRegistration

기타 리소스

응용 프로그램 정보 및 관리