Solved

ASP component registration

Posted on 2000-05-17
2
223 Views
Last Modified: 2013-11-25
When I build an asp com object (in atl com wiz), i would like it not to be registered automaticaly... how can i do that?
0
Comment
Question by:amirl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:pepenieto
ID: 2825157
Try to change the settings (debug, release, or what you use):
Project->Settings->Custom build (tab):
Erase de "regsvr32..." command
0
 
LVL 1

Accepted Solution

by:
manoj_srivastava earned 50 total points
ID: 2826733
Hi amir
By default you will always find the FOLOWING TYPE OF DECLARATION IN THE HEADER FILE.
i AM PRODUCING THE CODE WHICH I HAVE WROTE FOR MY COM PROJECT.
AFTER THE CONSTRUCTOR DEFINITION YOU WILL FIND FOLLOWING MACRO

DECLARE_REGISTRY_RESOURCEID( IDR_BSLOCATION)

Use DECLARE_NO_REGISTRY()IN PLACE OF THIS  if you want to avoid any default ATL registration for the class in which this macro appears.



class ATL_NO_VTABLE CBSLocation :
      public CComObjectRootEx<CComSingleThreadModel>,
      public CComCoClass<CBSLocation, &CLSID_BSLocation>,
      public IObjectControl,
      public IDispatchImpl<IBSLocation, &IID_IBSLocation, &LIBID_VCADMINBSLib>,
      public IDispatchImpl<IBSLocationProfile, &IID_IBSLocationProfile, &LIBID_VCADMINBSLib>
{
public:
      CBSLocation()
      {
      }

DECLARE_REGISTRY_RESOURCEID(IDR_BSLOCATION)

DECLARE_PROTECT_FINAL_CONSTRUCT()

DECLARE_NOT_AGGREGATABLE(CBSLocation)

BEGIN_COM_MAP(CBSLocation)
      COM_INTERFACE_ENTRY(IBSLocation)
      COM_INTERFACE_ENTRY(IObjectControl)
      COM_INTERFACE_ENTRY2(IDispatch,IBSLocation)
      COM_INTERFACE_ENTRY(IBSLocationProfile)
      COM_INTERFACE_ENTRY2(IDispatch,IBSLocationProfile)
END_COM_MAP()

// IObjectControl
public:
      STDMETHOD(Activate)();
      STDMETHOD_(BOOL, CanBePooled)();
      STDMETHOD_(void, Deactivate)();

      CComPtr<IObjectContext> m_spObjectContext;

// ILocation
public:
       STDMETHOD (p_AddLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/BSTR bstrLocName,/*[in]*/BSTR bstrLocDescription,/*[in]*/BSTR bstrCurrentLocation,/*[in]*/BSTR bstrLocId);
       STDMETHOD (p_ModifyLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/BSTR bstrLocId,/*[in]*/BSTR bstrLocName,/*[in]*/BSTR bstrLocDescription,/*[in]*/BSTR bstrCurrentLocation);
       STDMETHOD (p_DeleteLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/SAFEARRAY *psaLocIds,/*[out]*/VARIANT* pvntErrorInfo);
       STDMETHOD (p_AssociateUnitstoLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/BSTR bstrLocId,/*[in]*/SAFEARRAY *psaUnitAssign,/*[in]*/SAFEARRAY *psaUnitRevoke);
       STDMETHOD (p_GetCurrentLocation)(/*[in]*/IDSSession* pDSSession,/*[out]*/BSTR *bstrLocId,/*[out]*/BSTR *bstrLocName);
       STDMETHOD (p_LoginAddLocation)(/*[in]*/SAFEARRAY* psaDBInfo,/*[in]*/BSTR bstrLocId,/*[in]*/BSTR bstrLocName,/*[in]*/BSTR bstrLocDescription);

//ILocationProfile
       STDMETHOD (p_GetLocationDetails)(/*[in]*/IDSSession* pDSSession,/*[in]*/SAFEARRAY *psaLocIds,/*[out]*/VARIANT *vntLocData);
       STDMETHOD (p_GetUnitsofLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/BSTR bstrLocId,/*[out]*/VARIANT *vntUnitData);
       STDMETHOD (p_GetUsersofLocation)(/*[in]*/IDSSession* pDSSession,/*[in]*/BSTR bstrLocId,/*[out]*/VARIANT *vntUserData);
       STDMETHOD (p_GetLocations)(/*[in]*/IDSSession* pDSSession,/*[out]*/VARIANT *vntUserData);
       STDMETHOD (p_GetLocationsforLogin)(/*[in]*/SAFEARRAY* psaDBInfo,/*[out]*/VARIANT *vntLocData);
};

BYE
THIS WILL SOLVE YOUR PROBLEM. NOW ATL WILL NOT REGISTER YOUR CLASS.


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

705 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