thank you for your reply!
We managed to get your example to work finally. What prevented it from working correctly was the configuration of the interrupt-pin. In our setup, this is 127. So what we did was adding the lines
uIo = COLIBRI_PIN(127);
Can_SetConfigInt(hCan, L"ioInterrupt", uIo.GenericDefinition, StoreVolatile);
to the initialization routine (using lines 132ff from the original example as a reference). This did not compile, so after a digging around for a while, we simply changed the parameter of the SetConfigInt method to
127 - After all, the method is named
SetConfigInt and we expected it to work with an actual integer value. This did compile and we could send data. Receiving was still impossible though.
Because this was compiling just fine and receiving just fine we suspected the problem is elsewhere and started digging around and monitored the CAN signal and the SPI signal using an oscilloscope. This yielded no relevant results, so we had a look at whether the interrupt pin actually was set and evaluated correctly. We found out that the pin got set correctly on incoming data but was never reset.
This time we suspected that we configured the pin incorrectly and started searching for a solution for the initial compile problem. Some googling brought the answer: https://stackoverflow.com/a/9903698/1521227: The compiler could not handle this correctly, we needed to rename the code file to *.cpp to trick Visual Studio into using the correct compiler settings. Once we changed this, the example did indeed compile and the interrupt-pin got evaluated and handled correctly - we could send and receive data.
Next steps will be to make this work with the .NET-layer on top of this.