accessing C dll containing enum and struct from C# program
I am having a C DLL which contains enum and struct. If I want to access an enum.struct of DLL from C# program, Do I need to redefine them in C# program?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted May 22, 2013, 4:24 AM
This means, of course, that you need to export a function which exposes the enum or struct (or a pointer thereto) and which C# code can then call.
It also means that you will need to redefine the enum or struct in your C# code to accommodate the values returned or exposed by the function.