COM Objects for ASP

Posted on 2006-06-01
Last Modified: 2013-11-25
I am currently developing a COM object to be used in an ASP website using a Visual C++ 2005 ATL project. My problem is that every time I build the DLL, visual studio registers the DLL on my local system. This works fine the first time, but the second time I rebuild the DLL it gives me an error because it cannot overwrite the DLL since it is registered on the system. Is there anyway to tell Visual Studio to unregistered/uninstall the DLL, build the new DLL, and register it?

Without a method like this, developing/testing my COM objects will take so much since I have to constantly manually get rid of the old DLL before I can build a new one.
Question by:inviser
    LVL 4

    Accepted Solution

    In your project properties, in Build Events / Pre-Build Events add the command line:
    regsvr32 /u dllname.dll
    LVL 8

    Expert Comment

    "cannot overwrite the DLL since it is registered on the system"

    I think that it is not a problem (registering). Problem can be if something loaded such dll like for example dialog box or form or something else.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Article by: SunnyDark
    This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now