Bangsang
Bangsang

Reputation: 21

C# console application to dll file

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?

Upvotes: 1

Views: 1598

Answers (1)

user3855638
user3855638

Reputation: 43

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.

Upvotes: 4

Related Questions