Another solution to problem 1 is actually mentioned in the source code, and that is to compile the code to an ActiveX EXE and raise an event from inside the procedure. However for the application I wrote this code for I had to wait for the shelled application to end.