Re: hhctrl: Add the WebBrowser implementation

2005-07-27 Thread James Hawkins
On 7/27/05, James Hawkins <[EMAIL PROTECTED]> wrote: > Hey, > > This patch includes these changes: > * no more HH_* macros, no more hhctrl.h > * uses proper ref counting > * stores pointers instead of using ptr arithmetic > * IOleClientSiteImpl frees itself so there is no mem leak > * uses the ICO

Re: hhctrl: Add the WebBrowser implementation

2005-07-27 Thread Alexandre Julliard
"Dmitry Timoshkov" <[EMAIL PROTECTED]> writes: > Right, I think that const pointer is not what James had in mind, > but a const area pointed out by a pointer. No, the pointer is constant, not the object itself. That's the same ICOM_THIS_MULTI macro that's used at a gazillion other places. -- Al

Re: hhctrl: Add the WebBrowser implementation

2005-07-27 Thread Dmitry Timoshkov
"Alexandre Julliard" <[EMAIL PROTECTED]> wrote: > +#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) IMO using 'const' before the type looks more natural. Also adding 'const' to all type conversions wouldn't hurt: const impl* This = (con

Re: hhctrl: Add the WebBrowser implementation

2005-07-27 Thread Alexandre Julliard
"Dmitry Timoshkov" <[EMAIL PROTECTED]> writes: > "James Hawkins" <[EMAIL PROTECTED]> wrote: > > > +#define ICOM_THIS_MULTI(impl,field,iface) impl* const > > This=(impl*)((char*)(iface) - offsetof(impl,field)) > > IMO using 'const' before the type looks more natural. Also adding 'const' > to all

Re: hhctrl: Add the WebBrowser implementation

2005-07-27 Thread Dmitry Timoshkov
"James Hawkins" <[EMAIL PROTECTED]> wrote: > +#define ICOM_THIS_MULTI(impl,field,iface) impl* const > This=(impl*)((char*)(iface) - offsetof(impl,field)) IMO using 'const' before the type looks more natural. Also adding 'const' to all type conversions wouldn't hurt: const impl* This = (const im

Re: hhctrl: Add the WebBrowser implementation

2005-07-26 Thread Dmitry Timoshkov
"James Hawkins" <[EMAIL PROTECTED]> wrote: > +#define HH_Alloc(size) ((LPVOID)HeapAlloc(GetProcessHeap(), > HEAP_ZERO_MEMORY, size)) > + > +#define HH_Free(buffer) \ > +if (buffer) \ > +HeapFree(GetProcessHeap(), 0, (HLOCAL)buffer); Alot of work has been done to avoid tests for NULL

Re: hhctrl: Add the WebBrowser implementation [take 5]

2005-07-25 Thread Alexandre Julliard
James Hawkins <[EMAIL PROTECTED]> writes: > +typedef struct IOleInPlaceFrameImpl > +{ > +IOleInPlaceFrameframe; > +HWNDwindow; > +} IOleInPlaceFrameImpl; > + > +typedef struct IOleInPlaceSiteImpl > +{ > +IOleInPlaceSite inplace; > +IOleInPlaceFra