By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,460 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,460 IT Pros & Developers. It's quick & easy.

Class Help

P: n/a
Hi,

I have been tasked to upgrade a project from VB6 to VB.NET, i have a number
of problems of which most i have now solved but i am still very perplexed by
one problem. The VB6 application has one class whose instance property is
declared as GlobalMultiUse and this class defines properties that are shared
between a number of other applications in use that will soon be converted to
..NET.

The problem is that during initial testing the new class in .NET declared as
Public with a Publi Sub New does not share across other applications.

Example:

ApplicationA (references DLLA which contains the public class)

when ApplicationA runs it sets up some of the properties in DLLA,
gConnection is one of the properties, which is held in a public module.

ApplicationB when it runs "should" return the already set connection string,
however this does not happen.

The corresponding effect is possible and indeed is in use in VB6, my
question is, how can you implement the same functionality in .NET now that
Microsoft (in thier infinite wisdom) has removed the GlobalMultiUse property
of class instancing, has anyone else come across this problem before, and
does anyone know of a workaround.

The end result is that DLLA should behave in the same way as it does in VB6
(as a server for global properties and methods which are shared between
applications), if this is not possible then .NET may not be suitable for the
needs of our client.

Thanks for any help in advance
Neil
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Neil Stevens" <ne**********@blueyonder.co.uk> schrieb
ApplicationA (references DLLA which contains the public class)

when ApplicationA runs it sets up some of the properties in DLLA,
gConnection is one of the properties, which is held in a public
module.

ApplicationB when it runs "should" return the already set connection
string, however this does not happen.


Data is not shared among processes. Have a look at "Remoting":
http://msdn.microsoft.com/library/en...etremoting.asp
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
"Neil Stevens" <ne**********@blueyonder.co.uk> schrieb
"Armin Zingler" <az*******@freenet.de> wrote in message
news:Od*************@TK2MSFTNGP11.phx.gbl...
"Neil Stevens" <ne**********@blueyonder.co.uk> schrieb
ApplicationA (references DLLA which contains the public class)

when ApplicationA runs it sets up some of the properties in
DLLA, gConnection is one of the properties, which is held in a
public module.

ApplicationB when it runs "should" return the already set
connection string, however this does not happen.


Data is not shared among processes. Have a look at "Remoting":

http://msdn.microsoft.com/library/en...etremoting.asp

I think my example wasnt explained properly, in VB6 i have a
globalmultiuse class in a dll called utilities, and there are three
applications that use this dll.

When the main application is run it sets itself up and sets global
properties in the utilities class, if i now run one of the second
applications then it will have the same properties as the main
application.

i.e. the connection string in the second application will already
have been set by the main application and thus the second application
will just use this connection string.

the class uses a module to hold the variables for the class, this
behaviour is what i need to implement in vb.net


Yes, that's what I understood. If you use the same library in two different
applications, you've got two different sets of data.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Nov 20 '05 #3

P: n/a
I think my example wasnt explained properly, in VB6 i have a globalmultiuse
class in a dll called utilities, and there are three applications that use
this dll.

When the main application is run it sets itself up and sets global
properties in the utilities class, if i now run one of the second
applications then it will have the same properties as the main application.

i.e. the connection string in the second application will already have been
set by the main application and thus the second application will just use
this connection string.

the class uses a module to hold the variables for the class, this behaviour
is what i need to implement in vb.net

Thanks
Neil
"Armin Zingler" <az*******@freenet.de> wrote in message
news:Od*************@TK2MSFTNGP11.phx.gbl...
"Neil Stevens" <ne**********@blueyonder.co.uk> schrieb
ApplicationA (references DLLA which contains the public class)

when ApplicationA runs it sets up some of the properties in DLLA,
gConnection is one of the properties, which is held in a public
module.

ApplicationB when it runs "should" return the already set connection
string, however this does not happen.
Data is not shared among processes. Have a look at "Remoting":

http://msdn.microsoft.com/library/en...etremoting.asp

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.