Trying to write a plugin - how to store a pointer