-
Shared variables in an activeX exe
Hello group
I just read an article in VBPJ (Oct 99) about messaging. In it,
they use a public object variable in a standard module to communicate
between instances of the program. The program is set as an ActiveX
EXE. It seems that every time I start the EXE, the public object in
each instance point to the same object. It is declared like this:
Public gobjMathProblemCenter As New MathProblemCenter
Why does this occur? If someone showed me this code, I would assume a
new object is created everytime a new instance of the app is started.
Thanks a 10^6
-- Joel
-
Re: Shared variables in an activeX exe
Below is what one person wrote me (thanks BTW). I'll put it on the
newsgroup for others to read. Any other comments on this?
-- Joel
-------- Original Message --------
Subject: Re: Shared variables in an activeX exe
Date: Fri, 11 Aug 2000 21:22:28 +1000
From: "Steve Fillingham" <steve51@ihug.com.au>
Reply-To: "Steve Fillingham" <steve51@ihug.com.au>
Organization: CodeDrive Pty Ltd
To: "Joel Ryan" <jryan@vsi-hq.com>
References: <3992C588.C97A02F9@vsi-hq.com>
Hi Joel,
I think this is because (under 95 & 98) the ActiveX EXE is only loaded
once and simply referenced by multiple clients. If you are running it as
a
DCOM server on NT, since DCOM under NT will create a seperate instance for
each client depending upon how the client is logging on to the DCOM
server.
You can set it up thru DCOMCNFG to log on as a single specified user and
it
will reference the same instance of your ActiveX EXE.
Im not that familiar with what Iv said here, Im just getting into this
stuff myself. Hope it helps anyway ..
Steve Fillingham
steve51@ihug.com.au
Joel Ryan wrote:
> Hello group
> I just read an article in VBPJ (Oct 99) about messaging. In it,
> they use a public object variable in a standard module to communicate
> between instances of the program. The program is set as an ActiveX
> EXE. It seems that every time I start the EXE, the public object in
> each instance point to the same object. It is declared like this:
>
> Public gobjMathProblemCenter As New MathProblemCenter
>
> Why does this occur? If someone showed me this code, I would assume a
> new object is created everytime a new instance of the app is started.
>
> Thanks a 10^6
> -- Joel
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks