Re: [ROOT] ROOT in COM DLL on win32

From: Anton (anton.fokin@smartquant.com)
Date: Fri Apr 13 2001 - 17:33:38 MEST


Hi guys,

thanks for the suggestion. Valery, since you have a lot of experience with
win, could you comment where and how ROOT initialization should be added in a
stand-alone dll which uses (internally) ROOT libs and calls?

Regards,
Anton

Rene Brun wrote:

> Hi Valery,
> I would like to correct your statement.
> We have implemented class member functions such as TLine::SetLineColor
> or TBox::SetFillColor.
> However, Microsoft have a huge number of CPP statements like
>   #define xxxxxx SetLineColor
>
> We spent a lot of time understanding why we had unsatisfied references
>    TLine:xxxxxx
>
> This is the way Microsoft is making money !
>
> The solution as Valery explained is to undefine what is defined
> in several Microsoft includes (see Windows4Root.h)
>
> Rene Brun
>
> On Fri, 13 Apr 2001,  Valery Fine wrote:
>
> >
> >
> > > Hi rooters,
> > >
> > > I am trying to develop a COM dll for MSVC/VB bridge in rquant project.
> > > The dll should be able to initialize ROOT whenever it is loaded. The
> > > very first and straightforward try has failed:
> > >
> > > after I include TROOT call to DllMain entry point function root starts
> > > to conflict with MS string definition saying
> > >
> > > StrDupA redefinition. c:\root\include\tsrtring.h
> > >
> >
> >
> > >
> > > Could you comment on this? Does someone has experience with ROOT in a
> > > stand alone dll  (com dll)? Any further problems and pitfalls?
> >
> >   I believe you faced the "well-known" clash between ROOT and Microsoft.
> >   It is interesting   occasionally  ROOT team used to choose  the name
> >   those exactly  match those Microsoft  did for the same purposes.
> >
> >   However the Microsoft names are the names of the CPP macros
> >  (They did this to preserve the backward/forward comatibilitis across
> >  different platforms).
> >
> >  Look up " Windows4Root.h" to see what I am speaking about and to see
> >  how the problem can be cured
> >
> >
> > >
> > > Regards,
> > > Anton
> > >
> > > www.smartquant.com
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET