473,324 Members | 2,124 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,324 software developers and data experts.

ObjectHandle

Hello,
I posted this question 2 weeks ago but I didn't get any solution, so I'm
trying to make it easier.

I'm using interface to manage plugins and I would like to instantiate 2
objects from the same assembly.
Using the following code, I don't get 2 objects but 2 references to the
same object.

Dim pObhHandle1 As ObjectHandle =
Activator.CreateInstanceFrom(AssemblyPath, ClassNameSpace)
Dim pIpnPlugin1 As My_Plugin = CType(pObhHandle1.Unwrap, Plugin_Interface)
Dim pObhHandle2 As ObjectHandle =
Activator.CreateInstanceFrom(AssemblyPath, ClassNameSpace)
Dim pIpnPlugin2 As My_Plugin = CType(pObhHandle2.Unwrap, Plugin_Interface)

Please help me....
Vittorio Pavesi
------------------------
http://www.vittorio.tk
Nov 21 '05 #1
0 949

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

Similar topics

2
by: Angelos Karantzalis | last post by:
Hi guys, I'm trying to load a class instance dynamically, and then cast it to it's base type so I can use it in my app. More specifically, I'm dynamically instantiating a...
0
by: Angelos Karantzalis | last post by:
Hi y'all, here's a tricky one: I've written a wrapper around a Com Interop-generated assembly in C#. It's called SDEHandler & implements a previously defined interface, so that I can use it as a...
1
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am...
2
by: memememe | last post by:
is there a place where I can get the 1.0 api at? also a place where I can get the differences with 1.1? I am trying to use the Activator class and the intellisense on VC# (1.0 api)says that it...
5
by: Eva | last post by:
Hi, My problem is about I have a class name in a string variable and I need create objects for that class. ¿How am I able to use the string variable for it? I cannot to use Type.GetType...
2
by: Frank Pleyer via .NET 247 | last post by:
Hi, I got the following problem : I have an defined an Array of different Actions: public PRootActions AllActions = new PRootActions ; I got a dynamic method where all Actions or other...
2
by: erin.sebastian | last post by:
Hi All, I am new to reflection and have successfully used it in a project, the following code works wonderfully ObjectHandle objectHandle = Activator.CreateInstance(this.AssemblyName,...
2
by: Michael H | last post by:
Hi all, I'm trying to use some functionality from the Windows Desktop Search Managed DLL "WDSQuery.dll" within a library I'm writing. I can't be guaranteed this DLL will be present on the...
10
by: robbietapping | last post by:
Hi Guys, I am writing a Media Centre Addin in Vb.net and it was all going good until i got to the point where i want to find the "Currently Playing song FilePath or URl" I have spend a number...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.