Re: advpack: Use the FAILED and SUCCEEDED macros instead of comparing to S_OK or zero.

2006-05-01 Thread Mike McCormack
James Hawkins wrote: Would you accept the patch if I put all results into an hr and then called FAILED(hr) instead? Yeah, I think that's a better idea. Mike

Re: advpack: Use the FAILED and SUCCEEDED macros instead of comparing to S_OK or zero.

2006-05-01 Thread James Hawkins
On 5/1/06, Mike McCormack <[EMAIL PROTECTED]> wrote: James Hawkins wrote: > -if ((hr = callback(hinf, buffer, arg)) != S_OK) > +if (FAILED(hr = callback(hinf, buffer, arg))) It's usually a bad idea to do function calls or assignments inside macros... in this case it's s

Re: advpack: Use the FAILED and SUCCEEDED macros instead of comparing to S_OK or zero.

2006-05-01 Thread Mike McCormack
James Hawkins wrote: -if ((hr = callback(hinf, buffer, arg)) != S_OK) +if (FAILED(hr = callback(hinf, buffer, arg))) It's usually a bad idea to do function calls or assignments inside macros... in this case it's safe, but sometimes the macro is something like: #defi