Just an addendum: using the GlobalAddAtom family of functions for this would be even neater.. if lParam isn't 0, assume it is an atom number of the global atom containing the name of the mapped file to use; otherwise, use "mIRC" as before.
In fact I believe that the whole mapped files mechanism could be replaced by global atoms, but that's another issue..