Enhanced shutdown helper driver, ver.0.01

Copyright (c) 2004 Takayuki 'January June' Suwa / Beliefia Productions


0. Table of Contents



1. Welcome

ESDHLPDD.sys is a simple interface physical device driver (PDD) that can perform reboot / power-off after system shutdown without any kernel / subsystem modification. Programmer can query / modify shutdown mode setting via DosDevIOCtl() API, from non-Ring0 privileges.
A sample executable, ESD.exe, issues system shutdown with 3 modes (conventional / reboot / power-off) interactively (via Presentation Manager) or not (via command line option).

1.1. Copyright and Disclaimer

  1. 'THIS SOFTWARE AND WHOLE SET OF DOCUMENTS' (CALLED 'THE PACKAGE') ARE ENTIRELY COPYRIGHTED BY TAKAYUKI 'JANUARY JUNE' SUWA / BELIEFIA PRODUCTIONS, AUTHOR / HOLDER OF THE PRODUCT.
  2. THE PACKAGE IS PROVIDED 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  3. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR IBM CORPORATION BE LIABLE FOR ANY DAMAGES, WHETHER IN CONTRACT OR TORT (INCLUDED NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE PRODUCT, EVEN THOUGH SUCH HOLDERS HAS BEEN ADVISED OF THE POSSIBILITY OF ANY DAMAGE.
You accept the copyright and disclaimer statement above by installing ESDHLPDD.sys. If you do not agree with this, you must remove all files in the package from your system.

1.2. System Requirements

This software is designed to function in an environment such as:

1.3. Contact Author

Email to Takayuki 'January June' Suwa:

1.4. Revision History



2. How to Use


2.1. In This Archive

ESDHLPDD.sys
Enhanced shutdown helper driver file
ESDHLPDD.sym
Symbol information file for debugging
ESDHLPDD.h
C/C++ header file for Device IOCtl interface
README.htm
This document
ESD.exe
Enhanced shutdown utility exectutable file

2.2. Driver Installation

  1. Unzip archive to where you desire. (e.g. C:\ESDHLPDD)
  2. Add to your CONFIG.SYS a line like
    DEVICE=d:\path\ESDHLPDD.sys
    after
    DEVICE=d:\OS2\BOOT\APM.SYS
    line. (d and path must be replaced with actual installation drive / path)
  3. Restart your system. If installation successfully, you will see like
    ESDHLPDD.sys  Enhanced shutdown helper driver, ver.0.01
    Copyright 2004 Takayuki 'January June' Suwa.
    Reboot feature is obtained.
    Power-off feature is obtained.
    The driver has been installed.
    After restarting, you will found
    Driver: ESDHLPDD.sys  -  Enhanced shutdown helper driver
    Vendor: Takayuki 'January June' Suwa  Version: 1.1  Date (MDY): 8/1/2004
    Flag:   STATIC     Type-Subtype: OS2 - HELPER
    in rmview /d listing.
  4. In order to not show any messages, add /Q switch:
    DEVICE=d:\path\ESDHLPDD.sys /Q

2.3. ESD.exe Enhanced shutdown utility

  1. Without options, ESD.exe will open simple system-modal shutdown dialog box.
  2. With one option, ESD.exe will perform system shutdown immediately.
    /c
    Conventional shutdown
    /r
    Reboot after shutdown
    /p
    Power-off after shutdown


3. ESDHLPDD.sys Device IOCtl Reference


3.1. Constants and Structures

All constants and structures needed for development are defined in ESDHLPDD.h. See also.

3.2. Precautions and Limitations


3.3. DosDevIOCtl() Interface


3.3.1. ESDHLPDD_SETMODE (41h)

Category:
IOCTL_ESDHLPDD (80h)
Function:
ESDHLPDD_SETMODE (41h)
Desctiption:
Set shutdown mode
Parameter Packet Format:
ESDHLPDD_SETMODE_PARM. See also ESDHLPDD.h.
Data Packet Format:
None. This pointer should be NULL.
Returns:
NO_ERROR
Success.
65283
Invalid parameter is specified.
Remarks:
None.

3.3.2. ESDHLPDD_GETCAPABILITIES (60h)

Category:
IOCTL_ESDHLPDD (80h)
Function:
ESDHLPDD_GETCAPABILITIES (60h)
Desctiption:
Query shutdown method capabilities
Parameter Packet Format:
None. This pointer should be NULL.
Data Packet Format:
ESDHLPDD_GETCAPABILITIES_DATA. See also ESDHLPDD.h.
Returns:
NO_ERROR
Success.
65283
Invalid data is specified.
Remarks:
Capability bit ESDHLPDD_MODE_CONVENTIONAL is always on.

3.3.3. ESDHLPDD_QUERYMODE (61h)

Category:
IOCTL_ESDHLPDD (80h)
Function:
ESDHLPDD_QUERYMODE (61h)
Desctiption:
Query current shutdown mode
Parameter Packet Format:
None. This pointer should be NULL.
Data Packet Format:
ESDHLPDD_QUERYMODE_DATA. See also ESDHLPDD.h.
Returns:
NO_ERROR
Success.
65283
Invalid data is specified.
Remarks:
None.


4. Troubleshooting

  1. Q. My machine cannot be turned power off automatically after shutdown...
    A. Almost due to loose APM implementation (ESDHLPDD.sys uses only APM 16-bit protect mode interface).


5. Credits

Development
Programming
Takayuki 'January June' Suwa / Beliefia Productions
Documentation
Takayuki 'January June' Suwa / Beliefia Productions
Special thanks to
Masaharu 'Densuke' Nagata
He allowed me to replicate WARP4 Developer's Toolkit UNDER LEGAL LICENSE. Thanks a lot.


Copyright 2004 Takayuki 'January June' Suwa / Beliefia Productions. All rights reserved.
Beliefia Productions and its logo design are trademarks of Beliefia Productions. All rights reserved.
Other copyrighted works (images, musics, programs, and so on), trademarks and servicemarks in this document are owned by their respective owners.

[This document is HTML3.2(Wilbur)-compliant.]