Error C2491 on C source with Visual studio 8

Posted by Tobia on Stack Overflow See other posts from Stack Overflow or by Tobia
Published on 2012-09-22T07:54:29Z Indexed on 2012/09/22 9:37 UTC
Read the original article Hit count: 277

Filed under:
|
|

i'm really noob in C. I just need to compile a ANSI C source to get a dll. During compilation i get this error:

 C2491: 'SelectML': definition of dllimport function not allowed

Where SelectML is a public function with this definition:

int CALLINGCONV SelectML(WORD fid, int nSlot)
{
  WORD SW;
  int x;
  BYTE pSend[2];
  pSend[0]=(BYTE)((fid&0xff00)>>8);
  pSend[1]=(BYTE)(fid&0x00ff);
  x=SendAPDUML(hCards[nSlot],APDU_SELECT,2,0,pSend,0,&SW);
  if (x!=C_OK) return x;
  if (SW!=0x9000) return SW;
  return C_OK;
}

I'm sure the C source is good, maybe it is just a Visual Studio configuration...

© Stack Overflow or respective owner

Related posts about c

    Related posts about visual-studio