For the previous couple of years, I have developed user interfaces using MFC. The main reason being, the libraries used to interface with the cameras being used are only available in C++. Generally 60% of project time has been spent trying to build UIs with clunky MFC...
Lately, I have been looking into mixed-mode programming with the intention of developing interfaces and high level functions in C#. Whilst mixing this with the native C++ code required for hardware communication.
One component I would like to get some advice about, is the presentation of the camera data. From what I have read, the data would need to be provided to the managed UI code by the native code by means of some form of callback and marshalling the data into a form that the managed code can draw on a control (video display). From what I know of marshalling, it can be a time expensive procedure. So that leads me to the question, how safe (if at all possible), is it to provide the unmanaged code a handle to a control on which the video is to be presented, and have the unmanaged code section handle the drawing?