The old code used SetLastError(ERROR_SUCCESS) before the api call and tested the result of GetLasterror() afterwards, but the api call returns HRESULT. Changed the splitting to get smaller patches -- By by ... Detlef