629 |
) |
) |
630 |
{ |
{ |
631 |
DWORD dwReturn = 0; |
DWORD dwReturn = 0; |
632 |
|
POPENPGP_CONTEXT pContext = NULL; |
633 |
Trace(WINEVENT_LEVEL_VERBOSE, L"Enter wszProperty = %s", wszProperty); |
Trace(WINEVENT_LEVEL_VERBOSE, L"Enter wszProperty = %s", wszProperty); |
634 |
__try |
__try |
635 |
{ |
{ |
645 |
dwReturn = SCARD_E_INVALID_PARAMETER; |
dwReturn = SCARD_E_INVALID_PARAMETER; |
646 |
__leave; |
__leave; |
647 |
} |
} |
648 |
|
dwReturn = CheckContext(pCardData); |
649 |
|
if (dwReturn) |
650 |
|
{ |
651 |
|
__leave; |
652 |
|
} |
653 |
|
pContext = (POPENPGP_CONTEXT) pCardData->pvVendorSpecific; |
654 |
if (wcscmp(wszProperty,CP_CARD_FREE_SPACE) == 0 |
if (wcscmp(wszProperty,CP_CARD_FREE_SPACE) == 0 |
655 |
|| wcscmp(wszProperty,CP_CARD_CAPABILITIES) == 0 |
|| wcscmp(wszProperty,CP_CARD_CAPABILITIES) == 0 |
656 |
|| wcscmp(wszProperty,CP_CARD_KEYSIZES) == 0 |
|| wcscmp(wszProperty,CP_CARD_KEYSIZES) == 0 |
714 |
dwReturn = SCARD_E_INVALID_PARAMETER; |
dwReturn = SCARD_E_INVALID_PARAMETER; |
715 |
__leave; |
__leave; |
716 |
} |
} |
717 |
dwReturn = SCARD_W_SECURITY_VIOLATION; |
if ( cbDataLen != sizeof(BOOL) ) |
718 |
|
{ |
719 |
|
Trace(WINEVENT_LEVEL_ERROR, L"cbDataLen == %d", cbDataLen); |
720 |
|
dwReturn = SCARD_E_INVALID_PARAMETER ; |
721 |
|
__leave; |
722 |
|
} |
723 |
|
if (pContext->fDoesTheAdminHasBeenAuthenticatedAtLeastOnce) |
724 |
|
{ |
725 |
|
pContext->fIsReadOnly = *((PBOOL) pbData); |
726 |
|
dwReturn = 0; |
727 |
|
} |
728 |
|
else |
729 |
|
{ |
730 |
|
dwReturn = SCARD_W_SECURITY_VIOLATION; |
731 |
|
} |
732 |
} |
} |
733 |
else if (wcscmp(wszProperty,CP_PARENT_WINDOW) == 0) |
else if (wcscmp(wszProperty,CP_PARENT_WINDOW) == 0) |
734 |
{ |
{ |
750 |
dwReturn = SCARD_E_INVALID_PARAMETER ; |
dwReturn = SCARD_E_INVALID_PARAMETER ; |
751 |
__leave; |
__leave; |
752 |
} |
} |
753 |
if ( *pbData != 0) |
if ( *((HWND*)pbData) != 0) |
754 |
{ |
{ |
755 |
if (IsWindow( *((HWND*)pbData)) == 0) |
if (IsWindow( *((HWND*)pbData)) == 0) |
756 |
{ |
{ |