<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic C++ and ActiveX in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/c-and-activex/m-p/10179046#M1822894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Problem using the ActiveX controls within a C++ MFC application to call a BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done:&lt;/P&gt;&lt;P&gt;- I have imported the ActiveX controls wdtlog.ocx, wdobapiu.ocx and wdtfuncs.ocs. Thus for all these .tlh and .tli stubs were generated.&lt;/P&gt;&lt;P&gt;- Then I included the generated namespaces.&lt;/P&gt;&lt;P&gt;- I created pointers for SAPLogonCtrl and SAPFunctionsOCX.&lt;/P&gt;&lt;P&gt;- Now, I instanciated them using CreateInstance for "SAP.Logoncontrol.1" and "SAP.Functions". These instances were created without error.&lt;/P&gt;&lt;P&gt;- Calling the logon was also successful, giving me an open connection (I tried with m_pLogonControl-&amp;gt;GetIsConnected() ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next thing is to call the BAPI. So I added the connection to the generated pointer (ISAPFunctionsPtr). This also went ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, adding the BAPI name gives me an exception. My call is:&lt;/P&gt;&lt;P&gt;SAPFunctionsOCX::IFunctionPtr m_pFunctionPtr = m_pFunctions-&amp;gt;Add("MY_BAPI_NAME_HERE");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: What is wrong, how do I fix it and is there a manual for that? I only found tons of VB scriplets, which I tried to adopt to C++.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Dirk Schulten.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2014 09:22:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-03-12T09:22:50Z</dc:date>
    <item>
      <title>C++ and ActiveX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/c-and-activex/m-p/10179046#M1822894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Problem using the ActiveX controls within a C++ MFC application to call a BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done:&lt;/P&gt;&lt;P&gt;- I have imported the ActiveX controls wdtlog.ocx, wdobapiu.ocx and wdtfuncs.ocs. Thus for all these .tlh and .tli stubs were generated.&lt;/P&gt;&lt;P&gt;- Then I included the generated namespaces.&lt;/P&gt;&lt;P&gt;- I created pointers for SAPLogonCtrl and SAPFunctionsOCX.&lt;/P&gt;&lt;P&gt;- Now, I instanciated them using CreateInstance for "SAP.Logoncontrol.1" and "SAP.Functions". These instances were created without error.&lt;/P&gt;&lt;P&gt;- Calling the logon was also successful, giving me an open connection (I tried with m_pLogonControl-&amp;gt;GetIsConnected() ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next thing is to call the BAPI. So I added the connection to the generated pointer (ISAPFunctionsPtr). This also went ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, adding the BAPI name gives me an exception. My call is:&lt;/P&gt;&lt;P&gt;SAPFunctionsOCX::IFunctionPtr m_pFunctionPtr = m_pFunctions-&amp;gt;Add("MY_BAPI_NAME_HERE");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: What is wrong, how do I fix it and is there a manual for that? I only found tons of VB scriplets, which I tried to adopt to C++.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Dirk Schulten.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 09:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/c-and-activex/m-p/10179046#M1822894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-12T09:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: C++ and ActiveX</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/c-and-activex/m-p/10179047#M1822895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nevermind, I stopped using the OCX to connect. Maybe they just don't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2014 09:36:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/c-and-activex/m-p/10179047#M1822895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-27T09:36:48Z</dc:date>
    </item>
  </channel>
</rss>

