Casio PA-2400W Software Manual page 23

C library manual
Hide thumbs Also See for PA-2400W:
Table of Contents

Advertisement

Sample program to acquire power-on event notification
#include <windows.h>
static
HANDLE
static
HANDLE
DWORD WINAPI OnThread()
{
LONG WaitReturn;
While(1) {
}
return 0;
}
BOOL Initialize()
{
DWORD ThreadIDOn;
hEventOn = CreateEvent(NULL, TRUE, FALSE, TEXT("PA_OnEvent"));
if( !hEventOn )
{
}
hThreadOn = CreateThread(NULL, 0, OnThread, 0, 0, &ThreadIDOn);
if(!hThreadOn)
{
}
return(TRUE);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
if(Initialize() ) {
}
else
}
}
hEventOn = NULL;
hThreadOn = NULL ;
WaitReturn = WaitForSingleObject(hEventon, INFINITE);
If (WaitReturn == WAIT_OBJECT_0) {
MessageBox(NULL, TEXT("PowerONEvent"), TEXT("Event"), MB_OK);
}
ResetEvent(hEventOn);
return(FALSE);
return(FALSE);
MessageBox(NULL, TEXT("Initialize Success"), TEXT("Initialize"), MB_OK);
While(1) {
Sleep(1000);
}
return(TRUE);
{
MessageBox(NULL, TEXT("Initialize Error"), TEXT("Initialize"), MB_OK);
return(FALSE);
23

Advertisement

Table of Contents
loading

Table of Contents