Setting ProgID in IDE

I am creating a COM server using C++ Builder XE. Its ProgID is always 'PROGRAMNAME.CLASSNAME'.

How do I change the ProgID? I want to use 'COMPANYNAME.PROGRAMNAME.FUNCTIONALITY'.

A Delphi answer would probably suffice.


Override the GetProgID method of the factory. Something along the lines of the following should do:

template <typename T>
class TMyCppComObjectFactory : public TCppComObjectFactory<T>
  System::UnicodeString __fastcall GetProgID()
    return "Company.ProgName.Functionality";
  __fastcall TMyCppComObjectFactory(Comobj::TComServerObject* ComServer,
          Comobj::TComClass ComClass,
          const GUID &ClassID,
          const System::String ClassName,
          const System::String Description,
          Comobj::TClassInstancing Instancing,
          Comobj::TThreadingModel ThreadingModel) :
       TCppComObjectFactory<T>(ComServer, ComClass, ClassID,
                               ClassName, Description,
                               Instancing, ThreadingModel)

Then have the createFactory() of the COM Server use the derived factory.



Need Your Help

How can I generate UML diagrams from Xcode4

objective-c ios4 xcode4 uml xcode3to4

I watched a video with xcode 3, that shows a button "Design" that displays a UML diagram, but I can't find how to do it with xcode 4.

How to remove cookies in servlets on window close or while application re-run is happening

java gwt java-ee servlets cookies

As the title said, I want to remove the cookies when I close a window. I know of the methods for cookies like Cookies.removeCookie(Constants.XXX); And also of cookie.setMaxAge(0);

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.