stream data from c++ to c# over shared memory
问题 I am attempting to stream data from a c++ application to a C# application using shared memory. Based on example I found, I have: c++ (sending) struct Pair { int length; float data[3]; }; #include <windows.h> #include <stdio.h> struct Pair* p; HANDLE handle; float dataSend[3]{ 22,33,44 }; bool startShare() { try { handle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(Pair), L"DataSend"); p = (struct Pair*) MapViewOfFile(handle, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0,