Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with RegisterPowerSettingNotification and USER32.dll.

Problem with RegisterPowerSettingNotification and USER32.dll.

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aangerma
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • A aangerma

      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

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      What version Windows are you running this on?

      Best wishes, Hans


      [Hans Dietrich Software]

      A 1 Reply Last reply
      0
      • H Hans Dietrich

        What version Windows are you running this on?

        Best wishes, Hans


        [Hans Dietrich Software]

        A Offline
        A Offline
        aangerma
        wrote on last edited by
        #3

        How can I know the version ? I only know that this is Windows xp professional. thanks

        H 1 Reply Last reply
        0
        • A aangerma

          How can I know the version ? I only know that this is Windows xp professional. thanks

          H Offline
          H Offline
          Hans Dietrich
          wrote on last edited by
          #4

          OK, according to MSDN, the minimum Windows version for this function is Vista. That means anything before Vista (like XP) won't have this function.

          Best wishes, Hans


          [Hans Dietrich Software]

          A 1 Reply Last reply
          0
          • H Hans Dietrich

            OK, according to MSDN, the minimum Windows version for this function is Vista. That means anything before Vista (like XP) won't have this function.

            Best wishes, Hans


            [Hans Dietrich Software]

            A Offline
            A Offline
            aangerma
            wrote on last edited by
            #5

            Thanks now its obvious why it didnt work.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups