Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 12 NOV 2010 09:08:37PM Dietrich Neuman wrote:

I've got a C# .NET application that uses NetOI to access our OI database. I've been trying to to get it to bring up an OI form, but it never brings the form up; it just returns. My .NET code calls:

          string paramms=new string1;
          paramms0=GREATGOOGLYMOOGLY!";
          Program.AppMgr.NetOIConnection.Server.CallSub("TESTMSG", paramms);

and then the OI subroutine TESTMSG looks like this:

Subroutine TestMsg(PAR)
Declare Subroutine Msg
Declare Function Dialog_Box
msgLine=Here is the param: " : PAR
Msg(msgLine)
Msg("And now, the CODE_TABLES form: (doesnt come up! invalid parent window?")
x=Dialog_Box("CODE_TABLES", "")
Return

The two calls to Msg bring the message boxes up, but the CODE_TABLES form never appears. I've tried calling Start_Window instead of Dialog_Box - no luck. Anyone had this problem? Anyone fixed this problem?


At 13 NOV 2010 10:46AM Bob Carten wrote:

Hi Dietrich,

The problem is that NetOI does not run in eventContext. In other words, NetOI communicates with an oengine that was started by the socketserver, rather than an engine that was started by the presentation manager, oinsight.exe.

You can work around this in two ways:

1. Launch OI at a known location and set the socket server to connect to that engine. This will work if netoi, socketserver and Oinsight are on the same desktop. Essentially, you start oi with a servername parameter, for example Oinsight.exe /SN=MYOI, then modify the eserver.cfg to use startupflags=0 shutdownflag=0, servername=\\.\MYOI

Read the docs, there may be other details.

2. Write a broker/proxy routine so that the engine created for NetOI connects to the engine where you want to start a window. This is appropriate if you have the netOI / oengineserver running a a central location, want to talk to desktop oinsight running on other workstations. In this case you have each oinsight put their computername, servername in a table ( e.g. mypipe=\\':@station:'\':Get_Property('SYSTEM', 'SERVER') ) then have your program use Basic+ revcapi functions CREATEENGINE, CREATEQUEUE to connect to the specific workstation. This is not trivial to implement, but provides some ability to push events to workstations.


At 22 NOV 2010 06:01PM Dietrich Neuman wrote:

Thank you for the info, Bob. I tried your first approach, though, and it doesn't work. I don't see the eserver.cfg setting "servername" documented anywhere - did you mean to write "server"? And I don't understand the use of the backslashes in "servername=\\.\MYOI". I tried it with and without the backslashes, with MYOI in quotes, "servername" and "server" – can't get it to work. You said "Read the docs, there may be other details" – can you tell me where those docs are? I've found the Helpfile listing for OECGI2, it gives a very cursory description of the eserver.cfg parameters, and no real information on their usage.


At 24 NOV 2010 01:08PM Bob Carten wrote:

Hi Dietrich,

I'll see if I can work up an example sometime in the nex few days.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/dc8748f8f0b6621d852577da000bc6d6.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1