Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Questions and answers begin here Logo Questions and answers begin here Logo
Sign InSign Up

Questions and answers begin here

Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us

RegOpenKeyExW with HKEY_LOCAL_MACHINE returns 2 on Windows Embedded 7 64-bit

Home/ Questions/Q 419
Next
Answered
RegOpenKeyExW with HKEY_LOCAL_MACHINE returns 2 on Windows Embedded 7 64-bit
luu_ckoo
luu_ckoo Teacher

I am a software developer working on a project that involves accessing Windows registry entries. I have been facing an issue with the RegOpenKeyExW API when using the HKEY_LOCAL_MACHINE key on Windows Embedded 7 64-bit. I have tried troubleshooting the issue by changing the access rights, verifying the accuracy of the key path, and running my application with administrator privileges. However, I have not been successful in resolving the error that RegOpenKeyExW returns, which is 2 or “file not found”.
I have also tried to use the RegOpenKeyEx API with the same parameters, but I still get the same error. I am not sure what else I can do to resolve this issue. I have spent several hours searching online for possible solutions, but I have not found anything helpful. I am concerned that this issue may be specific to the Windows Embedded 7 operating system and 64-bit architecture, which may limit my options for resolving the issue.
Here is a code snippet that demonstrates the issue I am facing:

DWORD result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\Microsoft", 0, KEY_READ, &hKey);
if(result != ERROR_SUCCESS)
{
// Handle error
}

Can anyone provide insights on why I might be facing this issue, and what could be a possible resolution? Any help would be appreciated. Thank you.

64-bitc#registrywindowswindows-embedded-7
  • 491
  • 0 Followers
  • 1
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    medacosita Teacher
    2018-03-27T18:27:05+00:00Added an answer about 5 years ago

    Hello! Based on your question, it seems that you are encountering issues with RegOpenKeyExW and HKEY_LOCAL_MACHINE on a Windows Embedded 7 64-bit device. This can be caused by a number of different factors, so I will go over a few possible solutions.
    First, it’s important to ensure that the account running the program has sufficient privileges to access the registry key. Make sure that the account has the necessary permissions to access HKEY_LOCAL_MACHINE. You can also try running the program as an administrator to see if that resolves the issue.
    Another possible solution is to check your code for errors. Make sure that the syntax of your RegOpenKeyExW call is correct, and that you are passing the correct parameters. You should also check for any typos or mistakes in your code. If you’re unsure, try consulting the Microsoft documentation or asking for help from a more experienced developer.
    If you’re still encountering issues, it’s possible that there may be problems with the registry itself. You can try running a registry scan or repair tool to fix any potential errors. You should also make a backup of the registry before making any changes, to avoid accidentally causing further issues.
    Finally, it’s possible that there may be issues with your system configuration or hardware. Make sure that your device meets the necessary system requirements to run the program, and that all drivers and software are up to date. You can also try running a system scan to check for any potential errors or issues.

    In summary, issues with RegOpenKeyExW and HKEY_LOCAL_MACHINE on a Windows Embedded 7 64-bit device can be caused by a number of different factors, including insufficient privileges, code errors, registry issues, and system configuration or hardware problems. By checking your account privileges, code, registry, and system configuration, you should be able to resolve the issue and successfully access the necessary registry key. If all else fails, don’t hesitate to reach out to other developers or consult the Microsoft documentation for more assistance. Best of luck!

    • 130
    • Reply
    • Share
      Share
      • Share onFacebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. jonananas.k Begginer
    2018-03-31T15:32:36+00:00Added an answer about 5 years ago

    One possible solution to the problem you are facing with RegOpenKeyExW with HKEY_LOCAL_MACHINE returning 2 on Windows Embedded 7 64-bit is to ensure that the user who is executing the code has sufficient permissions. You may want to check if the user has administrative rights on the machine or whether the application is running as administrator.

    It is often recommended to avoid manipulating keys under HKEY_LOCAL_MACHINE unless you have a very good reason to do so. If you must modify keys in this location, you may need to make changes to the registry security settings to grant write access to the keys you need to modify. However, please be extremely cautious while modifying the registry as it can impact the stability of your operating system.

    It is also possible that the error you are encountering is not related to permissions at all, but rather registry corruption. In this case, you may want to perform a registry scan and fix using a trusted tool. Additionally, you can try running the application on a different machine to see if the problem persists.

    Overall, the strategy for solving this issue may depend on the specific details of your application and environment. Therefore, it is hard to give a single definitive answer without knowing more about your particulars.

    • 20
    • Reply
    • Share
      Share
      • Share onFacebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.