{{tag>category:"OpenInsight 32-Bit" author:"Steve Epstein" author:"[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]" author:"Sean FitzSimons" author:"dsig@sigafoos.org" author:"Gerald Lovel" author:"Bob Carten"}} [[https://www.revelation.com/the-works|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]] ==== Open Engine (OpenInsight 32-Bit) ==== === At 24 JUL 2006 03:13:41AM Steve Epstein wrote: === I am not a "Windows" programmer, so my questions are probably elementary, however I need some help from those more knowledgable. We have a single user application. We would like to call OI functions, or start OI windows, from VB or C++. While I have the Open Engine Reference 1.5, and I have read the Open Engine section of the on-line help, it is still a mystery to me how to get VB and OI to run together. Does anyone have a simple example (like "Hello World") of how to do the following on the same machine using either VB or C++: 1. Start the OI Engine; 2. Call an existing OI function and use the information passed back; 3. Start an OI window and send an event to it? Thanks in advance. Any help would be greatly appreciated. ---- === At 24 JUL 2006 05:45AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Steve, Check out a href=http://www.revelation.com/o4wtrs/oecgi3.exe/O4W_DOMINO_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&KEY=66C867B166B8791685256C2500612A91&KEY1=66C867B166B8791685256C2500612A91]this[/url] thread for an example of calling an OI function from VB. This should take care of questions 1 and 2. You should also look at the OpenEngine chapter of the on-line help for more explanation on how OE is loaded from other programs. For question 3 you could execute OINSIGHT.EXE and then send it a custom message via the Windows SendMessage() function to one of your OI forms. You could then use the form's WINMSG event to trap the message and process accordingly.... [url=http://www.sprezzatura.com]The Sprezzatura Group [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 24 JUL 2006 06:33PM Steve Epstein wrote: === Dear Sprezz, Thanks for your help. I looked at the thread and the on-line info, but it is still a mystery to me how the VB program knows about the Rev objects. Must one make the VB program aware of some DLL, such as REVCAPI? In the code fragments I saw no statements to load the objects. How does one do this? ---- === At 25 JUL 2006 05:01AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Steve, Can't say I'm a VB programmer but if you register XRev.DLL on your system you should be able to find a Revelation object - I know VB has a dialog box for making ActiveX object available to the IDE - but you'll have to check the VB docs ... [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 25 JUL 2006 09:08AM Sean FitzSimons wrote: === Steve, Have you looked at: Online Help: Programmer's Reference Manual Chapter 10: Programming Techniques Communicating Between Visual Basic and OpenInsight Sean ---- === At 25 JUL 2006 09:20AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Nice one Sean, knew I'd seen it somewhere! :) [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 26 JUL 2006 05:09AM Steve Epstein wrote: === Dear Sean, I read Chapter 10 and tried to implement the example. I failed completely. The VB code editor indicates that the following statements are not correct, and gives some suggestions: Public Revelation As Revelation .... suggestion: Public Revelation As RevSoftLib.Revelation Set Revelation=New Revelation .... suggestion: Revelation=New RevSoftLib.Revelation DoEvent is not a statement and DoEvent() is not a function. In any case, the code does not seem to run with these changes. Does the OEngine have to be already running? The example does not indicate, but I tried it both ways. Here is the complete snippet (I only tried the first part to see if an engine could be started): Option Explicit On Public Class Form1 Public Revelation As RevSoftLib.Revelation Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Command1_Click() Dim Engine As RevSoftLib.IEngine ' Declare variables Dim Result As Long 'Create the core Revelation object. Revelation=New Revelation Result=Revelation.CreateEngine(Engine, ":777", "SYSPROG", 0, 0) MsgBox("Result after CreateEngine= & Result) Engine=Nothing Revelation=Nothing End Sub End Class Does anyone out there know how to use VB and OI together? We really need to get this working. Please help us. I can be contacted at sepstein@absconsulting.com or at +81 48-726-8543 in Tokyo. Steve ---- === At 26 JUL 2006 07:53AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Eric the Emu wrote an [url=http://www.sprezzatura.com/senl/volume_4_issue_1.htm#Eric%20the%20Emu%20does%20VB1%20(and%20Visual%20Basic)]SENL Article[/url] about this. [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 26 JUL 2006 10:56PM Steve Epstein wrote: === Dear All, Thanks for your help! The problem, I discovered, was with Visual Studio 2005. Something has changed in the syntax definition of VB. When I used an older version of Visual Studio, everything worked exactly as documented. Are there any VB mavens out there who know how to work with VS 2005? Cetainly this is a big drawback (no thanks to MicroCrap), fo writing new programs to communicate with the engine. ---- === At 26 JUL 2006 10:59PM Steve Epstein wrote: === Dear Sprezz, Same problems with Eric the Emu's code as with the example in Chapter 10. See the RESOLVED posting I just made. If Eric is out there, perhaps he knows how to change the code to work with Visual Studio 2005. ---- === At 27 JUL 2006 09:27AM dsig@sigafoos.org wrote: === did you contact any of the many good VB groups out there about the problem? ---- === At 27 JUL 2006 11:57AM Gerald Lovel wrote: === Another mindshare issue. MicroSoft changes program interfaces to introduce incompatibilities. This keeps the programmer focused on dealing with MicroSoft compatibility issues, so that there is no time for productive work -- like addressing the Linux port. Incidentally, how is that going, Rev? ---- === At 27 JUL 2006 12:46PM Bob Carten wrote: === Are you using OI 7.21? If you have more than one version of OI on the machine, did you register the 7.21 Xrev.dll? (e.g. regsvr32 \revsoft\oi721\xrev.dll) As I recall, we reworked Xrev.dll to make it compatible with C# in .Net 2003. Vb.Net could handle variant arrays, C# could not, or something like that. Could be that they fixed that in 2005. broke something else. Bob ---- === At 27 JUL 2006 08:11PM Steve Epstein wrote: === Yes, I am using OI7.2.1 with all the latest patches. I am not the only one having compatibility issues with VS 2005. My colleauges (in Sweden), who work in .net with C#, have similar issues. [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=4CD3403DCA9824C0852571B50027B49D|View this thread on the Works forum...]]