See http://dotnetperls.com/dllimport-interop for an interop example, and this MSDN article for more info. The bible for this stuff is Adam Nathan's book.
Basically you will need to identify the functions in the DLL you want to call. These need to marked with extern to make them accessible to the outside world. The next step, which can get tricky is writing a DllImport for the function. This needs to map between the managed and unmanaged worlds. You will need to work out how to marshal any complex data structures from the C dll into managed code.
You should check to see if there is any sort of COM interface to the DLL. Make sure you really need to use P/Invoke first.
SWIG was originally for wrapping C/C++ code for use from scripting languages. It generates C# code from an interface description (see tutorial). I wouldn't recommend using it from C# if P/Invoke is an option.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…