CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2010
    Posts
    23

    Problem with RegisterPowerSettingNotification and USER32.dll.

    Hello,

    When I call to the fanction RegisterPowerSettingNotification I get a runtime error:

    "The procedure entry point could not be located in the dynamic link library USER32.dll."

    I tried to replace user32.dll but its didnt help.

    My OS is windows xp, the code is:

    HPOWERNOTIFY m_hPowerSchemeNotify;
    m_hPowerSchemeNotify = RegisterPowerSettingNotification (
    NULL, &GUID_POWERSCHEME_PERSONALITY,
    DEVICE_NOTIFY_WINDOW_HANDLE );

    if ( NULL == m_hPowerSchemeNotify )
    ATLTRACE("Failed to register for notification of power scheme changes!\n");


    if anyone can guid me how can I solve this problam I would be very grateful for him.

    thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Problem with RegisterPowerSettingNotification and USER32.dll.

    Never ever replace user32.DLL manually!

    Check the MSDN RegisterPowerSettingNotification, it clearly says you need at least Vista or Windows Server 2008. It will not work on XP.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Aug 2014
    Location
    Aylesbury, Buckinghamshire, UK
    Posts
    3

    Question Re: Problem with RegisterPowerSettingNotification in USER32.DLL: Google Chrome Canary

    Waking an old thread, I know, but I started getting this error when trying to load Google Chrome Canary today although it had run successfully earlier. I suspect that an update may have been applied during the first launch and now it won't reload. I have also tried to re-install Canary from the latest download but the installation fails with the same error. The stable version of Google Chrome still works though.

    I guess that this is more likely a Google Chrome Canary issue and I should report it via the Google support site but I was hoping to at least get some insight here as to the cause. I am running Microsoft Windows XP Professional SP3 so perhaps Canary is making a call to a routine which is only supported in later versions of Windows as stated in a previous post. So possibly a case of “asked and answered” but maybe it will help others with the same problem.
    Last edited by Steve R Jones; August 15th, 2014 at 07:32 AM. Reason: insert left out words

  4. #4
    Join Date
    Aug 2014
    Posts
    2

    Re: Problem with RegisterPowerSettingNotification and USER32.dll.

    Hi, same problem with Google Chrome Canary today.

    Ciao!

  5. #5
    Join Date
    Nov 2003
    Posts
    1,902

    Re: Problem with RegisterPowerSettingNotification and USER32.dll.

    Looks like a fix is in the works: https://codereview.chromium.org/477173002/

    gg

  6. #6
    Join Date
    Aug 2014
    Posts
    2

    Re: Problem with RegisterPowerSettingNotification and USER32.dll.

    Quote Originally Posted by Codeplug View Post
    Looks like a fix is in the works: https://codereview.chromium.org/477173002/

    gg
    Very thanks!

  7. #7
    Join Date
    Aug 2014
    Location
    Aylesbury, Buckinghamshire, UK
    Posts
    3

    Thumbs up Re: Problem with RegisterPowerSettingNotification in USER32.DLL: Google Chrome Canary

    Excellent! Thanks for posting the link.

  8. #8
    Join Date
    Aug 2014
    Location
    Aylesbury, Buckinghamshire, UK
    Posts
    3

    Cool Re: Problem with RegisterPowerSettingNotification in USER32.DLL: Google Chrome Canary

    I have now successfully installed Google Chrome Canary Version 39.0.2126.2† which includes new functionality for user profile management. This allows quick switching between profiles for different users or different purposes. However, I would still recommend OS-level user accounts for improved privacy and stability between multiple users on the same device where available.

    †Current Google Chrome (stable) Version is 36.0.1985.143
    Last edited by Felim_Doyle; August 18th, 2014 at 04:34 AM. Reason: Additional information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured