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
"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
"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
"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
"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
"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
James Hawkins <[EMAIL PROTECTED]> writes:
> +typedef struct IOleInPlaceFrameImpl
> +{
> +IOleInPlaceFrameframe;
> +HWNDwindow;
> +} IOleInPlaceFrameImpl;
> +
> +typedef struct IOleInPlaceSiteImpl
> +{
> +IOleInPlaceSite inplace;
> +IOleInPlaceFra