|
-
December 28th, 2002, 10:40 AM
#1
Plug Ins
Hi All,
I am new to VB.net. It seems like a language with allot of power.
I am trying to write an application that will use a plug in. I thought by creating a 'StandAlone' DLL with all of the code I wish to change at runtime and just change it at will.
Well it turns out that if I make an application with a DLL and compile it all is well. Now if I change the code in the DLL and try to run the already compiled program ( which had the first DLL
compilied along with it ) I get an ERROR!.
So I have learned that even though I may complile code into a DLL alone it will NOT work with the the SAME NAME DLL with
new code added.
You see I would like to change a FORM at runtime. The DLL code
will have STANDARD functions to be called by the MAIN FORM
but I would like to CHANGE the CODE or ADD to it after the
original program has been installed and run on a machine.
I have though of a SCRIPT method but don't want to write and
interperter to run the script.
I hope you understand the question. Is it possible to write a VBASIC application and install it on a PC then just swap in and out a SAME named DLL with different code to alter how the program works.
It seems that VBASIC marks the DLL and knows when it is different when the MAIN program was compilied even when
the CODE in the DLL is the same.
How do you make a program run OTHER code after it is compilied.
Like you can ADD PLUG-INS rto COREL etc..
Thanks in advance for your help
Nick
-
December 28th, 2002, 10:49 AM
#2
.NET adds naming information to each assembly. This is to prevent accidental use of the wrong DLL that happens to have the same name.
The solution is to make sure you set a "Strong Name" for the DLL.
Hope this helps..
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 28th, 2002, 06:47 PM
#3
Strong Name ?
Hi CpuWizard,
Would you happen to have a CODE snippet for this ?
Or do you know of some EXAMPLE source code on the web of this method being used ? I would be very grateful for your help.
How do you assign the STRONG NAME in code ?
Is it in the <Assembly file in the DLL being compilied or the main program that will use it or both ? I figured it could be done I just need a simple example to get me started.
Thank You,
Nick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|