473,569 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Moving object creation from COM to .NET

Hello,
I'm trying to create an object at runtime. The way I used to do this in the
COM (vb6) world was to use the ProgID such as:
PublicWorksPlug in.PWPlug

I kind of know how to do this in .NET but the missing piece is the location
of the assembly. So, in the COM world the following would work because the
registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWo rksPlugin.PWPlu g")

I didn't really want to install the PublicWorksPlug in assembly into the GAC
as that would force all the assemblies in my project to be strong named (I
believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve
Nov 21 '05 #1
2 1047
In article <uK************ **@TK2MSFTNGP15 .phx.gbl>, Steve Long wrote:
Hello,
I'm trying to create an object at runtime. The way I used to do this in the
COM (vb6) world was to use the ProgID such as:
PublicWorksPlug in.PWPlug

I kind of know how to do this in .NET but the missing piece is the location
of the assembly. So, in the COM world the following would work because the
registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWo rksPlugin.PWPlu g")

I didn't really want to install the PublicWorksPlug in assembly into the GAC
as that would force all the assemblies in my project to be strong named (I
believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve


Look at the documentation for System.Activato r.CreateInstanc eFrom...

--
Tom Shelton [MVP]
Nov 21 '05 #2
As far as i know the assembly should be in the bin directory ( or other
location specified in the app.config file )
or installed in the GAC

"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> wrote in message
news:eo******** ******@tk2msftn gp13.phx.gbl...
In article <uK************ **@TK2MSFTNGP15 .phx.gbl>, Steve Long wrote:
Hello,
I'm trying to create an object at runtime. The way I used to do this in the COM (vb6) world was to use the ProgID such as:
PublicWorksPlug in.PWPlug

I kind of know how to do this in .NET but the missing piece is the location of the assembly. So, in the COM world the following would work because the registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWo rksPlugin.PWPlu g")

I didn't really want to install the PublicWorksPlug in assembly into the GAC as that would force all the assemblies in my project to be strong named (I believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve


Look at the documentation for System.Activato r.CreateInstanc eFrom...

--
Tom Shelton [MVP]

Nov 21 '05 #3

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

Similar topics

1
4155
by: Ben M. | last post by:
Greetings all, This should be an easy task, and Im sure it is, but as many times as I have tried, I cant seem to get this to work properly. We changed ISPs recently from a shared host to a co-located server, and our former host was nice enough to send us a backup of our old SQL2000 database (about 5MB). I went into Enterprise Manager,...
54
4527
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200; alert("after setting salaryMinLabel = " + salaryMinLabel.value); } I also have an asp.net object:
8
3440
by: Anthony Munter | last post by:
I have a web application with impersonate=”true” in Web.config and on my own logon page I allow the user to either - specify a userid/password for the app to impersonate when calling legacy COM objects - or, just use the interactive user If they choose to use the interactive option, the impersonate="true" means that the process runs...
3
3082
by: Nick Dreyer | last post by:
I was quite surprised to notice that Sub New() gets called twice, once at declaration time and once at creation time. I can't figure out why it would be called at declaration if there is no class instance to work with. What is going on here: Sub Main Dim NewObject as MyClass MsgBox("Before Creation")
11
3810
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you experts. I would like to produce Javascript classes that can be "subclassed" with certain behaviors defined at subclass time. There are plenty of...
12
5525
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. Foo = function(type) { this.num = 0; this.type = type this.trigger(); } Foo.prototype.trigger = function() {
44
3335
by: petermichaux | last post by:
Hi, I have been using the following line of code to create an object called "Serious" if it doesn't already exist. if (Serious == null) {var Serious = {};} This works in the scripts I use it but but www.jslint.com is not happy with me.
4
2110
by: alex | last post by:
I am so confused with these three concept,who can explained it?thanks so much? e.g. var f= new Function("x", "y", "return x * y"); function f(x,y){ return x*y } var f=function(x,y){
9
2978
by: Peter Webb | last post by:
I want to animate one object moving in front of another. I cannot re-render the background as the object moves, as it would be extremely time consuming. This is what I would like to do. I draw the background to a Graphics object, copy it, draw the front object on the original, render it to the screen, then reload the copy (Clone?) of the...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.