Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm wondering if anyone has worked with the ngspice.dll ( mixed-level/mixed-signal circuit simulator) in .NET with C#, Is there any code demonstrates how it can be invoked? Any help would be appreciated.
http://ngspice.sourceforge.net/shared.html[^]
Posted
Comments
ZurdoDev 27-Mar-15 15:10pm    
If you can't find any docs perhaps you can add a reference in VS to the dll and then using Intellisense figure out what it has to offer.
azizbba 27-Mar-15 16:26pm    
It's not possible to add it as reference since its unmanaged dll, so the only way is to call its functions using platform invoke.
by the way the documentation exist but its in C++.
http://ngspice.sourceforge.net/shared.html
ZurdoDev 27-Mar-15 16:28pm    
Yuck. ;)

1 solution

As I understand, this is a native shared library, not CLI, so you will need to use P/Invoke:
http://en.wikipedia.org/wiki/Platform_Invocation_Services,
http://msdn.microsoft.com/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp.

This CodeProject article can also be useful: http://www.codeproject.com/csharp/EssentialPInvoke.asp.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900