WPF application which calls an API, which needs a message pump

Posted by Griffin on Stack Overflow See other posts from Stack Overflow or by Griffin
Published on 2010-06-17T20:49:26Z Indexed on 2010/06/17 20:53 UTC
Read the original article Hit count: 360

Filed under:
|
|
|

I have a WPF application that calls an API to operate a device (a scanner). This API is COM based, and internally has a hidden window that the scanner sends messsages too. The intent of the API is to turn those windows messages into COM events. The problem is that the WPF application doesn't have a message pump, and therefore none of the messages are being delivered to the hidden window. Therefore none of the events are fired and it looks like the scanner is not responding.

How should I create a message loop in the WPF application that will be able to dispatch messages to the invisible window?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about com