Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: How to delete a component when I no longer need it


Message #1 by Rowenap@w... on Tue, 29 Aug 2000 12:41:0
-----Original Message-----

From: Jennifer Madden [mailto:madden.jennifer@w...]

Sent: 26 August 2000 16:43

To: support@w...

Subject: VB COM ISBN- 2130 & Beginning Components for ASP ISBN-2882





I have two Wrox books, Beginine Components for ASP and VB COM.  I'm trying

to learn COM as I have programmed in ASP for about 1 1/2 years and realize 

I

need to start putting some of my code in components.



What neither of these books seem to address is when you write a component

from an example in the book and you make a mistake in your code.  How does

the component get updated and not duplicated if you've already registered

the component.



Also, how can I create the components for training along with the book but

then delete the components when I no longer need them on my computer?



What bugs me as a newbie to components is that you register something on

your computer and no ones seems to talk on the subject of removing, 

editing,

updating, keeping from duplicating components on a computer.  This may 

just

be a hangup that I have just starting to experiment with COM over ASP code

which is easy to manage.



Can someone give me instructions on how to correct my code in Visual Basic

and update the currently register component to take those changes?  And 

how

to delete a sample component I create from the book after I'm done with 

the

book?

Message #2 by Imar Spaanjaars <Imar@S...> on Tue, 29 Aug 2000 13:39:27 +0200
Simply type regsvr32 nameOfYourDll.dll /u in a command  prompt in the 

directory where your URL resides, and the components gets uninstalled. Then 

delete your DLL and you are done.



The book Beginning Components definitely deals with this subject. It also 

deals with updating and "not duplicating" the components.





Imar







At 12:41 PM 8/29/2000 +0000, you wrote:

>-----Original Message-----

>From: Jennifer Madden [mailto:madden.jennifer@w...]

>Sent: 26 August 2000 16:43

>To: support@w...

>Subject: VB COM ISBN- 2130 & Beginning Components for ASP ISBN-2882

>

>

>I have two Wrox books, Beginine Components for ASP and VB COM.  I'm trying

>to learn COM as I have programmed in ASP for about 1 1/2 years and realize

>I

>need to start putting some of my code in components.

>

>What neither of these books seem to address is when you write a component

>from an example in the book and you make a mistake in your code.  How does

>the component get updated and not duplicated if you've already registered

>the component.

>

>Also, how can I create the components for training along with the book but

>then delete the components when I no longer need them on my computer?

>

>What bugs me as a newbie to components is that you register something on

>your computer and no ones seems to talk on the subject of removing,

>editing,

>updating, keeping from duplicating components on a computer.  This may

>just

>be a hangup that I have just starting to experiment with COM over ASP code

>which is easy to manage.

>

>Can someone give me instructions on how to correct my code in Visual Basic

>and update the currently register component to take those changes?  And

>how

>to delete a sample component I create from the book after I'm done with

>the

>book?

>








Message #3 by "Daniel Walker" <danielw@w...> on Tue, 29 Aug 2000 13:16:55
>What neither of these books seem to address is when you write a component

>from an example in the book and you make a mistake in your code.  How 

does

>the component get updated and not duplicated if you've already registered

>the component.



It's all to do with Version Compatability and the GUID - take a look at 

page 81 of that first book, Beginning Components for ASP...



The GUID is a unique, randomly-generated number which is slotted into the 

header of the component. This GUID is also recorded in the registry, 

alongside the name of the component. The first thing a program does on 

running a component is check that the GUID in the header of the component 

matches the GUID it's expecting. If no match is found, the program will 

fall over.



Whether or not the GUID is changed is determined by the 

version-compatability. I won't reiterate what it says in the book about 

that.



>Also, how can I create the components for training along with the book 

but

>then delete the components when I no longer need them on my computer?



To unregister a link library (.dll) you just run the regsvr32 program, 

spoecifying the path to the file and applying the /u switch to the end of 

it, as in:



REGSVR32 C:/vbfiles/practice/mylibrary.dll /u



To unregister an executable, you actually run it with the unregister (/u) 

argument applied to it:



C:/vbfiles/practice/myexectuable.dll /u



HTH

Daniel Walker

Wrox Press

Message #4 by "Chris Needham" <christopher_needham@h...> on Tue, 29 Aug 2000 14:24:03 GMT
Jennifer,



Don't know how come this query got posted to me, but I do happen to know the 

answer, (and it's quite easy!)



Open your dll project in VB and click the run button.  This will register 

the component in the registry in some kind of debug mode, (i.e. if it errors 

and you have "break on all errors" then the VB debugger will be launched and 

you will be able to step through your com object just like a normal vb app)



What this means is when another app tries to launch the component it will be 

launched in the interactive VB session which you have opened.



If you are working with MTS, you will also need to set the binary 

compatability.



If this doesn't make sense, get back to me.



Chris Needham













>From: Rowenap@w...

>Reply-To: "ASP components" <asp_components@p...>

>To: "ASP components" <asp_components@p...>

>Subject: [asp_components] How to delete a component when I no longer need 

>it

>Date: Tue, 29 Aug 2000 12:41:0

>

>-----Original Message-----

>From: Jennifer Madden [mailto:madden.jennifer@w...]

>Sent: 26 August 2000 16:43

>To: support@w...

>Subject: VB COM ISBN- 2130 & Beginning Components for ASP ISBN-2882

>

>

>I have two Wrox books, Beginine Components for ASP and VB COM.  I'm trying

>to learn COM as I have programmed in ASP for about 1 1/2 years and realize

>I

>need to start putting some of my code in components.

>

>What neither of these books seem to address is when you write a component

>from an example in the book and you make a mistake in your code.  How does

>the component get updated and not duplicated if you've already registered

>the component.

>

>Also, how can I create the components for training along with the book but

>then delete the components when I no longer need them on my computer?

>

>What bugs me as a newbie to components is that you register something on

>your computer and no ones seems to talk on the subject of removing,

>editing,

>updating, keeping from duplicating components on a computer.  This may

>just

>be a hangup that I have just starting to experiment with COM over ASP code

>which is easy to manage.

>

>Can someone give me instructions on how to correct my code in Visual Basic

>and update the currently register component to take those changes?  And

>how

>to delete a sample component I create from the book after I'm done with

>the

>book?

>



>chrisneedham@c...


>$subst('Email.Unsub')


  Return to Index