?
Solved

Do you have to register a com dll when you call it from VB.net executable?

Posted on 2006-05-12
10
Medium Priority
?
193 Views
Last Modified: 2010-04-23
I have a dotnet application that I would like to deploy by just copying the root folder to a user's machine. some of the assemblys call functions in a com dll. From my testing it seems I have to register this dll on the users machine before I can call it, is that correct. It blows the whole concept of "folder" deployment out.

If I have to register it, is there a way to do this from dotnet when the program first runs like I can from a vb6 exe using API functions. Or, any other suggestions?

thanks,
Bruce Mutch
0
Comment
Question by:bmutch
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:sivic82
ID: 16670064
You might try to call regsvr32 and have it register the dll during the first launch of the program or in the setup program.

Now if the DLL was written in .NET I dont believe it would need to be registered but since your using a COM object it must be registered still.
0
 

Author Comment

by:bmutch
ID: 16671283
thanks, how do you call regsvr32, in VB6 there are API functions.

0
 
LVL 2

Expert Comment

by:sivic82
ID: 16671544
Shell("regsvr32 /u <path to the dll>")
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:bmutch
ID: 16671927
any way to check to see if it is already registered, and then register it if not? Or else, how can I tell if this is the first program run, I've done some hacks like write to the registry the first run, then checking the registry, but surely there is something a little more elegant...



0
 
LVL 2

Expert Comment

by:sivic82
ID: 16672291
I would do the registry thing or write a small file and check if it exists to know if you should register the dll.

I do not know of a way to check though, sorry.
0
 

Author Comment

by:bmutch
ID: 16686140
I found the answer. Change the InterOp's "Isolated" property to true and you don't have to register the dll.

0
 

Author Comment

by:bmutch
ID: 16942163
I would request a refund since I found the answer myself.

thanks,
Bruce Mutch
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16978034
PAQed with points refunded (75)

GranMod
Community Support Moderator
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline

578 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