?
Solved

ASP component registration

Posted on 2000-05-17
2
Medium Priority
?
237 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 150 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

Independent Software Vendors: 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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

764 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