Quantcast
Channel: SCN: Message List - SAP GUI
Viewing all articles
Browse latest Browse all 6448

Question concerning accessing the SAP GUI through C++

$
0
0

Dear Group,

 

I'm writing a console application in visual studio 2010. I'm having a hard time using the scripting engine.

 

I would like to use the calls findbyId and findbyname to access fields on the gui.

 

What seems to work so far:

 

 

      // Get the objects outer most interface
        sapgui = GetRunningObject(L"SAPGUI");
      if(!sapgui)
        return NULL;

 

      // Get the dispatch interface
      if(sapgui->QueryInterface(IID_IDispatch, (void**)&dispatch) != S_OK)
      {
          sapgui->Release();
        return NULL;
      }

 

I'm basically at the point of trying things until I might stumble on the correct answer. I create the object SAPFEWSELIb::_DsapfewsePtr sapobj;. This allows me to call sapobj->GetScriptingEngine(). The code fails at this point.

 

The intent is to create an object SAPFEWSELib::_DsapfewsePtr sapGuiObject = new SAPFEWSELib::_DsapfewsePtr(sapobj->GetScriptingEngine().

 

My understanding is that the object sapGuiObject will give me access to the calls I'm trying to use.

 

I'm not even sure if I'm asking the question the correct way, let me know if anything needs clarifying.

 

Thank you.

 

Sincerely,

John.


Viewing all articles
Browse latest Browse all 6448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>