Results 1 to 7 of 7

Thread: Small App: WinampHelper

  1. #1
    Maximum Bitrate starfox's Avatar
    Join Date
    May 2002

    Small App: WinampHelper

    This app sits in the background. When your computer goes into Hibernation or Standby, the App kills all instances of Winamp (up to 32 instances) and starts Winamp again when the computer comes out of Standby / Hibernate.

    This is useful for people running Winamp with:

    -Markus's Parallel Port LCD Winamp Plugin
    --If you suspend or hibernate windows, the parallel port needs to be reinitialised and the LCD plugin doesn't do this. Winamp usually crashes.

    -KX Drivers for Sound Blaster Live! / Audigy / Emu10k series SPUs
    --If you suspend or hibernate while the SPU is doing something, as Windows resumes the SPU will not have the previous DSP data loaded and makes Windows freeze.

    Both of these can be worked around by killing Winamp and restarting it as the computer comes out of hibernation / suspend.

    The application also hooks DirectInput, and watches if you push Numlock+0+Enter on the numeric keypad. If you push this key combination, the app does a soft forced reboot, which is pretty useful

    WinampHelper c:\progra~1\winamp\winamp.exe
    (replace c:\progra~1\winamp\winamp.exe with your path to winamp in short filename form)

    Long tech detail:
    The App's written in VB6 SP5 and requires the VB6 SP5 runtime dll.
    If you hit DirectInput keys 0x45, 0x4A and 0x52 the app calls ExitWindowsEx ByVal EWX_FORCE Or EWX_REBOOT, ByVal 0&.

    When the application starts it subclasses the main form and traps for WM_POWERBROADCAST and WM_POWER. It then sets the current thread's execution state to ES_SYSTEM_REQUIRED Or ES_CONTINUOUS so the messages are sent to the app. It will also adjust the application access token to give the application permissions to instruct Win2k / XP to reboot.

    If WM_POWERBROADCAST is received, if wParam is PBT_APMQUERYSUSPEND or PBT_APMQUERYSTANDBY the app calls FindWindow with Winamp's class name "Winamp v1.x", and will send WM_CLOSE to any windows with that class name (up to 32 times and stops after that in case something's wrong). The app then sleeps for 3 seconds to ensure the sound driver has enough time to unhook the card.

    The app also will watch if wParam is PBT_APMQUERYSUSPENDFAILED, PBT_APMQUERYSTANDBYFAILED, PBT_APMRESUMESUSPEND, PBT_APMRESUMESTANDBY or PBT_APMRESUMECRITICAL and will start winamp if this message is sent (should be sent when windows comes out of suspend / hibernate).

    Source code:

    Available on request.
    Attached Files Attached Files

  2. #2
    Raw Wave Confused's Avatar
    Join Date
    Aug 2003
    Essex, England
    Sounds cool
    Co-Developer of A.I.M.E.E

  3. #3
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Mellansel, Sweden
    Great job, a golden star for you!

  4. #4
    Maximum Bitrate none's Avatar
    Join Date
    Sep 2003
    YOU ROCK!!!

    FYI, the problem you describe with Markus' plugin is not unique to the parallel port driver, it happens to me using a Matrix Orbital compatible serial lcd as well.

    I'm going to try this out tomorrow Hibernation is the only thing on my system that is not working as I planned.

  5. #5
    Maximum Bitrate Bravellir's Avatar
    Join Date
    Dec 2003
    Porto, Portugal

    Thumbs up that was close :)

    That was close..

    After tuning for hours my "new" system I manage to make it boot from hibernation in a mere 14 secs. nice . But all this work was done using the onscreen lcd emulation. And guess what append when I finished the real installation?? Winamp froze.

    Lucky me that this little marvel arrived just in time. It's installed and working just fine.

    Thanks a lot for such a great life saver.

    Ikea Case. Epia M10000.M1-ATX. 512 Mb. 2,5" 80 GB HDD. 7" Lilliput. BU-303 GPS. Sony Joystick.
    Status -->
    Lilliput Installed (not indash yet..)
    BraveCar 2.5

  6. #6
    Variable Bitrate therussman2002's Avatar
    Join Date
    Mar 2004
    Milwaukee, WI
    I experienced the symptoms described in the first post here, with the program as the remedy. However, when using this program, sometimes when i start playing a song it just freezes the whole system and repeats a couple secs of the song over and over. Every time i try to goto standby or i think any other shutdown procedure, it also hangs.

    I have a shortcut to winamphelper.exe with the path of winamp in its command line in the "startup" folder of my xp install. Is this how i am supposed to run it? I am using mediacar by the way. Wasnt sure how to make it run this program instead of winamp in the config.

  7. #7
    Maximum Bitrate starfox's Avatar
    Join Date
    May 2002
    Hi, the app only works for Winamp, it won't work for other applications (due to the way it's coded: it only looks for windows with a class name that's the same as winamp)..

    I might support other apps later on, but don't have time right now.. maybe in a few weeks.

Similar Threads

  1. new app linux/windows
    By hijinks21 in forum Software & Software Development
    Replies: 13
    Last Post: 11-18-2003, 08:25 AM
  2. small size Video card
    By jtk in forum General Hardware Discussion
    Replies: 4
    Last Post: 11-24-2002, 10:21 PM
  3. Interesting small PCs
    By mtmsol in forum Classified Archive
    Replies: 0
    Last Post: 04-23-2002, 01:17 PM
  4. highout, small capacity battery?
    By jshrieve in forum Power Supplies
    Replies: 7
    Last Post: 06-15-2001, 04:34 AM
  5. Another small computer, not tiny but pretty small.
    By TimW in forum General Hardware Discussion
    Replies: 0
    Last Post: 04-17-2000, 09:07 PM


Posting Permissions

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