473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Class Help

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
Jul 21 '05 #1
3 1391
"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

Jul 21 '05 #2
"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
Jul 21 '05 #3
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

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Goodyear | last post by:
At the moment im experimenting with ideas in C++ and would really like to solve the following, please please help. Sorry i dont even know what the subject is this would come under? :( Sorry if...
1
by: Naren | last post by:
Victor Bazarov <v.Abazarov@comAcast.net> wrote: >Naren wrote: >> MyServer class conatins a list of Mysock class. >> >> class Myserver >> { >> private: >> list<Mysock> L1; >> }; >>
5
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
4
by: Mike | last post by:
Please help this is driving me nuts. I have 2 forms, 1 user class and I am trying to implement a singleton class. Form 1 should create a user object and populate some properties in user. Form2...
5
by: Jeff Bunting | last post by:
I'm trying to serialize a class I have and have been getting: An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll There was an error reflecting type...
1
by: Joe Carner via .NET 247 | last post by:
First time posting, thanks in advance for any help you can give me. Basically I am trying to a class that i want to be able to access the private data members of another class, both of which i...
16
by: Allen | last post by:
I have a class that returns an arraylist. How do I fill a list box from what is returned? It returns customers which is a arraylist but I cant seem to get the stuff to fill a list box. I just...
11
by: Darren.Ratcliffe | last post by:
Hi guys Posted what was probably a rather confusing post about this the other day, so I am going to have another go and see if I can make more sense. This sis purely a I've got a base class...
4
by: Pupeno | last post by:
Hello, I want to jump over a method in the class hierarchy, that is: If I have class A(object), clas B(A), class C(B) and in C, I want a method to do exactly what A does but not what B does in...
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.