On Mar 16, 10:32 am, "SimeonArgus" <simeontr...@gmail.com> wrote:
> On Mar 16, 9:09 am, "Dv" <dev...@gmail.com> wrote:
>
> > I have a API lib (written in C/C++) that can be used by C/C++ project.
> > Now, I'm adding support to C# project.
>
> > I changed the Lib to DLL. This is easy. However, I have no idea how to
> > deal with the structures and constants that used to be defined in the
> > header file of the lib.
>
> > Where should I define them that they can be commonly used by the DLL, C
> > ++ and C#, and also is readable to their developers from their IDEs?
>
> > Thanks!
> > -Dev
>
> I think I understand the question. By default, the C# engine will know
> how to comile your existing function calls, constants, etc based on
> the DLL.
>
> However, if you want those constants to pop up in the intellisense
> menus, then you may be pushing your luck. It won't auto-load them into
> Intellisense for you.
>
> Instead, you may want to create new declarations in C# as constants
> that mimic your C++ constants. The problem is that now you have two
> sets of "constants" to maintain.
>
> Hope that helps.
>
> --Sim
Sim, thanks for your reply! No, I didn't mean the Intellisense. I
meant a text file (instead of a binary file, such as DLL) that is
displayable in IDE with all the structures and constants defined in
there.
I expect that users of my DLL could reuse the declarations coming with
the DLL either in the form of header file or some other way that's
acceptable by both C++ and C#.