{"id":136,"date":"2010-11-19T10:51:31","date_gmt":"2010-11-19T15:51:31","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=136"},"modified":"2014-12-04T04:52:42","modified_gmt":"2014-12-04T09:52:42","slug":"third-party-plugins-must-use-multithreaded-run-time","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2010\/11\/19\/third-party-plugins-must-use-multithreaded-run-time\/","title":{"rendered":"Third-party plugins must use multithreaded run-time"},"content":{"rendered":"
All developers of 3rd party plugin should NOT change the default project settings that are provided in sample projects in the ADK. If you change anything, you must make sure that you are using multi-threaded C runtime library as shown below:<\/p>
<\/p>
It is absolutely essential to check this setting, as the default for Visual C++ 6.0 static links is to use single-threaded version. Also you should avoid static linking to C runtime. It only makes your DLL bigger and unsafe (because security fixes applied by Windows update can’t fix statically linked programs). <\/p>
So, once again you absolutely need to make sure that your plugins use “Multithreaded DLL” run-time library.<\/p>
Failure to do so results in bizarre crashes, mainly occurring in OS Kernel at InterlockedDecrement or at RtlInterlockedFlushSList calls.<\/p>
Note that this applies NOT ONLY to multi-threaded editions of AmiBroker but to ALL editions, since you must not mix run time libraries within single application.<\/p>
Note also that most recent editions of Visual C++ compilers (2005 and 2010) do not allow to choose single-threaded runtime anymore.<\/p>","protected":false},"excerpt":{"rendered":"
All developers of 3rd party plugin should NOT change the default project settings that are provided in sample projects in the ADK. If you change anything, you must make sure that you are using multi-threaded C runtime library as shown below:It is absolutely essential to check this setting, as the default for Visual C++ 6.0 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25],"tags":[34,56],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/136"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":843,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/136\/revisions\/843"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}