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 10 FEB 2003 02:26:30AM Alexandre Zaremba wrote:

Good day,

I try to use VB application to connect to OI tables.

I set reference to xrev.dll and wrote the next part of code inside VBasic form with button:

Public Revelation As Revelation

Private Sub Action_Click()

' Start Engine, Run a command, put result in viewer

Dim Engine As Object

Dim Result As Long

'Create an OpenEngine.

ChDir "c:\Revsoft\OI32bit" ' - home directory for OI 4.12

Result=Revelation.CreateEngineEngine, "\\:777", "SYSPROG", 0, 0)

'

This operation raise error "Runtime 91. Object variable or With block variable not set"

I can't find why it happends!

Can anybody help me?

Thanks,

Alex


At 10 FEB 2003 04:18AM Tim Marler wrote:

Alex,

You've missed out a "(" and you need to 'Create' the object first. You will need this first.

 Set objRevelation=CreateObject("Revsoft.Revelation")

then

 Result=Revelation.CreateEngineEngine, "\\:777", "SYSPROG", 0, 0)

should be

 Result=objRevelation.CreateEngine(objEngine, "\\:777", "SYSPROG", 0, 0)

HTH

Tim


At 10 FEB 2003 04:52AM Alexandre Zaremba wrote:

Thank you Tim.

It's not a good decision to use object method before creating that oblect -)).

But it's another problem. I can't register XREV.DLL.

I receive error 0x80070078 from DllRedisterServer.

May be my DLL is corrupted?

Have you any problem with regsvr32 c:\Path_to_OI_Application\xrev.dll?

Thanks,

Alex


At 10 FEB 2003 05:42AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

What version of XRev.DLL/OI are you using, and on what platform? I'm sure we saw this on earlier builds in Win98…

The Sprezzatura Group

World leaders in all things RevSoft

www.sprezzatura.com_zz.jpg


At 10 FEB 2003 05:59AM Oystein Reigem wrote:

Made a Google search for 0x80070078. Found a posting which said the code means "This function is not valid in Win32 mode".

- Oy -


At 10 FEB 2003 06:52AM Alexandre Zaremba wrote:

Windows 98 and OI 4.12.

Has Revelation got a new build version? Is it possible to send me the last fixed DLL?

Thanks.


At 11 FEB 2003 05:13PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Try the following code (from VB 6.0) known to work under Windows 2000. Add a Command Button to a form. I have a stored procedure inside OI32 called MYBASICPLUSROUTINE. Data is passed from VB to OI and from OI to VB in this example.

Steve

The Sprezzatura Group

World Leaders in all things RevSoft


Option Explicit
Public Revelation As Revelation

Private Sub Command1_Click()
    ' a button on the form activates our routine to load OI and
    ' run an OI function.
    Rev
End Sub

Private Sub Rev()

' Start Engine, Run an OI process from VB
' return value to VB, display results

On Error Resume Next
Dim Engine As RevSoftLib.IEngine
' Declare variables
Dim Result As Long
Dim Queue As Object
Dim strCmd As String
Dim RetVal As String
    
'Create an OpenEngine -
' this is where VB can find Open Engine on the hard disk
ChDir "c:\Revsoft\OI42\"
Set Revelation=New Revelation
DoEvents

' We'll call our instance of Open Engine "VB"
Result=Revelation.CreateEngine(Engine, "\\.\VB", "SYSPROG", 1, 1)
DoEvents
If Result=0 Then
  'Create an active Queue.
  Result=Engine.CreateQueue _
    Queue, "", "\\.\VB", "SYSPROG", "SYSPROG")
  DoEvents
  If Result=0 Then
    'Call a Basic+ function, passing a parameter through...
    strCmd=This is data sent from VB to OI32" + Chr(0)
    Result=Queue.CallFunction(RetVal, "MYBASICPLUSROUTINE", strCmd)
    DoEvents
    If Result=0 Then
      MsgBox RetVal
    End If
  End If
End If

  DoEvents
  Queue.CloseQueue
  DoEvents
  ' shut down Open Engine
  Engine.CloseEngine
  DoEvents
  ' pack away the objects we used inside VB
  Set Queue=Nothing
  Set Engine=Nothing
  Set Revelation=Nothing
End Sub


At 12 FEB 2003 02:13AM Richard Bright wrote:

Alex,

I may be a bit out of my depth re visual basic calls BUT as far as I know OI v4.12 is only good on Win98SE. Is this possibly the issue?


At 12 FEB 2003 08:13AM Sean FitzSimons wrote:

OI 4.1.2 will work on Win98SE, WinNT 4, Windows 2000 and Windows XP.

Sean


At 12 FEB 2003 04:21PM Richard Bright wrote:

Sean,

It was my fault, I hadn't been tracking the earlier thread. Thought he was trying to use Win98 and was trying to alert him to minimum 98SE. Indeed he is using win98se - but of cause that is a suboptimal platform for OI32 development going forward. As we know Microsoft is shortly to cease its own support for Win98se.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/3984c319399aa62085256cc90028e132.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1