/********************************************************************
	Created:	24:3:2003   17:45
	Filename: 	getusbinfos.cpp
	Author:		Yubo
	Copyright:	
				Copyright(C) 1998-2004, Feitian Technologies Co., Ltd.
				All rights reserved.
	Purpose:	
*********************************************************************/

//Here, usb token is Feitian ePass1000 or ePass2000.
/*
*if: "#define TEST1K":get infos about ePass1000;
*else:                get infos about ePass2000; 
*/

#include "stdafx.h"

//#define  TEST1k	//Set testing choise option

#ifdef TEST1k  
	#define OPTION 1
#else    
	#define OPTION 2
#endif

int main(int argc, char* argv[])
{
	CGetInfos inf(OPTION); 
	if(!inf.LoadLib())
		return 0;

	CK_SLOT_INFO slotInfo={0};
	unsigned long rv;

	CK_INFO cryptinfo={0};
	printf("Get Cryptoki information:\n");
	rv = inf.GetCryptokiInfos(&cryptinfo);
	inf.CheckRV(rv);
	inf.ShowCryptokiInfos(&cryptinfo);

	printf("Get Slot information:\n");
	rv = inf.GetSlotInfos(&slotInfo);
	inf.CheckRV(rv);
	inf.ShowSlotInfo(&slotInfo);
	
	printf("Get Token information:\n");
	CK_TOKEN_INFO tokeninfo={0};
	rv = inf.GetTokenInfos(&tokeninfo);
	inf.CheckRV(rv);
	inf.ShowTokenInfo(&tokeninfo);

	return 0;
}





















