Thread: Zebra P310 Encoder

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    2

    Zebra P310 Encoder

    I just buy a P310C Model. This model has encoder inside. I have been
    order to build a encoder application to encode 500 units smart card. I
    need help on build the application because I am beginner in C++/MFC. I have been supply with cst25110.h and cst25110.dll

    The application story:
    The Application will read a text file to encode all cards. The txt file
    name CADID_listing.txt contains:
    CAD_PIN=22222
    CARD_TYPE=01000000
    CAD_ID
    1234567800
    4587452600
    5412288400
    ...

    Explaination: CARD_ID will be write to the card, and each card has
    CAD_PIN and CARD TYPE written inside. Let say the first card is encode,
    so the card will be CARD_PIN=22222, CARD_TYPE=01000000 and
    CARD_ID=1234567800 and the second card will be CARD_PIN=22222,
    CARD_TYPE=01000000 and CARD_ID=4587452600....and so on until the card is
    finished encode.

    I have do some research and i only can completed until here,

    // P310C Encoder

    #include "cst25110.h"
    #include <iostream.h>
    #include <fstream.h>
    #include <stdlib.h>

    SCR_SCR_PARAMS myParams; // each instance represents one encoder
    void main(void)
    {
    .
    .
    myParams.scrAttr.Port = 1; // e.g., target encoder attached to com 1
    ctOpen(&myParams.scrAttr);
    .
    subfunction();
    .
    .
    ctClose(&myParams.scrAttr);
    }
    void subfunction()
    {
    .
    iccApduExchange(&myParams); // note we did not declare in this function
    }



    // P310C Smart Card Encoder

    ctOpen();
    ctEngageCard(); // engage contact station
    ctColdReset(); // for SLE 4428 cards.


    int main () {
    char buffer[256];
    ifstream examplefile ("CADID_listing.txt"); // The CAD_PIN, CARD_TYPE, CAD_ID will not be encoded to the card
    if (! examplefile.is_open()) // For example each card will be encoded by 55555 00000001 0410000001 ( CAD_PIN, CARD TYPE and CAD_ID )
    { cout << "Error opening file"; exit (1); }

    while (! examplefile.eof() )
    {
    examplefile.getline (buffer,100);
    cout << buffer << endl;
    }
    return 0;
    }


    ctDeactivate(); // power down smartcard
    ctDisengageCard(); // disengage contact station
    ctClose();

    I need urgent help
    Last edited by newgirl; 10-24-2004 at 11:15 PM.

  2. #2
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    are you single, new girl....??
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    2
    yeah and i need help

  4. #4
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    if you need any c++ help maybe would could get together and study sometime
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. win32 mp3 encoder?
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-10-2007, 05:05 AM
  2. ASCII Art Decoder and Encoder
    By jessweetd in forum C Programming
    Replies: 7
    Last Post: 09-05-2004, 07:12 PM
  3. Need RSA encoder / decoder / keygen
    By Rak'kar in forum Networking/Device Communication
    Replies: 4
    Last Post: 07-20-2004, 09:40 PM
  4. Help with simple Arry encoder
    By Marcos in forum C++ Programming
    Replies: 2
    Last Post: 03-05-2003, 06:01 PM
  5. Encoder Issue
    By CodeMonkey in forum C++ Programming
    Replies: 4
    Last Post: 10-19-2002, 11:34 AM