I have found documentation that explains how to unregister a NI-DAQmx Software Event. You can find it here. This article explains that you should pass a NULL value for the event callback function pointer. This seems to be what you have done, however you cannot unregister (or register) an event while a task is running. You must stop the task and then unregister your event.
I hope this clarifies things,