[gme-users] Converting to managed code with BON2

Cong Zhang czhanga at gmail.com
Wed Nov 9 16:58:18 CST 2005


Thank you so much for your reply.  I would love to try it out.

Cong Zhang

On 11/9/05, Zoltan Molnar <zolmol at isis.vanderbilt.edu> wrote:
> The latest GME version contains a BON2 which has not been ported to be
> compileable as Managed Code. We plan the next release to contain that
> feature.
> However, if you are willing to try it out I could send you the changed
> BON2 files.
>
> Br, Zoli
>
> > -----Original Message-----
> > From: gme-users-bounces at list.isis.vanderbilt.edu
> > [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf
> > Of Cong Zhang
> > Sent: Monday, November 07, 2005 1:08 PM
> > To: gme-users
> > Subject: [gme-users] Converting to managed code with BON2
> >
> >
> > Hi, Zoltan,
> >   The following is your post on issue of converting unmanaged
> > code skeleton to managed. I am wondering if this issue has
> > been  addressed by GME 5 released in September.
> >   I am using BON2 to access models and because of user
> > requirements, we need to use windows forms. With BON, there
> > was no problem after I used the same approach as you
> > mentioned in your post. However, with BON2, I got the
> > following compiling errors:
> >
> > c:\program files\gme\sdk\bon\exceptions.cpp(161) : error
> > C2349: 'BON::Exception::Exception' cannot be compiled using
> > /clr: 'functions containing both copy constructed arguments
> > and inline asm are not supported'; compile without /clr
> >
> > thanks
> > Cong Zhang
> >
> > PhD Candidate
> > EE-Systems, University of Southern California
> >
> >
> >
> >
> >
> > Hi,
> >
> > Currently components generated by CreateNewComponent.exe
> > (interpreters, plug-ins, add-ons) are plain unmanaged C++
> > code skeletons. That's why you can't insert managed code, or
> > new items from the Form designer  into such a dll, unless you
> > convert the whole project to compile with the /clr flag, thus
> > becoming managed. This conversion process consists of the
> > following settings in the project properties dialog box: 1.in
> > the General section: set 'Use Managed Extensions' to Yes (in
> > VStudio 2003) 2.in the C/C++ section/ Code Generation
> > Subsection: Basic Runtime Checks must be changed from 'BOTH
> > (/RTC1)' to 'Default'
> >
> > For BON2 components this is not enogh, needs some additional
> > work, in spite of MicroSoft stating it is 'It Just Works'
> > technology. For BON (version 1) components and for RAW Com
> > components this migration is feasible, so you can use the
> > Windows Forms controls after that. (Important to note: to
> > implement a Raw Com interpreter the user needs some COM
> > technology knowledge.)
> >
> > If you do NOT want to stick with managed code, you can
> > benefit by accessing your models with BON2 (instead of
> > old-fashioned, slow BON or difficult COM), but you'd have to
> > use classes in MFC like CDialog for implementing Dialog boxes
> > (instead of Forms).
> >
> > Br, Zoltan Molnar _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>


More information about the gme-users mailing list