Actually you are not sending the message to the Window App window but sending it to the current instance of the dll because ghModule is the dll handle.