Hey guys,
in order to be able to use some given C++ code within a dynamic plugin in VVVV, I created a C++/CLI wrapper for the C++ code in Visual Studio and generated a DLL from that Project. Then I added the DLL as a reference to my plugin within the Project Explorer in VVVV. When editing the code of the plugin in VVVV, I can see that the DLL is recognized since I can use the classes/functions defined in the DLL without VVVV giving me an error (also auto-completion and coloring work with my custom stuff). However, in the patch my node is shown in red as soon as I attempt to instantiate an object of a class defined in the DLL within the plugin constructor. It doesn’t give me any error message in the code Editor but the node is definitely not working at all (I used some nodes for test Input/Output). I verified that the DLL works with a test C# Project in Visual Studio, so I think the issue is somewhere on the VVVV-side of things. I’m providing the relevant parts of the plugin code below and hope that someone can point me to what’s wrong with it. I’m an absolute beginner in VVVV, so there might be something trivial that I am missing. Thank you very much in advance for your effort, I’ve been stuck with this issue for a couple of days now.
#region usings
// other usings
using RosbagReaderWrapper;
#endregion usings
namespace VVVV.Nodes
{
#region PluginInfo
[PluginInfo(Name = "RosbagReaderPlugin", Category = "Value", Help = "Basic template with a dynamic amount of in- and outputs", Tags = "c#")]
#endregion PluginInfo
public class ValueRosbagReaderPluginNode : IPluginEvaluate
{
[Input("Number A", DefaultValue = 0, IsSingle = true)]
public ISpread<int> FInputNumberA;
[Input("Number B", DefaultValue = 0, IsSingle = true)]
public ISpread<int> FInputNumberB;
[Output("Result", DefaultValue = 0, IsSingle = true)]
public ISpread<int> FOutputResult;
private RosbagReaderCLR readerWrapper;
public ValueRosbagReaderPluginNode()
{
readerWrapper = new RosbagReaderCLR();
}
public void Evaluate(int SpreadMax)
{
FOutputResult[0] = (FInputNumberA[0] + FInputNumberB[0]) * readerWrapper.getNumber();
}
}
}