updated C# wrapper to use set hook functions, no C# api changes, not tested
updated java wrapper to use set hook functions, no java api change, not tested