If you are passing a string to a legacy method, it should expect the string as Unicode. The if statement can be a stumbling block for C programmers. The runtime execution engine will catch these errors and abort the program. Events have been cumbersome to code for components for as long as COM has been around. Remember that an event is a Windows message sent by some external program or event.
Typical sources are a button click, keyboard press, programmatic event, etc.
Essentially we are telling the component what that message linkage is. Since the current COM architecture uses GUIDs to point to the DLL, it is possible for two programs to require different versions of a DLL object. The result is that one works and the other doesn't. If the older version is reloaded, then the other program breaks. Microsoft has finally come up with a solution that I think will work.