Re: [Dev-C++] Exporting a Class in C++....
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Raghunath Marella.S <ms...@ya...> - 2002-08-07 07:09:42
|
It looks like the declaration of a class function is required in .DEF file. But I am not getting what format will be the one to list a class member function in .DEF file. Will anyone suggest me the same. thanks & regards, Raghunath --- Per Westermark <pw...@ia...> wrote: > The normal way to create new classs in a DLL is to: > > - declare a (possibly abstract) base class in main > program. > - declare a new class inherriting from the base > class in the DLL. > - export a object-create function in the DLL. > > The main program then calls the create function in > the DLL, and receives a > pointer to the new subclassed object. > > Since virtual method calls are decided at run-time, > all virtual calls will > go to the new class implementation. Inline and > non-virtual methods will > use tme methods available at compile time, i.e. the > code in the main > program. > > /PWM > > > On Tue, 6 Aug 2002, Raghunath Marella.S wrote: > > > Hi there, > > > > I am trying to export a class in a DLL. I have > > declared that class as __declspec(dllexport). I am > > trying to link this DLL dynamicall from an > executable. > > With the help of a example in MSDN, i declared a > > similar class in executable, with same name and > also > > the same funcitons which are required to call from > > executable. This class in 'exe' was declared > > __declspec(dllimport). > > > > NOw a object for this class has been declared in > 'exe' > > and calling member functions thro object. > > > > The DLL was loaded by LoadLibrary(..) call. > > > > WIll any one let me know is the above procedure > > sufficient or something else also to be done. > > > > thanks & regards, > > Raghunath > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Health - Feel better, live better > > http://health.yahoo.com > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: > http://www.noicys.cjb.net/devcpp/ub.htm > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |