Hello,
Into the Load event of the main form, add this
code :
Call PatchEEROM
Create a sub PatchEEROM with the following
code :
Sub PatchEEROM ()
'-----------------------------------------------------------'
' © PSION TLK 1998
'-----------------------------------------------------------'
On Error GoTo PatchEEROM_BeforeOpen
EEROM.Open "ERM:", -1
On Error GoTo PatchEEROM_AfterOpen
EEROM.IOWithWait P_FSENSE, EEdata, dummy
'-----------------------------------'
' Get EEData
'-----------------------------------'
If Mid$(EEdata, HardDisable, 1) <> Chr$(1) Then
Mid$(EEdata, HardDisable, 1) = Chr$(1)
EEROM.IOWithWait P_FSET, EEdata, dummy
infomsg "PATCHED !"
Else
'infomsg "ALREADY PATCHED !"
End If
'-----------------------------------'
' Update
'-----------------------------------'
EEROM.Close
Exit Sub
PatchEEROM_AfterOpen:
EEROM.Close
PatchEEROM_BeforeOpen:
Exit Function
End Sub
Add the following code into a EEROm.bas file
Global EEdata As String * 40
Global eValid As Integer
Global dummy As Integer
' the following definitions are the byte offsets into a structure
Global Const UserSize = 1
Global Const UniqueID = 3
Global Const SerialNumber = 7
Global Const SoftDisable = 19
Global Const HardDisable = 20
Global Const Compat = 21
Global Const PortAlloc = 22
Global Const FamilyA = 23
Global Const TypeA = 24
Global Const FamilyB = 25
Global Const TypeB = 26
Global Const SysConfig = 27
Global Const LinkSpeed = 28
Global Const LinkPort = 29
Global Const IRPort = 30
Global Const IRPosition = 31
Global Const UARTMode = 32
Global Const Spare33 = 33
Global Const Spare34 = 34
Add this file to you project and make a Ctrl B on it (Add to Build)
Execute you programme and DON'T FORGET TO MAKE AN HARD RESET !
Regards,
Vincent BENNER