How Do I Programmatically Perform a Warm or Cold Boot on a PPT88xx or MC90xx Terminal?

Article ID: 95255153

Question

How Do I Programmatically Perform a Warm or Cold Boot on a PPT88xx or MC90xx Terminal?

Facts

PPT8800 and MC9000 Series Terminals running WM 2003

Answer

A warm or cold boot can programmatically be performed on a PPT88xx or MC90xx.

The following piece of code needs to be inserted within the eVC++ 4.0 application:
#include "stdafx.h"
extern "C" __declspec(dllimport)void SetCleanRebootFlag(void);
extern "C" __declspec(dllimport) BOOL KernelIoControl(
  DWORD dwIoControlCode,
  LPVOID lpInBuf,
  DWORD nInBufSize,
  LPVOID lpOutBuf,
  DWORD nOutBufSize,
  LPDWORD lpBytesReturned);

int WINAPI WinMain(     HINSTANCE hInstance,

                                                            HINSTANCE hPrevInstance,

                                                            LPTSTR    lpCmdLine,

                                                            int       nCmdShow)
{
   int IOCTL_HAL_REBOOT = 0x101003C;
   //Uncomment for cold boot
   //SetCleanRebootFlag();
   KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0,NULL);
            return 0;