Well, im sure i can learn COM, ive used it before for DirectX and I understand how the whole iUknown thing works; but I want as little platform dependence as possible in my implementation.
I will be writing a ClassFactory class that will register classes globally so i can probably just have CreateInstance and Release functions built into the factory spec. This will ensure classes are instanced and released in the proper threads ----- Original Message ----- From: "Pat Magnan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 5:12 PM Subject: Re: [hlcoders] OT: Dlls and C++ > At 03:41 PM 1/22/2003 -0600, you wrote: > > The only problem you would run into > >is if you changed the 'class Foo', rebuild the DLL, but forgot to rebuild > >the application that loads the DLL. In this case you might want to make a > >Delete() function so that you are freeing up the same size object that was > >allocated (of course, if the sizes were different, you'd have other crashing > >problems as well). > > This latter problem is potentially addressed by instead using COM, in that > once you have a stable library, you don't have to rebuild the applications > that use the class, because rather than using the .lib and headers, you use > the binary object, and things like instantiating/freeing/functions are all > done via vtable lookup and the COM mechanisms (CoCreateInstance/Release > rather than new and delete). Mind you, COM specifications say you shouldn't > change the interface, just the implementation, or create new interfaces if > you need to revise the interface somehow. Don Box thinks COM is more OO > than C++, because of the binary compatibility (where C++ abstracts > interface from implementation on a source code level if I read him right). > > But learning COM isn't necessarily for the faint of heart, and is of course > pretty platform specific, if it's just a small library for your own use, > then just remember to rebuild everything if you change the size of the > object in the library. > > Probably simpler to add your own internal Delete function now that I think > about it :). > > > >Jeffrey "botman" Broome > > > >_______________________________________________ > >To unsubscribe, edit your list preferences, or view the list archives, > >please visit: > >http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders