public void ApplyPropertiesToItem(IShellItem psiItem) { if (disposed) { throw new ObjectDisposedException(nameof(FileOperation)); } HResult hr = fileOperation.ApplyPropertiesToItem(psiItem); // todo: to add error wrappers using the return error code if (!CoreErrorHelper.Succeeded(hr)) { Marshal.ThrowExceptionForHR((int)hr); } }