Hello,
Attached is dzHW.zip file which contains dzHW.dll library I made (and dzHWdesktop.dll) and a b4ppc sample of how to use it.
Implements dzHW class with the following methods.
SoftReset: Soft resets the device
MessageBeep(wType): Beep! wTypw determines the type of sound and should be one of MsgBox icons (see B4PPC help, topic "MsgBox Constants")
GetTickCount: A high resolution timing method. Returns time elapsed in miliseconds since the computer/device is booted.
GetACLineStatus: Returns 1 if on AC power, 0 if not.
GetBatteryLifePercent: Returns percentage of Battery Life remaining.
InputPanel: Returns or Sets Soft Input Panel (SIP) state. 1 if it's active, 0 if not. Setting InputPanel = true, activates it and InputPanel = false deactivates it.
The desktop version has limited functionality. Implements only MessageBeep, GetTickCount, GetACLineStatus and GetBatteryLifePercent and not tested at all. Other function are dummy.
Edit (Erel): The most updated library is here: http://www.b4x.com/forum/additional-libraries/384-useful-library-2.html#post2809
See this thread about using this library with the optimized compiler: http://www.b4x.com/forum/questions-help-needed/3796-error-compiling.html
Attached is dzHW.zip file which contains dzHW.dll library I made (and dzHWdesktop.dll) and a b4ppc sample of how to use it.
Implements dzHW class with the following methods.
SoftReset: Soft resets the device
MessageBeep(wType): Beep! wTypw determines the type of sound and should be one of MsgBox icons (see B4PPC help, topic "MsgBox Constants")
GetTickCount: A high resolution timing method. Returns time elapsed in miliseconds since the computer/device is booted.
GetACLineStatus: Returns 1 if on AC power, 0 if not.
GetBatteryLifePercent: Returns percentage of Battery Life remaining.
InputPanel: Returns or Sets Soft Input Panel (SIP) state. 1 if it's active, 0 if not. Setting InputPanel = true, activates it and InputPanel = false deactivates it.
The desktop version has limited functionality. Implements only MessageBeep, GetTickCount, GetACLineStatus and GetBatteryLifePercent and not tested at all. Other function are dummy.
Edit (Erel): The most updated library is here: http://www.b4x.com/forum/additional-libraries/384-useful-library-2.html#post2809
See this thread about using this library with the optimized compiler: http://www.b4x.com/forum/questions-help-needed/3796-error-compiling.html