N
Nenad Dobrilovic
Hi,
I have one annoying problem. I made callback function from DLL made in
C++ to C# program. As I can see, it is rather easy, and there was no
reported problems on Internet.
But, it doesn't work in my code...
It should work like this: I call 'Connect' function in DLL, which starts
the thread; the thread calls (using callback) functions in managed code.
When I walk through debbuger, and I stop the main thread in C#, it
really works for one or two times, but after that I get "privileged
instruction" exception. I opposite case, when main thread is not
stopped, I get exception immediately.
If I don't use debugger, it doesn't work at all. I get "null reference"
exception first time when callback should be called.
Can anyone help me?
Thank you in advance, Nenad
I have one annoying problem. I made callback function from DLL made in
C++ to C# program. As I can see, it is rather easy, and there was no
reported problems on Internet.
But, it doesn't work in my code...
It should work like this: I call 'Connect' function in DLL, which starts
the thread; the thread calls (using callback) functions in managed code.
When I walk through debbuger, and I stop the main thread in C#, it
really works for one or two times, but after that I get "privileged
instruction" exception. I opposite case, when main thread is not
stopped, I get exception immediately.
If I don't use debugger, it doesn't work at all. I get "null reference"
exception first time when callback should be called.
Can anyone help me?
Thank you in advance, Nenad