Here is the reworked version. Now the processing of the drop data is delayed until we process the WM_EMACS_DROP message at w32_read_socket. There is no malloc/strdup.