What you will want to do is export your functions in a DLL, or create a
COM object wrapper. Then, you can access the functionality through the
P/Invoke layer, or through COM interop.
Assuming you know the method signatures in the library, after compiling
it to dll, then use PInvoke to call it from C#. Exposing it as COM will
be too complex and will slow the performance down considerably.
If this lib/dll is a vital component and will be used by multiple
applications, I would create a wrapper for it in Managed C++ so it will
be exposed as .NET component. Not only will that be easier to use
because you don't need to declare all the PInvoke from C#, but
performance will be slightly better because you can use the IJW feature
in MC++ in the wrapper.
Thank you everybody, I'll try the PInvoke.
Regards,
Marty
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.