Calling Unmanaged code from a .net application

G

Guest

I need to write a .net windows service that calls and receives callbacks from
a API for specialized hardware through a conventional unmanaged dll. The
manufacturer for this hardware provides a standard c .h header file and a
..lib file to be linked with my code. From all I can gather no matter what
..net language I use basic, c#, or c++ I cant use the supplied .h file, I
would need to define all functions and structures for the API in my own code
using marshaling attributes. Unfortunately this means that every time the
manufacturer sends me a new software release, its not just a simple recompile
on my part, I would have to go through all my definitions for their API and
make sure the marshaling attributes still matched there .h file.

Is there another way I could do this and use the manufacturers supplied .h
file?
 
P

Patrice

IMO no. If they do this it would break all exisitng code. Generally the
exisitng signature are left unchangeg en if the singature needs a change
they introduce a new function su as <FunctionName>Ex...

Talk with them but you'll likely have to do this one time...

Patrice
 

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.

Ask a Question

Top