Hello Ben, I quickly made a dummy DLL to limit the problem to the essentials.
I think my problem comes more from how I use the semaphore. I wanted to do that: only "semaphore signal", But that somehow doesn't work. Now i'm doing that "[ Processor yield. semaphore signal ] fork" (it work's) but i don't know if that's a good idea. ffiCallback ^ FFICallback signature: #( void #( uint32 foo ) ) block: [ :foo | Transcript show: 'API Funktion value: ' , foo asString, ' activePriority:', Processor activePriority asString; cr. "that's working" [ Processor yield. semaphore signal ] fork. "that usually works 80%." "[ semaphore signal ] fork" "that crashes pharo almost always." "semaphore signal" ] I also have a little problem, too. Why can I use my own C-Type UNUM32 at ...self ffiCall: #( T_ERROR StartMyThreadFunction(UNUM32 millisecondsToFire) ). But with FFICallback signature: # (void # (uint32 foo)) I get an error "Unable to resolve external type: UNUM32. Why is that? Thanks for your help. testDllForAsyncCallback.dll <http://forum.world.st/file/t372350/testDllForAsyncCallback.dll> testDllForAsyncCallback.cpp <http://forum.world.st/file/t372350/testDllForAsyncCallback.cpp> testDllForAsyncCallback.h <http://forum.world.st/file/t372350/testDllForAsyncCallback.h> testDllForAsyncCallback.h <http://forum.world.st/file/t372350/testDllForAsyncCallback.h> UFFICallback.st <http://forum.world.st/file/t372350/UFFICallback.st> CTypes.st <http://forum.world.st/file/t372350/CTypes.st> <http://forum.world.st/file/t372350/Transcript.png> -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html