How to call C++ parameterised function from C# using thread
-
-
Hi, I want to call parameterised function which is written in c++ from c# by using thread and also how will c# know or will get return value from c++ function, so that c# function will proceed further. If you have any example then let me know. Thanks sjs
-
Hi, I want to call parameterised function which is written in c++ from c# by using thread and also how will c# know or will get return value from c++ function, so that c# function will proceed further. If you have any example then let me know. Thanks sjs
Something like this:
[DllImport("yourdllname.dll")]
public static extern returnType FunctionName(parameterType parameter);To call it on a thread, call
BeginInvoke
on aParameterizedThreadStart
instance that in turn calls your PInvoke function.Dave
Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)