我在win32 Dynamic_Link Library方式下创建了个DLL,写个个外部调用函数IC_OpenSession ,该函数还须调用内部的一个函数IC_FileSel .
外部调用函数的代码如下:
short WINAPI IC_OpenSession (int Type, unsigned char *ATR)
{
int response;
int resplen;
char iccresp[200];
unsigned char buff[100];
if (G_ReaderHandle > 0 ) return S_OK;
response = IC_FileSel (SELECT_APP, 0, "sx1.sh", 15);
memcpy (G_KeyData, buff, 24);
return resplen;
}
内部函数IC_FileSel 如下:
int IC_FileSel (int Type, int Mode, char *FileID, int IDLen)
{
int oLen, iLen;
unsigned char R_APDU[100];
unsigned char C_APDU[100];
C_APDU[0] = 0x00;
C_APDU[1] = 0xA4;
C_APDU[2] = Type;
C_APDU[3] = Mode;
C_APDU[4] = IDLen;
memcpy (C_APDU+5, FileID, IDLen);
iLen = 5 + IDLen;
oLen = ICC_Reader_Application (G_ReaderHandle, ICC_CONN_APP1, iLen, (char *)
return S_OK;
}
但是编译的时候老是报:IC_FileSel : undeclared identifier(在IC_OpenSession 中)
redefinition; different type modifiers(在IC_FileSel 中)
我该如何定义IC_FileSel 的类型,才能通过编译?
在IC_OpenSession 的前面添加IC_FileSel的定义