[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Newbie Question - VB6 GetObject in .net

Posted on 2004-03-31
6
Medium Priority
?
393 Views
Last Modified: 2008-02-26
Hi all

This will be a real easy one I imagine but thought I'd ask anyway - I'm writing a software package that has both web and windows form components that share a common data access layer. One ofthe requirements is to manage the number of concurrent licences used on both platforms. I want to create what in old VB6 in an ActiveX Exe that stays in memory and my apps simply add the users names in and out when they log in/out. I also want to be able to return these detals from the class for admin purposes.

In VB6 I would create a ActiveX and run it then use getObject to get a reference the app. What the equivilent or best pratice to do this in .net.

Many thanks in advance

Graham
0
Comment
Question by:GillyTheTaffy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 2

Expert Comment

by:DonRameshSachin
ID: 10729626
HI,
 In .NET there is no concept of ActiveX Exe or ActiveX DLL. Probably u can use Class library project (.DLL) to achieve ur requirement.

Don
0
 
LVL 1

Author Comment

by:GillyTheTaffy
ID: 10729632
Actually found what I was looking for - the Shared keyword for variables was exactly what I was looking for

cheers anyway
0
 
LVL 2

Expert Comment

by:DonRameshSachin
ID: 10729669
Hi,
 basically,
 Shared variables are created in the Global memory (heap) and it will be available through out the application  life time. Shared is equivalent to Static in C++.  These Shared variables or methods are not bound to the class. So they will be available anywhere inside the project. They will be created in the global memory only once when they are invoked.

Don
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Author Comment

by:GillyTheTaffy
ID: 10729734
Yep - thats pretty much what I was looking for. Basically I will have a class that stores user details so that we can cap the number of users and also retreive the details while the ASP.net application is active.  I didn't want to have to connect to a database each time someone logs in via the web to update the info.

thanks again for your comments

Graham
0
 
LVL 1

Author Comment

by:GillyTheTaffy
ID: 10736853
Dan,

There is an alternative way I suppose - I could just create an standard windows exe and not have it dispay anything - is there any benefit to doing it that rather than using a class with shared variables ? I think using the shared variables is a bit tidier but am not sure if they have any impact on performance/load etc.
0
 
LVL 2

Accepted Solution

by:
DonRameshSachin earned 150 total points
ID: 10738752
Hi
I feel the best way is to use class and shared variables/methods rather going for a standard exe.
Shared variables/ methods will be initialized only once and will available through out ur application.

Don
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question