PC Review


Reply
 
 
Neil Stevens
Guest
Posts: n/a
 
      19th May 2004
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


 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      19th May 2004
"Neil Stevens" <(E-Mail Removed)> 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

 
Reply With Quote
 
Neil Stevens
Guest
Posts: n/a
 
      19th May 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Neil Stevens" <(E-Mail Removed)> 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
>



 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      19th May 2004
"Neil Stevens" <(E-Mail Removed)> schrieb
> "Armin Zingler" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Neil Stevens" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't specify a location for new class code file on class diagram>new class dialog? Andy B Microsoft C# .NET 3 14th Feb 2008 01:57 AM
call a mnuFileNew_Click method from a Main MDI class from another class (can be a MdiChild class.. )? M. G, Microsoft Dot NET Framework Forms 1 31st May 2006 06:28 AM
Can it possible redefine class with subclass when inherit base class with sub class? ABC Microsoft C# .NET 4 10th Jan 2006 11:13 PM
Pass an instantiated base class to a new class that inherits the same class -- Possible?? Brad Navarro Microsoft C# .NET 3 9th Jan 2004 01:07 AM
activex ,money tree dialer,RdxE Class,updaate class,YInstStarter Class damaged RUSSELL Windows XP Performance 1 23rd Nov 2003 02:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:17 AM.