On 9/20/07, Dmitry Timoshkov <[EMAIL PROTECTED]> wrote:
> "James Hawkins" <[EMAIL PROTECTED]> wrote:
>
> > This version compares the pointer value to 64000 instead of using a
> > try/catch block, as suggested by Alexandre.
>
> > - if(pintern->Magic==MAGIC_GLOBAL_USED)
> > + if(pintern > (
"James Hawkins" <[EMAIL PROTECTED]> wrote:
> This version compares the pointer value to 64000 instead of using a
> try/catch block, as suggested by Alexandre.
> - if(pintern->Magic==MAGIC_GLOBAL_USED)
> + if(pintern > (PGLOBAL32_INTERN)64000 &&
> pintern->Magic==MAGIC_GLOBAL_USED)
>
James Hawkins wrote:
> + if (IsBadReadPtr(pintern, 1))
> + {
> + SetLastError(ERROR_INVALID_HANDLE);
> + return 0;
> + }
> +
>if(pintern->Magic==MAGIC_GLOBAL_USED)
>{
> if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */
It would