🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.inetsdk.programming.scripting.vbscript
Article #1

Calling one instance of an automation object multiple times

#1
From: Marc Lacoursiere
Date: Wed, 18 Mar 1998 00:00
41 lines
1974 bytes
Hello!

I made an InProc automation object using Delphi3 lately. What I want
to do with it is to create an instance of it in VBScript using
CreateObject in a sub. Then I should get a pointer to it with
GetObject in another sub. Take a look at this example:

______________________________________________________

Sub window_onLoad()
  Dim vObject
  set vObject = CreateObject("Object.Automation")
  vObject.Start
End Sub

Sub Check_OnClick()
  Dim vLObject
  set vLObject = GetObject("", "Object.Automation")

'>>> Insert some calls to vLObject's methods and properties here <<<'

  set vLObject = Nothing
End Sub
______________________________________________________


What I get when I try it in internet explorer 4 is this error message:

	"Unexpected call to method or property access."

I get prompted from this error each time I try to access a method or a
property inserted where specified in the source code written in this
message.

Is there a way to make it work? You should know that I cannot use
vObject, created with CreateObject but I want to use the same instance
that's been created in Sub window_onLoad()...

Mark
EPIX inc.
Technical Details
Message-ID: <351018a0.12899858@news.total.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10b423,7f965f749ffaa0de,start
X-Google-Attributes: gid10b423,public
X-Google-Thread: 108cda,7f965f749ffaa0de,start
X-Google-Attributes: gid108cda,public
X-Google-Thread: fe15c,7f965f749ffaa0de,start
X-Google-Attributes: gidfe15c,public
X-Google-Thread: fd196,7f965f749ffaa0de,start
X-Google-Attributes: gidfd196,public
From: lacom00@dmi.usherb.ca (Marc Lacoursiere)
Subject: Calling one instance of an automation object multiple times
Date: 1998/03/18
Message-ID: <351018a0.12899858@news.total.net>
X-Deja-AN: 335332198
Organization: EPIX
Newsgroups: microsoft.public.inetsdk.programming.scripting.vbscript,borland.public.delphi.oleautomation,microsoft.public.win32.programmer.ole,comp.os.ms-windows.programmer.ole