Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 26207, Detecting Suspend Time

by Colin Maharaj Email: Anonymous


Determines if Suspend is possible on the current system and if a suspend timer is actually on.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For C++Builder, Version 6.0  to 7.0 34 downloads
Copyright: No significant restrictions


Size: 256,753 bytes
Updated on Sat, 01 Nov 2008 01:30:34 GMT
Originally uploaded on Sat, 01 Nov 2008 01:32:29 GMT
SHA1 Hash: EF33F2D670ADED198D906574F9AE9201B4D6E9E6
MD5 Hash: 4A8BEC19991CFF2B56593E497C5DBA05

    Explore the files in this upload

Description
On some projects, I need to have up time always. Suspend affects my application's TCP services and causes data loss.

This code snippet, uses the Power Management APIs to detect and show how long it takes before your PC goes into a suspend state.

However another thing that can be done (and not demonstrated here) is to intercept the suspend call, and tell the system not to suspend.

This is a BCB6 Project so the header file powrprof.h is included.

It also demonstrates how to use LoadLibrary and GetProcAddress to call functions that your compiler may not yet support.



   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04