Test Results

About us

 Error 10106 when using RTC Demos in MultiTheaded mode
Total posts: 1
 Author Error 10106 when using RTC Demos in MultiTheaded mode
Danijel Tkalcec [RTC]

24.09.2009 23:20:54
Registered user
I just found out that a 64KB stack size is no longer sufficient on Windows Vista when you want to run a RTC Server. This will not be a problem if you start a new project from scratch, but you could start getting Error code 10106 if you open and compile the standard RTC WebServer Demo, or any other RTC Server example project, because I have reduced Max Stack Size on all RTC SDK Demo projects to 65KB in order to reduce the amount of memory required per thread and allow use of more threads in an application without increased memory requirements.

Unfortunately, 64 KB is no longer enough if you want to use WinSock 2 (after one of the later Windows Vista updates), so ... if you try to compile and run the RTC WebServer Demo and see the error message with Error code 10106, you should go to Project Options in Delphi and make sure that Max Stack Size for the Project is at least 100 KB (102400 bytes).

You can also use a larger value if you like, but keep in mind that every thread created from your project will require one stack. If you want to stay on the safe side and your code does not require too much stack, you can set Max Stack Size to 512 KB, which is half of the default value set by Delphi and should be more than enough for any app.

Best Regards,
Danijel Tkalcec