Hi, I've posted some questions on threading and started working on it.
I've used only one global variable to see the result of the thread and respond to it.
Each thread (2 to be exact) use SQL statement, so thread 1 uses statementnumber 1, thread 2 uses statementnumber 2. Seems save. Also, I've used the SQL_THREAD %THREAD_START, < 1 for thread1, 2 for thread2> with the corresponding closes on all exits and of course the SQL_initialise and SQL_THREAD ThreadMax, 2
For the better part, it works just fine. Yet, after a couple of runs I get a error from the Kernel32.dll!
I call my PBDLL from a VB app so normally when there's a problem with my DLL I get error saying that the error comes from the DLL, not the Kernel32.
Any ideas what might be wrong ?
I'm looking at the Critical Section idea but got a little lost (maybe someone can help)
Sincerely
Jeroen
------------------
I've used only one global variable to see the result of the thread and respond to it.
Each thread (2 to be exact) use SQL statement, so thread 1 uses statementnumber 1, thread 2 uses statementnumber 2. Seems save. Also, I've used the SQL_THREAD %THREAD_START, < 1 for thread1, 2 for thread2> with the corresponding closes on all exits and of course the SQL_initialise and SQL_THREAD ThreadMax, 2
For the better part, it works just fine. Yet, after a couple of runs I get a error from the Kernel32.dll!
I call my PBDLL from a VB app so normally when there's a problem with my DLL I get error saying that the error comes from the DLL, not the Kernel32.
Any ideas what might be wrong ?
I'm looking at the Critical Section idea but got a little lost (maybe someone can help)
Sincerely
Jeroen
------------------
Comment