locked
How to Communicate with Card Reader RRS feed

  • Question

  • Hello and peace for alls,
    First of all, I am a newcomer to this forum and at same time just got into VC++ application programming. I am assigned to develop a software that will read and write into smart card by using a reader. Along with the reader, the supplier attached some documentation of the API functions, a header (card_reader.h), a precompiled library (card_reader.lib) and a dll (card_reader.dll). I developed the problem by using the MFC and what I did:

    1) Include the card_reader.h in the application
    2) click Project>Add to Project>Files and then add the three files
    3) click Tools>Option>Directory and add the directory of library and header files
    4) copy the dll into the same folder as the project
    5) compile

    However, there is some error during compilation. The error is:

    <application directory and code line number>: error C2065: 'XXX_InitCOMM' : undeclared identifier

    Now, the application currently only has a function to initialize the reader. The thing that I dont understand is, in the header there is the declaration of the XXX_InitCOMM. How come it cannot recognize the function call?

    In the header file, the function is declared like this:

    NoMangle ULONG DLL_IMPORT_EXPORT    XXX_InitComm(ULONG PortNumber, ULONG *hHandle);

    Is there anything that I miss during the include/linking process? Any suggestion or solution would be greatly appreciated.
    Thanks.

    Wednesday, June 11, 2008 1:21 AM

Answers

  • Songbreaker said:


    <application directory and code line number>: error C2065: 'XXX_InitCOMM' : undeclared identifier


    NoMangle ULONG DLL_IMPORT_EXPORT    XXX_InitComm(ULONG PortNumber, ULONG *hHandle);




    C/C++ are case sensitive.  Change "XXX_InitCOMM" to "XXX_InitComm"
    http://orcmid.com/BlunderDome/clueless/
    • Marked as answer by Yan-Fei Wei Monday, June 16, 2008 6:02 AM
    Wednesday, June 11, 2008 10:28 PM