Problem with interrupt calls in Delphi 4
Posted on 1998-10-31
I have a snippet of code here which queries to see if laptop power management is present and if so, it returns the battery power remaining. This worked fine under Delphi 1 but under Delphi 4 I get (I think) an access violation. :-(
I understand from Madshi (comment below) that I can't directly call an Interrupt from a Delphi 4 app. Can anyone tell me how I can either call a 16 bit DLL or whether there is a Win32 function call to obtain the battery level information?
@err: mov fault,AH
If (Fault=0) And (Life In [0..100]) Then
Else PowerMan:=-1; // no power info