Add AELock functions:
http://chdk.setepontos.com/index.php?topic=5295.msg107501#msg107501