M
mak
hi guys!
I think that the solution of the problem might be control.invoke nut i
can't understand how it function...here's the problem.
I have a C# application with 3 buttons and one textbox. the first one,
Start Reading, whenever clicked creates a thread, readthread. The entry
point of this thread is a function named Readentrypoint. The function
calls a DLL function (listen) using dllImport attribute.
Now, listen function returns a string that I want to view in the
textbox. So I put this statement in the readentrypoint function:
textBox1.text = listen();
the compiler not returns any kind of error but at execution time it
fails with error like 0x37437, not exception anyway..
I think it's a problem with threading, maybe because i'm creating a
thread but the controls owns to the application main form....
however, I've search on msdn but I did'n find any kind of exemple.
Please, help me or tell me what I'm doing wrong!
thanx
marco
I think that the solution of the problem might be control.invoke nut i
can't understand how it function...here's the problem.
I have a C# application with 3 buttons and one textbox. the first one,
Start Reading, whenever clicked creates a thread, readthread. The entry
point of this thread is a function named Readentrypoint. The function
calls a DLL function (listen) using dllImport attribute.
Now, listen function returns a string that I want to view in the
textbox. So I put this statement in the readentrypoint function:
textBox1.text = listen();
the compiler not returns any kind of error but at execution time it
fails with error like 0x37437, not exception anyway..
I think it's a problem with threading, maybe because i'm creating a
thread but the controls owns to the application main form....
however, I've search on msdn but I did'n find any kind of exemple.
Please, help me or tell me what I'm doing wrong!
thanx
marco