1

I have c# code that initializes a force feedback joystick and plays force effect file. I want to change this c# console application into a dll file so that I can use it in labview.

Converting a C# Console App to a DLL

What I understood from this post is that I just need to create a class library and copy paste my codes there, is this correct? I did get a dll file by just doing that. If I'm wrong can you explain how to convert a console application to a dll?

Community
  • 1
  • 1
Bangsang
  • 21
  • 4
  • 1
    Actually you can just change the output type in the properties for it to come out as a dll, but for readability it is better to make a new class and do the copy paste. – Jonathan Camilleri Mar 09 '15 at 08:06

1 Answers1

4

Remember a DLL does not automatically execute the "Main" method. So:

  1. Set the output type to Class Library
  2. Compile
  3. Add the DLL to your Labview project
  4. Call JoystickProjectMainClass.Main() in your Labview project (I can't help you with that, too long ago ;) ) and it should run.