Hi.
I wrote a dll in C++ and I want to use it in C#.
I have some questions:
1. Can I declare a global array in dll? if yes, it's syntax should be C++-like or C#-like?
2. How can I pass an array to dll as a function parameter or recieve an array as function return?
3. Can a function in dll call other functions within same dll? if yes, should other functions have __declspec(dllexport) in prototype?
I know this probably won't do you much good now but it's generally easier to interface C++ code with C# code if the C++ is written with .NET not standard C++.
All the .NET languages (such as C#) are designed so that they can be used in combination (for example C++.NET and C#). Normal C++ however was not designed the same so if you wrote your dll in anything but .NET it could be tricky to link the to bits of code together.
Dudester meant that if you use VisualStudio and use C++ .NET to create the DLL, all you have to do is include this DLL in the reference of your C# project.