TEST(SKF_ACCESS_CONTROL,SKF_GetPINInfo_Test) { ULONG *pulMaxRetryCount = new ULONG(); ULONG *pulRemainRetryCount = new ULONG(); BOOL *pbDefaultPin = new BOOL(); ULONG result; SKF_GetPINInfo skf_getPINInfo = SKF_GetPINInfo(GetProcAddress(hmodule,"SKF_GetPINInfo")); result = skf_getPINInfo(hApplication,USER_TYPE,pulMaxRetryCount,pulRemainRetryCount,pbDefaultPin); EXPECT_EQ(0,(int)result); }
BOOL CAuthTest::Test_GetPINInfo() { SHOW_PROCESS("GetPINInfo"); if (NULL == g_hApp) { printf("OPen application first!\n"); return FALSE; } int szBuf; ULONG nAccountType = 0; printf("Input 0: administrator, 1:User\n"); fflush(stdin); // szBuf = getchar(); szBuf = GetInputChar(); if (szBuf == '0') nAccountType = 0; else if (szBuf == '1') nAccountType = 1; else return FALSE; ULONG ulMaxRetryCount = 0; ULONG ulRemainRetryCount = 0; BOOL DefaultPin = FALSE; ULONG ulReval = SKF_GetPINInfo(g_hApp, nAccountType, &ulMaxRetryCount, &ulRemainRetryCount, &DefaultPin); SHOW_ERROR(ulReval); if (SAR_OK == ulReval) { printf("Max retry count is : %d\n", ulMaxRetryCount); printf("Remain retry count is: %d\n", ulRemainRetryCount); printf("is Default PIN: %d\n", DefaultPin); } return (SAR_OK == ulReval); }