And what kind of C# buffer can handle this?
I need my C# solution .exe to get about 2-3MB of data, up to 60 times a second, from a Visual-C++ DLL that is generating live video frames (up to 60/second) and copying it to the C# buffer. C# will then forward this data through USB to another computer.
I've tried C# String but there's a maximum size limit (roughly around 10KB).
I'm thinking of a C# struct containing the data buffer plus handshake variables.
Possibly, I will need multiple buffers, so maybe will need an array of these structs.
But, essentially, what's the best way (fastest!!!) to give DLL destination address of some kind of C# buffer, so that DLL can copy its 2-3MB of generated data to the buffer, and then set a variable flag, meanwhile C# is polling this flag to know when data is in buffer, so it can be further processed.
Buffer should be first created by C#, not DLL, I think.
Here is an idea:
Advantage is that you can use a normal, managed byte[]
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.