{"id":169,"date":"2012-05-05T04:07:50","date_gmt":"2012-05-05T09:07:50","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=169"},"modified":"2014-12-03T08:27:24","modified_gmt":"2014-12-03T13:27:24","slug":"third-party-plugins-must-ship-with-proper-runtime","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2012\/05\/05\/third-party-plugins-must-ship-with-proper-runtime\/","title":{"rendered":"Third-party plugins must ship with proper runtime"},"content":{"rendered":"

From time to time we receive questions from people having problems loading some unknown third party plug-ins. These plug-ins are most commonly written by some hobby programmers who don’t know how to compile and ship the plug-ins so they work on client machines.<\/p>

When plug-in DLL is written with AmiBroker Development Kit (ADK) it is usually compiled with Microsoft C runtime library. The “problem” is that depending on compiler used, different versions of C runtime are required for the DLL to be loaded by the operating system.<\/p>

For example Visual C++ 6.0 links against MSVCRT.DLL that is commonly found in all Windows starting from Windows XP so you can “forget” about installing the runtime. But when plugin is compiled with more recent Visual C++ 2005, 2008 or 2010 then required C runtime library is almost never<\/strong> present on client computer.<\/p>

In order to load the plugin compiled with VC2005 or higher, one must<\/strong> install proper run-time library on the client computer. The runtime must exactly<\/strong> match the compiler version and eventual compiler service pack used to compile the DLL, otherwise operating system will not<\/strong> load the DLL. The developer of 3rd party DLL can find appropriate runtimes (vcredist.exe) in<\/p>

VCInstallDir\SDK\v2.0\Bootstrapper\Packgages\vcredist_x86
or
VCInstallDir\SDK\v2.0\Bootstrapper\Packgages\vcredist_x64<\/p>

or similar directory (depending on VC version he\/she is using). Then such vcredist.exe must be shipped by the plugin vendor to the client for the installation. <\/p>

Alternatively the plugin vendor can compile their DLL with static runtime library.<\/p>

There is a freeware tool called Dependency Walker (http:\/\/www.dependencywalker.com\/<\/a>) that allows to check what given DLL needs to be loaded by the operating system. Tell your plugin vendor to use that tool so they don’t miss the essential dependencies.<\/p>","protected":false},"excerpt":{"rendered":"

From time to time we receive questions from people having problems loading some unknown third party plug-ins. These plug-ins are most commonly written by some hobby programmers who don’t know how to compile and ship the plug-ins so they work on client machines.When plug-in DLL is written with AmiBroker Development Kit (ADK) it is usually […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[34,56],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/169"}],"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=169"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":842,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/169\/revisions\/842"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}