XYUU / BatteryUtils

Thinkpad battery charge threshold utils for Win8\Win10
40 stars 11 forks source link

runtime error #1

Open lainredsonic opened 6 years ago

lainredsonic commented 6 years ago

HARDWARD: T410,W510,YOGA2 PRO OS: win10 2018 update version:.NET3.5 or N4 and also compiled by myself

All same ERROR: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at BatteryUtils.FormMain.DeviceIoControl(IntPtr handle, UInt32 controlCode, Int32 batteryThreshSize, IntPtr batteryThreshPointer, Int32 batteryThreshOutSize, IntPtr batteryThreshOutPointer) at BatteryUtils.FormMain.FormMain_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.7.3131.0 built by: NET472REL1LAST CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

BatteryUtils Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/lp007/Downloads/BatteryUtils.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.7.3110.0 built by: NET472REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

XYUU commented 6 years ago

你需要安装电源管理相关的驱动程序,比如: image 这个驱动可以在设备管理器中自动完成安装,如果还有问题,请继续反馈,感谢。

lainredsonic commented 6 years ago

之前的就已确认安装该驱动。 capture

正常加载IBMPmDrv,试了一台更老的t61,同样的错误。 另外像yoga系列虽然有电池管理但没有”Lenovo PM device“,多了一个 “Lenovo ACPI-Compliant Virtual Power Controller” AcpiVpc.sys 这个系列肯定和X、T、R系列不通用。