weird0,
See inline:
"weird0" <am********@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
Hi!all. As part of the course project in the university, students
have been given task to develop a front-end for SMILE( an API written
in C++ for network modelling). Upon extracting the setup, it gives a
collection of " Header files and Lib files" written in c++.
Now, how do i add them in c# to use the existing api to create a
front-end. I do know that we can include the reference for any .dll
file and use it. But don't know how to use existing header files and
lib files in c#.
You can't create a reference to ANY .dll file and use it. The only way
you can add a reference to a .dll file is if it is a .NET assembly, or if it
is a COM assembly (in which case, you really reference the assembly
generated by TLBIMP, the COM wrapper generator).
Can somebody guide me and help me on this issue, if somebody has
worked with C++ header files or done any sort of work on SMILE.
What you need to do is declare the types and functions that you are
going to call. In general, you are using the P/Invoke layer. Here is a
reference to get your started:
http://msdn2.microsoft.com/en-us/library/fzhhdwae.aspx
Specifically, the section on consuming unmanaged DLL functions would be
helpful as well:
http://msdn2.microsoft.com/en-us/library/26thfadc.aspx
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
Would be really thankful personally, and it will be great help for
the students of this course project.