<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/174e4604f0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/174e4604f0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/174e4604f0/</id><updated>2020-02-27T19:18:08.293000Z</updated><subtitle>Recent posts to Visualization with ActiveX components</subtitle><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#66a1" rel="alternate"/><published>2020-02-27T19:18:08.293000Z</published><updated>2020-02-27T19:18:08.293000Z</updated><author><name>Alexxx</name><uri>https://forge.codesys.com/u/alexxx/</uri></author><id>https://forge.codesys.com3f748fbad50b41888c5035e21a955acccdf97bfa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK. Thank you for your help!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#65b9" rel="alternate"/><published>2020-02-27T19:18:07.079000Z</published><updated>2020-02-27T19:18:07.079000Z</updated><author><name>Michael Pfob</name><uri>https://forge.codesys.com/u/michael-pfob/</uri></author><id>https://forge.codesys.com9b21a35e3d95ae45ec53f90fc5165be1e98810b4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Alexxx,&lt;/p&gt;
&lt;p&gt;glad to hear that you were successful. Are you sure that a method gets called multiple times if you only siwtch a variable from false to true for triggering this call?&lt;/p&gt;
&lt;p&gt;If you are doing everything correctly, then this sounds like an error. The method should of course be called only once. If it is called more often then please tell this problem or bug to out support. &lt;/p&gt;
&lt;p&gt;e &lt;a class="" href="mailto:support@3s-software.com"&gt;support@3s-software.com&lt;/a&gt; e &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#d62b" rel="alternate"/><published>2020-02-27T19:18:03.657000Z</published><updated>2020-02-27T19:18:03.657000Z</updated><author><name>Alexxx</name><uri>https://forge.codesys.com/u/alexxx/</uri></author><id>https://forge.codesys.com426dcb34b8426a29adf2950118dcacc5ab4f0449</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Good day, Michael!&lt;/p&gt;
&lt;p&gt;Thanks to you I have solved this problem: if DLL is built in Borland C++ Builder it exports function named "_ExecuteActiveXCall", and if DLL is built in Microsoft Visual C++ it exports "ExecuteActiveXCall" function, as it should be.&lt;/p&gt;
&lt;p&gt;But there is another problem: when I call method "GoBack" for Shell.Explorer.2 (web browser) component in CoDeSys, it executes several times.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#322f" rel="alternate"/><published>2020-02-27T19:18:02.444000Z</published><updated>2020-02-27T19:18:02.444000Z</updated><author><name>Michael Pfob</name><uri>https://forge.codesys.com/u/michael-pfob/</uri></author><id>https://forge.codesys.comfc4f1f3caf6affe05dcb6c0c277d78171c39f001</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Alexxx,&lt;/p&gt;
&lt;p&gt;you do not need the header stdafx.h. You must build a valid Win32 dll that exports the correct function "ExecuteActiveXCall", but how you do this, there are no more conditions.&lt;/p&gt;
&lt;p&gt;Do you have a tool that shows the exported functions of a dll? With the VisualStudio there comes a tool called Depends. This tool shows all the functions that are exported from a dll with their export names. Using such a tool you could check if the function is exported with a correct name.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#93fc" rel="alternate"/><published>2020-02-27T19:17:58.841000Z</published><updated>2020-02-27T19:17:58.841000Z</updated><author><name>Alexxx</name><uri>https://forge.codesys.com/u/alexxx/</uri></author><id>https://forge.codesys.com131a867565d5c70af907cba9be557286ea999e3d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm sure, that dll is loaded, because when I run my project, I can't delete it. And the trigger variable changes its state from false to true.&lt;/p&gt;
&lt;p&gt;There is one more problem: I can't build my DLL with "stdafx.h" included, because there are many errors in different header files, included in "stdafx.h". So tell me please if I really need this header file to properly run my project, or I don't need to include it in my DLL (without this header file the DLL builds properly).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#cd9f" rel="alternate"/><published>2020-02-27T19:17:57.629000Z</published><updated>2020-02-27T19:17:57.629000Z</updated><author><name>Michael Pfob</name><uri>https://forge.codesys.com/u/michael-pfob/</uri></author><id>https://forge.codesys.com34f83dc4d4b780c265480ccf9215be163cda571e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, then please tell me if your Dll is loaded by codesys. &lt;/p&gt;
&lt;p&gt;If this is true, then make sure (eg. by toggling the configured trigger variable) that the triggervariable changes its state from false to true as described in the documentation.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#4c06" rel="alternate"/><published>2020-02-27T19:17:53.631000Z</published><updated>2020-02-27T19:17:53.631000Z</updated><author><name>Alexxx</name><uri>https://forge.codesys.com/u/alexxx/</uri></author><id>https://forge.codesys.com520421ca65589a6de009d5ce494aceebfaff0fa2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes, I exported this function as you had shown, but the problem remains. I.e. this function doesn't execute when I run my project in CoDeSys.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#b1cf" rel="alternate"/><published>2020-02-27T19:17:52.392000Z</published><updated>2020-02-27T19:17:52.392000Z</updated><author><name>Michael Pfob</name><uri>https://forge.codesys.com/u/michael-pfob/</uri></author><id>https://forge.codesys.coma2841b742908395d6b75d2e2e43622690e2ec7eb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Alexxx,&lt;/p&gt;
&lt;p&gt;one Problem could be that the function is not exported from the dll with its correct name. If you compile a Dll with a C++-Compiler there may be problems because the compiler exports different names of functions than a C-Compiler does. &lt;/p&gt;
&lt;p&gt;Are you sure that you have used the correct declaration of the exported function:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;extern&lt;/span&gt; &lt;span class="ss"&gt;"C"&lt;/span&gt; &lt;span class="n"&gt;__declspec&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dllexport&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;void&lt;/span&gt; &lt;span class="n"&gt;ExecuteActiveXCall&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;IUnknown&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pUnk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pszId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pszParam&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pszReturnBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;
&lt;span class="n"&gt;nReturnBufferSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;pdwReturnFlag&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The statement &amp;gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
extern "C"&lt;br/&gt;
 is important because this statement forces the compiler to export the function by its real name from the dll.&lt;/p&gt;
&lt;p&gt;I hope that helps,&lt;/p&gt;
&lt;p&gt;Michael Pfob&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Visualization with ActiveX components</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/174e4604f0/?limit=25#ce46" rel="alternate"/><published>2020-02-27T19:17:51.116000Z</published><updated>2020-02-27T19:17:51.116000Z</updated><author><name>Alexxx</name><uri>https://forge.codesys.com/u/alexxx/</uri></author><id>https://forge.codesys.comede88e271e3e5192ff00839ae0f6cd9c7ee92a3a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When using ActiveX components in CoDeSys visualization, I need to attach a self-made Dynamic Linked Library (DLL).&lt;/p&gt;
&lt;p&gt;It was written (using Borland C++ Builder 5) and attached as described in CoDeSys Help, but function (named "ExecuteActiveXCall") and all text included in this DLL don't execute. (When I start (Login &amp;amp; Run) my project in CoDeSys, DLL attaches statically to my project, but it doesn't execute).&lt;/p&gt;
&lt;p&gt;If anybody faced this problem, tell me, please, how to fix this.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>