Cannot use class from referenced DLL

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();
	}
    }
}

hei blur,

does this help:

Hey joreg,

thanks for your answer but it didn’t work as I had hoped. I generated the native DLL and put it into the bin/Dynamic Folder of the plugin (next to the managed DLL) but it didn’t help, which is a shame because it pretty much sounded like that would be the exact same issue I’m having. Although, I’m not getting any error Messages.

hm… any chance you could upload your project so we can have a look at it?

first you need to make sure that you are using the right architecture, 32-bit or 64-bit. and i think for some dlls you need to place it besides the vvvv.exe if the .dll is native. otherwise you need some trickery similar that:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.