Hi,
Can any of you, tell me how to call c++ functions from c# program?
I have a C++ dll, in which i have some functions, now i want to call them from my c# code. Please tell me how can i do this. If possible provide me sample code n all.
Thank you in advance
Bye,
sree
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 14May2009,17:57 | #2 |
|
[ Late reply, but this may help others
]Well, I think that should not be too difficult. You can use DllImport. Say you have the following C++ func in a dll : Code: c++
So, you can use it like this : Code: c#
Simple, isn't it ? PS : Just embed a manifest to avoid the error : "An application has made an attempt to load the C Runtime library without using a manifest." |
|
Go4Expert Founder
|
![]() |
| 14May2009,18:38 | #3 |
|
Very well explaind Saswat and also for creating the DLL you can refer to Creating a simple DLL
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 14May2009,18:41 | #4 |
|
Quote:
Originally Posted by shabbir
|


]
