Paul Vriens wrote: > Wouldn't it be easier to set env to NULL when declaring it and do a: > > if (env) RegCloseKey(env); > > Cheers, > > Paul. Indeed it would! I shall submit a vastly simplified retry, accordingly. :) -- Thanks, Andy.