Hi All,
After asking this question and apparently stumping people, how's about this for a thought-- could I give a buffer from a C# application to a C++ dll, and then have a timing event in C# just copy the contents of the buffer out? That way, I avoid any delays caused by callback calling that apparently happen. Would that work, or does marshalling prevent that kind of buffer access? Or would I have to go to unsafe mode, and if I do or don't, what would be the magic words to make it work?
To recap from that other question:
- I have a driver written in C++ and an app written in C#.
- I need to get data from the driver in a preview-style manner.
- C++ applications interact with the C++ dll just fine; the C# app has a large delay for copying the data over.
- The delay does not appear to be caused by release/debug differences on the C# side
- I need to get around the delay. Could this proposed buffer scheme work? Could a C# app consume from a buffer written to by a C++ dll, or do I need to do something else?