What happens if I call these eventprocs on a camera that doesn't have them? I just get a return value of 0, with no action?
It returns -1, with no action. Note that it is possible for the eventproc itself to return -1 for other reasons so this doesn't definitively tell you if the eventproc is known or not. Many of the functions return -1 if there is some other error, such as an invalid parameter.
How about if I call a function like TurnBacklightOff() in C but it's not in the sig finder? Does that just return without doing anything?
I don't really understand. If you try to call an unknown function from C, you won't be able to compile. Note that DispCon_TurnOffBackLight / DispCon_TurnOnBackLight should be equivalent (or very similar) to TurnBacklightOff / TurnBacklightOn.
You can call eventprocs from C code with call_func_ptr(_ExecuteEventProcedure) or by calling _ExecuteEventProcedure directly if you are in arm code.
You can call random addresses as functions from lua with call_func_ptr()
Will you explain what your two initialization statements are doing? I'm not clear on how event_proc works. Thanks.
if call_event_proc('DispDev_EnableEventProc') == -1 then
if call_event_proc('DispDev.Create') == -1 then
call_event_proc (known as ExecuteEventProcedure in the canon firmware) can only execute eventprocs that are registered. Many eventprocs are grouped into "libraries" that are registered by other event procedures. Over time, Canon has changed the names of some of these registration eventproces.
So the code above tries to call DispDev_EnableEventProc, and if the return value is -1 (normally returned for an unknown event proc) it tries to call DispDev.Create.