출처 : winapi - C++ read a Registry entry in SOFTWARE\WOW6432 from a 64-bit app - Stack Overflow
C++ read a Registry entry in SOFTWARE\WOW6432 from a 64-bit app
I've got some 32-bit C++ code to read a Key/Value pair from the Registry as follows: // Get a handle to the required key HKEY hKey; if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\
stackoverflow.com
Registry Key : HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall 로 접근 시에 항시
x86 응용프로그램에서는 HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall 로
접근이 되었습니다.
x86 응용프로그램에서 registry 64bit HKLM\Software 접근 방법이 있었습니다..!! 다행입니다!!!!!!!!!!!!
위의 명시 해놓은 출처와 같이 OPTION의 매개변수를 이용하여 접근 할 수 있었습니다. [KEY_WOW64_64KEY]
std::wstring m_strProductGUID = L"{123456-7890-9876-5432-67AB2CD3071F}";
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
, 0
, KEY_ALL_ACCESS | KEY_WOW64_64KEY
, &pKey) == ERROR_SUCCESS)
{
Log(L"%s Founded Registry=SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
__FUNCTIONW__);
if (RegOpenKey(pKey, m_strProductGUID.c_str(), &pKey ) == ERROR_SUCCESS) {
Log(L"Key Found");
}
}
'C++ > MFC' 카테고리의 다른 글
[MFC] PRINTER_INFO_4를 이용한 프린터 설치 여부 체크 진행 예제 (0) | 2024.06.28 |
---|---|
[MFC] Windows Service 시작 / 중지 상태 확인 제어 예제 (0) | 2023.06.27 |
[MFC] WAS서버에 POST 파라미터 전송 시에 한글 깨짐으로 인하여 URLEncode 처리 구현 테스트 진행 (0) | 2023.03.02 |
SHGetKnownFolderPath 함수 사용시에 바이러스로 인식되는 현상 (0) | 2022.10.26 |
C++에서 COM , COM+ 메서드 호출 예제 (0) | 2021.02.07 |