Reputation: 11
How can I use third-party software DLLs in my C# Windows application?
Upvotes: 1
Views: 1641
Reputation: 2880
Basically you need to add a reference to the DLL in your project and add a using statement, which declares the namespace of the classes you wish to use...
EDIT: Adding references to third party DLLs using Visual Studio 2008:
References
Folderadd Reference
Browse
tabUpvotes: 1
Reputation: 29801
It depends on what the dll contains. If it's a .NET assembly you can add a reference to it and compile your project against that assembly.
If it's a COM component you will have to expose the component to .NET by creating a Runtime Callable Wrapper. Visual studio does this automatically for you if you add a reference to a COM component.
If it's a dll with a C style API you have to use Platform Invocation (PInvoke) in order to call functions inside it.
Upvotes: 4
Reputation: 1466
If it is a dll u cannot start using process.start if it is a unmanaged dll u have to use DllImport otherwise reference it to ur project and use their methods
Upvotes: 1