473,387 Members | 1,742 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,387 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
Nov 20 '05 #1
3 1592
"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
"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
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 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.