Christian Costa <
titan.costa@gmail.com> wrote:
> ���BOOL WINAPI ClientToScreen( HWND hwnd, LPPOINT lppnt )
> ���{
> + ��� ���DWORD error = GetLastError();
> +
> + ��� ���if (!hwnd)
> + ��� ���{
> + ��� ��� ��� ���SetLastError( ERROR_INVALID_WINDOW_HANDLE );
> + ��� ��� ��� ���return FALSE;
> + ��� ���}
> +
> + ��� ���SetLastError( 0xdeadbeef );
> ��� ��� ���MapWindowPoints( hwnd, 0, lppnt, 1 );
> +
> + ��� ���if (GetLastError() != 0xdeadbeef)
> + ��� ��� ��� ���return FALSE;
> +
> + ��� ���SetLastError(error);
> ��� ��� ���return TRUE;
> ���}
As been said before these games with saving/restoring last error value