Trying to use dmxusb.dll
Posted: Tue Aug 21, 2018 8:18 am
Hello,
I am working on a project to command dmx light via a software i am working on. I am on windows 64 and using an Open DMX. At first i tried to use the C# example on the Enttec website.
https://www.enttec.com/fr/products/prot ... n-dmx-usb/
But i had a lot of troubel, and couldn't make the light work properly, ie wrong color, delay. I have tried on windows 64 and 32 bits.
I have found QLC+, and it work flawlessly, and in looking in the source files to see how you control the light, i noticed that the program create and use dmxusb.dll.
I have tried to use it via a c# program, but i can't manage to use it, and it crash.
At first, i tried to execute a simple program to call the fonction dmxusb.init(), but I got an error System.DllNotFoundException, linked to the lack of some of the dependency of dmxusb.dll like some Qt dll.
Then i tried to execute my program from the installed qlc+ 4.11.2, and also got the same error, but QLC+ run just fine.
Finally I have tried to launch it from the installed qlc+ 5, using the qml config and the code available in the 4.11.2 source code. This time the error was SystemBadImageFormatException, which come either from a difference beetwen the software and the dll called, if they don't run on 32 or 64 bits, or from the .NET version. This happened even if i compile my program in 32 or 64 bits and I compiled both program on the same computer so the .NET version should be the same.
I was wondering if i need to do something special when linking to the dll or when using it.
I am programming on windows 64, using visual studio 2017, and in C#. I have already made some code in c# that use a c++ dll, so i know it's possible.
I know it is not directly linked to the development of QLC+, but I am stuck on trying to control the DMX lights, and if anyone could help me, I would be really grateful. If you need more informations, you just have to ask.
Thanks.
Pierre F.
I am working on a project to command dmx light via a software i am working on. I am on windows 64 and using an Open DMX. At first i tried to use the C# example on the Enttec website.
https://www.enttec.com/fr/products/prot ... n-dmx-usb/
But i had a lot of troubel, and couldn't make the light work properly, ie wrong color, delay. I have tried on windows 64 and 32 bits.
I have found QLC+, and it work flawlessly, and in looking in the source files to see how you control the light, i noticed that the program create and use dmxusb.dll.
I have tried to use it via a c# program, but i can't manage to use it, and it crash.
At first, i tried to execute a simple program to call the fonction dmxusb.init(), but I got an error System.DllNotFoundException, linked to the lack of some of the dependency of dmxusb.dll like some Qt dll.
Then i tried to execute my program from the installed qlc+ 4.11.2, and also got the same error, but QLC+ run just fine.
Finally I have tried to launch it from the installed qlc+ 5, using the qml config and the code available in the 4.11.2 source code. This time the error was SystemBadImageFormatException, which come either from a difference beetwen the software and the dll called, if they don't run on 32 or 64 bits, or from the .NET version. This happened even if i compile my program in 32 or 64 bits and I compiled both program on the same computer so the .NET version should be the same.
I was wondering if i need to do something special when linking to the dll or when using it.
I am programming on windows 64, using visual studio 2017, and in C#. I have already made some code in c# that use a c++ dll, so i know it's possible.
I know it is not directly linked to the development of QLC+, but I am stuck on trying to control the DMX lights, and if anyone could help me, I would be really grateful. If you need more informations, you just have to ask.
Thanks.
Pierre F.