This is my first time posting a question here, I usually find answers in the archive but I'm stumped this time.
I'm grabbing data off of a joystick using some code from the vendor that uses Windows Driver Kit. The data is in the form of an array with 6 elements (it's a 6 degree of freedom mouse).
I had already written the code that needs to grab the data and it is in C++...it uses the standard library a lot with vectors and what not. It seems that using the standard library with WDK is a big head ache that I spent a couple days trying to get to work but failed. My next idea was to use boost::interprocess but this to is difficult to use with WDK for the same reasons.
I'm wondering if there is a way to share memory between a C process and C++ process. I would like to write the array to memory using a C program and read it in from a C++ program. It needs to happen very fast and there should be a way to make sure I don't read it in the middle of a write (mutex?).
Any ideas or suggestions are welcome.
EDIT I made a DLL instead, now I just have a DLL that has a getValues() function that I can call from my C++ project. I had to use the pimpl idiom to hide the c stuff though. Thanks for the help guys!!