porting diag_send to windows