Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Write Data Into A Smart Card ??


Hi all,

I am printing a badge for our office employees by using
VB application.
In this i am providing the Bar code also.

Now we are planning a Smart card in to this badge.

As i have no idea what do for this i lend ur assistance.

I would like to know..

1. what are the things i need ..Like Hard ware,S/W etc..
2. Then How to achieve my goal using above.


Thanx in advance

Mast




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Read / Write Data Of A Smart Card In Visual Basic
I have connected the smart card device to my com1 port. how to read or write data into the smart card so that i would use the data of a smart card into my visual basic appllication. Awaiting for reply at the earliest

Read And Write Data To Sound Card?
Hello,

I need your help to find the best way to do a program whoes funtion is to take the sound received from the windows driver and then do a filtration routine on it to remove some frequencies and adjust some and then return the output to the windows back to be used by other applications.

Should i write a driver?

But why to write a driver, I need to write something in a higher level between a driver level and the application level.

I would be pleased to get your comments

thanks

Sample Data Layout To Write Content Into Memory Card
I have a smart card model sle4418/4428. I could read data using the scanner. What is the data layout to write data into the memory chip card.
A sample vb project for the data layout would help for my project more!!!!!!!
thanks for ur attention

Smart Card
Hallo Hi everybody,
Is it possible that VB can capture the data using 'smart card reader'.
If yes, what is the most important needs to be used for example mscomm or whatever.

Happy christmas!

Smart Card
Hi...

SCardTransmit() return error value 22. could anyone help me out

thanks in advance

Smart Card
I was just wondering if anyone has experience with Microsoft Windows Smart Card Toolkit?

The company I work for is looking to get into smart card readers for it's employees. I've been to the microsoft website and I read some information regarding the Smart Card Toolkit, however it's a little cryptic to me. Is it easy to use? I also can't find any pricing information (I don't have the go-ahead to spend too much money). I would obviously be integrating a visual basic application into the smart card reader output, but I have no experience doing this.

If someone does have experience with smart card readers and you know of an easier or cheaper (but still good) solution, I would really appreciate the advice.

Smart Card API (PC/SC)
I am looking for smart card programming samples using the PC/SC API. Any help would be very much appreciated. Thank you.

Smart Card
how can i write info into smart card and retrieve the info fr smart card by using VB?

ATR Reading From A Smart Card
I am trying to get a ATR reading from a smart Card

I am using the mscomm1 and also text box to show the response but what do i need to send as a command to get the ATR ?

Edit: Please use titles that at least let us guess what a thread is about.

Reading A Smart Card
Hi, I have a Gemplus Card Reader and also have a smart card along with it. I'm wondering if there is any tutorial that can show me how to read the info from the card and how to change the hex code on it. Also what do I need to download to be about to work with smart cards?

Smart Card Simulator
hi guys,

where do i find smart card simulator written in VB6.0...

i was googlin but couldn't find any for download..

thanx for any help..

Regards,


Noor

Read From A Smart Card
Does anyone has any information on accesing a smart card (eg :gsm sim card)from vb with a reader?Please help me cause i didnt found anything so far. Thanks
Adrian.

Smart Card Programming
Hi !
We are in web development. We want to start smart card development. From where can I get the help for this ( smart card programming) ?
Thanx.

Implementing Smart Card
Hi, I am developing a multi application on a memory card type SLE 4428 using Towitoko Chipdrive Micro for my project. I am using VB. Since SLE 4428 is not a processor card, is it possible to implement multi-application on SLE 4428. If can, how and what should I implement on the card? What should I store in the card? Is it just storing data(what I know is just storing characters on the card) in different memory addresses for different applications? Please help since I am new to smart card.

Thanks
Jay

Smart Card Reader In Vb
can you help for me.how to do smart card reader.can i get source code for that.i have smart reader,but i dont know how to do

Smart Card Dongle
hello, anybody have an idea about smart dongle? a lot of products use smart card dongle.. now, if we have this dongle can we read the s/n of every smart card?

br,

Smart Card Developers
Are there any Smart Card Developers in this place. I need some assistance with a MPCOS-3DES card.

Smart Card Programming
Hi to all,

I am new in the Smart Card programming field and I really need some assistance. I am using the GCR410 reader and I need to know if there is a API or toolkit somewhere that will make programming for the Smart Card easier in Visual Basic.

Thanks.

------------------
Hennie Pieterse
Senior Programmer
Datcor International
hennie@nix.co.za
Telephone: +27 15 7816335
ICQ Number : 61636095

Quote:




Today is yesterday's tomorrow

Add CA Chain To Smart Card
How can I store CA certificate chain programmatically on a smart card or a
smart USB token using just VB.net and the MS libraries for example capi and
capicom or Xenroll which in turn provide me the integration needed to a
particular tokens CSP or using PKCS11. What I want to do is to add custom CA chain from a
third party CA to the smart card so the user would not have to worry about that because I plan to register and deregister these certs from the machine automatically.


best regards,
Bahaa Al-aomod

Biometric & Smart Card Using VB6
Hi all,
I want to add the finger tip identification(Biometric) and smart card identification to my product using vb6.I have the SDK for both.But I'm not clear about this.How to do the Smart card and Biomatric using vb6? Please help me

Biometric & Smart Card Using VB6
Hi all,
I want to add the finger tip identification(Biometric) and smart card identification to my product using vb6.I have the SDK for both.But I'm not clear about this.How to do the Smart card and Biomatric using vb6? Please help me

Zebra And Smart Card
Have anyone any ideas how to move to specific folder in smart card and then read data from EF. Main command is "!U1 S-CARD CT_DATA (len) (ascii)"

I need to read cardnumber from specific EF file. Have anyone done something like this with Zebra 2SC mobile printer?

 

Smart Card Programming
Any body can help me to program smart card. I'm having a smart card encoder attached to printer. Any sample code in VC++ or vb is most apprecialted. Because i'm a very beginner in this area



thanks in adv

Smart Card Resource Manager
Hi all

SCardSvr.exe gives Failes to start ie service process could not connect to the service controller Error. Will anyone help me out.

Thanks in advance

Smart Card Login/Lockout
hey,
I am working on a security application, in which, the purpose is that upon starting up the computer, a Smart Card programmed with a login name and password must be inserted into a device connected to the serial port. the program reads the card, and if the information on the card matches the information provided by the user, the computer is allowed to complete login. I already have perfected the smartcard half of it, and the login process. My question is how do I set my program to run before the system completes boot, and if the user enters 3 wrong logins, the system reboots, and logs the failed entry. I would like it to either run in place of the windows login screen, or immediately after. I would like the program to be embedded as far in the system as possible. Any help is greatly appreciated!!!

Urgent - Smart Card Application
Hi Guys,

I have to develop a smart card application in visual basic. I don't have any idea how to proceed this. I have an corresponding DLL with me and all the related functions of smart card in DLL but i don't have any idea which function i have to call etc. Does anybody have experience in this kind of applications. It is Urgent. thanks for your help.

Smart Card Accessing Through USB Port
hi Everybody!!!!!!!!!!!!!

i am new comer in hardware interfacing through USB Port. Now i am doing a project in VB 6.0 for Smart Card Accessing. But I am not able to take data from Smartcard from USB Port. my smart card device number is SCR335. driver software is installed.....


pls any body help me to this..


with advanced thanx


assetians

How To Communicate Smart Card Reader With Vb 6.0?
i already installed smart card reader to my pc and it works.
but i need to make a project where whenever i insert ny smart card into the reader, pc will automaticly detect the card information and compare it with the database.
the question is 1)how i am going to build the program in vb 6.0?
2)database need to use microsoft access?
3)how to communicate card reader with vb 6.0?

Smart Card Building System
I am doing a system called Smart Card Building System. It is use for building security. To avoid unauthorised ppl from unentering building or certain level of the building.
so the carrier of the card, of course have to wear it when entering the building.. a device will detect the card which the carrier is having in certain distance and will open the door just in time for the person to get in the building or levels.

I have to design the interface using Visual Basic. The interface would have to come first before designing the card. it means that what are the information that i have to put in the system for the device to recognise the card and open the door.
so the question are how to design the interface..what fields or attributes will the interface carries? and what information will the database have? can u help by giving some guidelines?
over in Malaysia, my country ...we dun have a lot of these systems around...
i am a bit lost in doing my work....
Please, if anyone who read this and knows bout it..please do guide me through this....
i appreciate all your help.

Thank you

Smart Card Resource Manager
Hi all




How to start Smart Card Resource Manager Service. When running SCardSvr.exe i do get the service process could not connect to the service controller

Thanks in advance...

Reading Smart Card [specific Application]
I have a code written in C language to read a smartcard with specific application. Could somebody who has a knowledge in C to guide me to convert the code to VB6? i 've tried some conversion.. but some of it return unexpected result.

The code to call the winscard.dll API is ok. my problem is there are some part of the C code below i dont understand for example in FOR loop to manipulate the byte data from smartcard.

here is the C code

Code:
#include <stdio.h>
#include <winscard.h>
#include <scarderr.h>

#ifndef SCARD_E_NO_READERS_AVAILABLE
#define SCARD_E_NO_READERS_AVAILABLE ((DWORD)0x8010002E)
#endif

void TrimString(char *out, char *in, int count);
void DateString(char *out, unsigned char *in);
void PostcodeString(char *out, unsigned char *in);

const unsigned char CmdSelectAppJPN[] =
{0x00, 0xA4, 0x04, 0x00, 0x0A, 0x0A0, 0x00, 0x00, 0x00, 0x74, 0x4A, 0x50, 0x4E, 0x00, 0x10};
const unsigned char CmdAppResponse[] =
{0x00, 0xC0, 0x00, 0x00, 0x05};
const unsigned char CmdSetLength[] =
{0xC8, 0x32, 0x00, 0x00, 0x05, 0x08, 0x00, 0x00};//append with ss ss
const unsigned char CmdSelectFile[] =
{0xCC, 0x00, 0x00, 0x00, 0x08}; //append with pp pp qq qq rr rr ss ss
//pppp = file id, qqqq = file group
//rrrr = offset, ssss = length
const unsigned char CmdGetData[] =
{0xCC, 0x06, 0x00, 0x00};//append with ss
const int fileLengths[] = {0, 459, 4011, 1227, 171, 43, 43, 0};

SCARD_IO_REQUEST pciT0 = {1, 8};

int main(void)
{
SCARDCONTEXT hSC;
SCARDHANDLEhCard;
char RxBuffer[256];
char TxBuffer[64];
char ReaderName[64];
int retval, dCount, i, dProtocol, dLength, FileNum;
int split_offset, split_length;
FILE *outfile, *out2file;

retval = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC);
if (retval == SCARD_E_NO_SERVICE) {
printf("Smart card service not started
");
goto _Quit;
}
else if (retval != 0) {
printf("SCardEstablishContext Error: %x
", retval);
goto _Quit;
}

printf("Ready to read, press Enter");
getchar();

dCount = 256;
retval = SCardListReaders(hSC, 0, RxBuffer, &dCount);
if (retval == SCARD_E_NO_READERS_AVAILABLE) {
printf("SCardListReaders: No readers available
");
goto _ReleaseContext;
}
else if (retval != 0) {
printf("SCardListReaders: Error %x
", retval);
goto _ReleaseContext;
}
for (i=0; (ReaderName[i] = RxBuffer[i]) && i<64; i++);
if (!i) {
printf("SCardListReaders: No readers available
");
goto _ReleaseContext;
}
puts(ReaderName);
retval = SCardConnect(hSC, ReaderName, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dProtocol);
if (retval == SCARD_W_REMOVED_CARD || retval == SCARD_E_NO_SMARTCARD) {
printf("Smart card removed
");
goto _ReleaseContext;
}
else if (retval != 0) {
printf("SCardConnect: Error %x
", retval);
goto _ReleaseContext;
}
printf("Selecting JPN application
");
dLength = 256;
retval = SCardTransmit(hCard, &pciT0, CmdSelectAppJPN, 15, &pciT0, RxBuffer, &dLength);
if (retval) {
printf("SCardTransmit (Select App): Error %x
", retval);
goto _ReleaseContext;
}
else if (RxBuffer[0] != 0x61 || RxBuffer[1] != 0x05) {
printf("Not MyKad
");
goto _ReleaseContext;
}
dLength = 256;
retval = SCardTransmit(hCard, &pciT0, CmdAppResponse, 5, &pciT0, RxBuffer, &dLength);
if (retval) {
printf("SCardTransmit (App Response): Error %x
", retval);
goto _ReleaseContext;
}

for (FileNum = 1; fileLengths[FileNum]; FileNum++) {
printf("Reading JPN file %d ", FileNum);
sprintf(RxBuffer, "jpn%d", FileNum);
outfile = fopen(RxBuffer, "wb+");
if (FileNum == 2)
out2file = fopen("photo.jpg", "wb+");
for (split_offset=0, split_length=252; split_offset<fileLengths[FileNum]; split_offset+=split_length) {
printf(".");
if (split_offset+split_length > fileLengths[FileNum])
split_length = fileLengths[FileNum] - split_offset;
dLength = 256;
for (i=0; i<8; TxBuffer[i++] = CmdSetLength[i]);
*(short *) (TxBuffer+i) = split_length;i += 2;
retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);

dLength = 256;
for (i=0; i<5; TxBuffer[i++] = CmdSelectFile[i]);
*(short *) (TxBuffer+i) = FileNum;i += 2;
*(short *) (TxBuffer+i) = 1;i += 2;
*(short *) (TxBuffer+i) = split_offset;i += 2;
*(short *) (TxBuffer+i) = split_length;i += 2;
retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);

dLength = 256;
for (i=0; i<4; TxBuffer[i++] = CmdGetData[i]);
TxBuffer[i++] = (unsigned char) split_length;
retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);
fwrite(RxBuffer, 1, dLength-2, outfile);
if (FileNum == 2) {
if (split_offset == 0)
fwrite(RxBuffer+3, 1, dLength-5, out2file);
else
fwrite(RxBuffer, 1, dLength-2, out2file);
}
/* extra display stuffs */
if (FileNum==1 && split_offset==0) {
TrimString(TxBuffer, RxBuffer+0x03, 0x28);
printf("
Name: %s
", TxBuffer);
}
else if (FileNum==1 && split_offset==252) {
TrimString(TxBuffer, RxBuffer+0x111-252, 0x0D);
printf("
IC: %s
", TxBuffer);
printf("Sex: ");
if (RxBuffer[0x11E-252] == 'P')
printf("Female
");
else if (RxBuffer[0x11E-252] == 'L')
printf("Male
");
else
printf("%c
", RxBuffer[0x11E-252]);
TrimString(TxBuffer, RxBuffer+0x11F-252, 0x08);
printf("Old IC: %s
", TxBuffer);
DateString(TxBuffer, RxBuffer+0x127-252);
printf("DOB: %s
", TxBuffer);
TrimString(TxBuffer, RxBuffer+0x12B-252, 0x19);
printf("State of birth: %s
", TxBuffer);
DateString(TxBuffer, RxBuffer+0x144-252);
printf("Validity Date: %s
", TxBuffer);
TrimString(TxBuffer, RxBuffer+0x148-252, 0x12);
printf("Nationality: %s
", TxBuffer);
TrimString(TxBuffer, RxBuffer+0x15A-252, 0x19);
printf("Ethnic/Race: %s
", TxBuffer);
TrimString(TxBuffer, RxBuffer+0x173-252, 0x0B);
printf("Religion: %s
", TxBuffer);
}
else if (FileNum==4 && split_offset==0) {
printf("
Address:
");
TrimString(TxBuffer, RxBuffer+0x03, 0x1E);
puts(TxBuffer);
TrimString(TxBuffer, RxBuffer+0x21, 0x1E);
puts(TxBuffer);
TrimString(TxBuffer, RxBuffer+0x3F, 0x1E);
puts(TxBuffer);
PostcodeString(TxBuffer, RxBuffer+0x5D);
printf("%s ", TxBuffer);
TrimString(TxBuffer, RxBuffer+0x60, 0x19);
puts(TxBuffer);
TrimString(TxBuffer, RxBuffer+0x79, 0x1E);
puts(TxBuffer);
}
/* End displaying stuffs */
}
printf("
");
fclose(outfile);
if (FileNum == 2)
fclose(out2file);
}
_ReleaseContext:
SCardReleaseContext(hSC);
_Quit:
printf("press Enter to end program");
getchar();

return 0;
}

void TrimString(char *out, char *in, int count)
{
int i, j;
for (i=count-1; i>=0 && in[i] == 0x20; i--);
for (j=0; j<i+1; out[j++]=in[j]);
out[j] = 0;
}

void DateString(char *out, unsigned char *in)
{
sprintf(out, "%02x", in[0]);
sprintf(out+2, "%02x-", in[1]);
sprintf(out+5, "%02x-", in[2]);
sprintf(out+8, "%02x", in[3]);
out[10] = 0;
}

void PostcodeString(char *out, unsigned char *in)
{
sprintf(out, "%02x", in[0]);
sprintf(out+2, "%02x", in[1]);
sprintf(out+4, "%02x", in[2]);
out[5] = 0;
}

Reading Smart Card [application Specific]
I have a code written in C language to read a smartcard with specific application. Could somebody who has a knowledge in C to guide me to convert the code to VB6? i 've tried some conversion.. but some of it return unexpected result.

The code to call the winscard.dll API is ok. my problem is there are some part of the C code below i dont understand for example in FOR loop to manipulate the byte data from smartcard.

here is the C code
Code:
#include <stdio.h>
#include <winscard.h>
#include <scarderr.h>

#ifndef SCARD_E_NO_READERS_AVAILABLE
#define SCARD_E_NO_READERS_AVAILABLE ((DWORD)0x8010002E)
#endif

void TrimString(char *out, char *in, int count);
void DateString(char *out, unsigned char *in);
void PostcodeString(char *out, unsigned char *in);

const unsigned char CmdSelectAppJPN[] =
    {0x00, 0xA4, 0x04, 0x00, 0x0A, 0x0A0, 0x00, 0x00, 0x00, 0x74, 0x4A, 0x50, 0x4E, 0x00, 0x10};
const unsigned char CmdAppResponse[] =
    {0x00, 0xC0, 0x00, 0x00, 0x05};
const unsigned char CmdSetLength[] =
    {0xC8, 0x32, 0x00, 0x00, 0x05, 0x08, 0x00, 0x00};        //append with ss ss
const unsigned char CmdSelectFile[] =
    {0xCC, 0x00, 0x00, 0x00, 0x08}; //append with pp pp qq qq rr rr ss ss
                                        //pppp = file id, qqqq = file group
                                        //rrrr = offset, ssss = length
const unsigned char CmdGetData[] =
    {0xCC, 0x06, 0x00, 0x00};        //append with ss
const int fileLengths[] = {0, 459, 4011, 1227, 171, 43, 43, 0};

SCARD_IO_REQUEST pciT0 = {1, 8};

int main(void)
{
    SCARDCONTEXT hSC;
    SCARDHANDLE    hCard;
    char RxBuffer[256];
    char TxBuffer[64];
    char ReaderName[64];
    int retval, dCount, i, dProtocol, dLength, FileNum;
    int split_offset, split_length;
    FILE *outfile, *out2file;

    retval = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC);
    if (retval == SCARD_E_NO_SERVICE) {
        printf("Smart card service not started
");
        goto _Quit;
    }
    else if (retval != 0) {
        printf("SCardEstablishContext Error: %x
", retval);
        goto _Quit;
    }

    printf("Ready to read, press Enter");
    getchar();

    dCount = 256;
    retval = SCardListReaders(hSC, 0, RxBuffer, &dCount);
    if (retval == SCARD_E_NO_READERS_AVAILABLE) {
        printf("SCardListReaders: No readers available
");
        goto _ReleaseContext;
    }
    else if (retval != 0) {
        printf("SCardListReaders: Error %x
", retval);
        goto _ReleaseContext;
    }
    for (i=0; (ReaderName = RxBuffer[i]) && i<64; i++);
    if (!i) {
        printf("SCardListReaders: No readers available
");
        goto _ReleaseContext;
    }
    puts(ReaderName);
    retval = SCardConnect(hSC, ReaderName, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dProtocol);
    if (retval == SCARD_W_REMOVED_CARD // retval == SCARD_E_NO_SMARTCARD) {
        printf("Smart card removed
");
        goto _ReleaseContext;
    }
    else if (retval != 0) {
        printf("SCardConnect: Error %x
", retval);
        goto _ReleaseContext;
    }
    printf("Selecting JPN application
");
    dLength = 256;
    retval = SCardTransmit(hCard, &pciT0, CmdSelectAppJPN, 15, &pciT0, RxBuffer, &dLength);
    if (retval) {
        printf("SCardTransmit (Select App): Error %x
", retval);
        goto _ReleaseContext;
    }
    else if (RxBuffer[0] != 0x61 // RxBuffer != 0x05) {
        printf("Not MyKad
");
        goto _ReleaseContext;
    }
    dLength = 256;
    retval = SCardTransmit(hCard, &pciT0, CmdAppResponse, 5, &pciT0, RxBuffer, &dLength);
    if (retval) {
        printf("SCardTransmit (App Response): Error %x
", retval);
        goto _ReleaseContext;
    }

    for (FileNum = 1; fileLengths[FileNum]; FileNum++) {
        printf("Reading JPN file %d ", FileNum);
        sprintf(RxBuffer, "jpn%d", FileNum);
        outfile = fopen(RxBuffer, "wb+");
        if (FileNum == 2)
            out2file = fopen("photo.jpg", "wb+");
        for (split_offset=0, split_length=252; split_offset<fileLengths[FileNum]; split_offset+=split_length) {
            printf(".");
            if (split_offset+split_length > fileLengths[FileNum])
                split_length = fileLengths[FileNum] - split_offset;
            dLength = 256;
            for (i=0; i<8; TxBuffer[i++] = CmdSetLength[i]);
            *(short *) (TxBuffer+i) = split_length;    i += 2;
            retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);

            dLength = 256;
            for (i=0; i<5; TxBuffer[i++] = CmdSelectFile[i]);
            *(short *) (TxBuffer+i) = FileNum;    i += 2;
            *(short *) (TxBuffer+i) = 1;    i += 2;
            *(short *) (TxBuffer+i) = split_offset;    i += 2;
            *(short *) (TxBuffer+i) = split_length;    i += 2;
            retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);

            dLength = 256;
            for (i=0; i<4; TxBuffer[i++] = CmdGetData[i]);
            TxBuffer[i++] = (unsigned char) split_length;
            retval = SCardTransmit(hCard, &pciT0, TxBuffer, i, &pciT0, RxBuffer, &dLength);
            fwrite(RxBuffer, 1, dLength-2, outfile);
            if (FileNum == 2) {
                if (split_offset == 0)
                    fwrite(RxBuffer+3, 1, dLength-5, out2file);
                else
                    fwrite(RxBuffer, 1, dLength-2, out2file);
            }
            /* extra display stuffs */
            if (FileNum==1 && split_offset==0) {
                TrimString(TxBuffer, RxBuffer+0x03, 0x28);
                printf("
Name: %s
", TxBuffer);
            }
            else if (FileNum==1 && split_offset==252) {
                TrimString(TxBuffer, RxBuffer+0x111-252, 0x0D);
                printf("
IC: %s
", TxBuffer);
                printf("Sex: ");
                if (RxBuffer[0x11E-252] == 'P')
                    printf("Female
");
                else if (RxBuffer[0x11E-252] == 'L')
                    printf("Male
");
                else
                    printf("%c
", RxBuffer[0x11E-252]);
                TrimString(TxBuffer, RxBuffer+0x11F-252, 0x08);
                printf("Old IC: %s
", TxBuffer);
                DateString(TxBuffer, RxBuffer+0x127-252);
                printf("DOB: %s
", TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x12B-252, 0x19);
                printf("State of birth: %s
", TxBuffer);
                DateString(TxBuffer, RxBuffer+0x144-252);
                printf("Validity Date: %s
", TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x148-252, 0x12);
                printf("Nationality: %s
", TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x15A-252, 0x19);
                printf("Ethnic/Race: %s
", TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x173-252, 0x0B);
                printf("Religion: %s
", TxBuffer);
            }
            else if (FileNum==4 && split_offset==0) {
                printf("
Address:
");
                TrimString(TxBuffer, RxBuffer+0x03, 0x1E);
                puts(TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x21, 0x1E);
                puts(TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x3F, 0x1E);
                puts(TxBuffer);
                PostcodeString(TxBuffer, RxBuffer+0x5D);
                printf("%s ", TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x60, 0x19);
                puts(TxBuffer);
                TrimString(TxBuffer, RxBuffer+0x79, 0x1E);
                puts(TxBuffer);
            }
            /* End displaying stuffs */
        }
        printf("
");
        fclose(outfile);
        if (FileNum == 2)
            fclose(out2file);
    }
_ReleaseContext:
    SCardReleaseContext(hSC);
_Quit:
    printf("press Enter to end program");
    getchar();

    return 0;
}

void TrimString(char *out, char *in, int count)
{
    int i, j;
    for (i=count-1; i>=0 && in[i] == 0x20; i--);
    for (j=0; j<i+1; out[j++]=in[j]);
    out[j] = 0;
}

void DateString(char *out, unsigned char *in)
{
    sprintf(out, "%02x", in[0]);
    sprintf(out+2, "%02x-", in[1]);
    sprintf(out+5, "%02x-", in);
    sprintf(out+8, "%02x", in);
    out[10] = 0;
}

void PostcodeString(char *out, unsigned char *in)
{
    sprintf(out, "%02x", in[0]);
    sprintf(out+2, "%02x", in[1]);
    sprintf(out+4, "%02x", in[2]);
    out = 0;
}

Multimedia Driver (smart Card -SPI Mode)
i am looking for vb drivers which will talk to a multimedia card serially. The card is not formatted to be a drive but when is serially pugs into the pc we need to identify the device and then read it..??
 any ideas anybody..????

Smart Card "Winscard.dll"
Does anyone know how to use this DLL? I have a PC/SC smart card reader which I am trying to write APDU commands to the smart card. But I have no idea how to use this library. Anyone care to help? Thanks...

API Used CARD READ AND WRITE
Hi folks

Am using Memory card and Flash Card Reader using to read and write data's
my question is which API is used to read and write data

vb6.0, if u have any idea or wesite tell me.
-------------------------------------------------------------
"HARD WORK NEVER END FAILS"
-------------------------------------------------------------

Smart Data In A Datagrid
Datagrids seem fine to display actual data, but what if some of the columns are an index and not actual data. This complicates modifying a record. What are my options?? Multiple listboxs, one for each field??

After researching somemore, how about a DataRepeater Control?? This way I can use multiple, bound comboboxes that repeat for each record. Maybe a could create an ActiveX control, or is that going too far??

Smart Way Of Analyzing Yearly Data
I have a problem with my Excel (2002, SP -2) database . The database consists of multiple user sheets and a summary sheet. In each user sheet there are lines for various articles and columns for each month to show how many articles have been sold by a user during that month. The summary sheet simply gathers the data from user sheets and sums it up.

The db works fine, except that every year I need to create a new one and name it to something like 2002.xls, 2003.xls, 2004.xls and so on. There could be smarter way to do this, but I really don’t know how. Anyways I currently have three years’ data in separate xls-files and I’d like to compare them and see how sales have changed between years.

I know it’s easy to do it manually or just by making a separate file that links to those other xls-files, but I don’t like the idea of making new summary files every year. Could I somehow copy the summary sheets from all xls-files in one folder into a file called Yearly_Stats.xls or something? And could it be done automatically with each startup?

I wrote some pseudo code, but so far I haven’t found this kind of stuff from VBA-helps:


Code:
Yearly_Stats.xls

When opened, check the folder “X:sthstharchives
Copy a sheet named “Summary” from each workbook in the current folder
Paste the summary-sheets into this workbook as new sheets
Name the sheets according to the filename of the workbook
(eg. “summary” sheet of year 2002 would be renamed into sheet “2002” and pasted into Yearly_Stats.xls)

NB: Summary sheets in each workbook are set to VeryHidden :|

This is too difficult for me, for I’ve been struggling with this problem for several weeks now with zero work results. If someone could give a hand here, I’d be grateful.

Getting Data From Sound Card?
Hello,
At the moment i am writing a program that needs to take a sample of data from the sound card (line in or mic) and store that data in an array.
the data only needs to be 8bit mono, and only need about 1 sec sample( if that matters)

Is there anyone that has an easy way of doing this, by use of a dll or some sample code?

Thanks in advance.

Getting Data From Sound Card?
Hello,
At the moment i am writing a program that needs to take a sample of data from the sound card (line in or mic) and store that data in an array.
the data only needs to be 8bit mono, and only need about 1 sec sample( if that matters)

Is there anyone that has an easy way of doing this, by use of a dll or some sample code?

Thanks in advance.

Mscomm Not Getting All Data From Card Reader
Hi all, i am trying to read information from a card reader into a text box but when i run the code i loose most of the data but if i step the code i get all the data, i can add a timer to slow the code but this is unreliable. also i would like to split the data from the tracks located on the magnetic strip, any help greatly recieved.

Thanks

Data Passing Through A Network Card
Hi i wondered if it was possible to find out how much data had passed through a network card (both uploaded and downloaded). Basically i want to write a program so that when my PC has downloaded/ uploaded a specified amount of data it shuts down, or alternitely closes the network connection. Is this possible? if so can anyone point me in the right direction?

Cheers.

Capture USB Swipe Card Data
I have a USB Swipe card reader that mimics keyboard input. I need to write something VBA or VB that runs in the background and watches for a Specific character (Like the start of a string from the USB Reader) and then organizes the data and send it to a DOS program.

I am looking for some help with the background/key catcher. The rest I am ok with.

To be used with employee data cards....

Any hints in the right direction?

Credit Card Data Transfer
Hello All,
Has anyone developed a application using Vb/Access to transmit data to bank or agent.
Scenario: The VB front end will be used to enter credit card, customer account, product details.
This data will be stored in Access.
The stored data will be then transmitted to bank or agent using FTP.
The transmitted data has to be encrypted.

Any ideas or leads..please advice..

A good programmer is someone who looks both ways before crossing a one-way street. - Doug Linder

Status Data From 802.11 Wireless Card (PLZ Help!!!)
I was curious if there was an OCX for receiving this data? If not is there another way of getting the info from the card?

Please Help

Lost one



Edited by - lost one on 4/20/2005 1:46:01 PM

Smart Reports? Or Am I Not Smart?
Hey The idea of this thread is simple, I just want to know something that may be stupid to ask but when you have no idea of you also have no way to know about it.

So, creating reports is boring -georgen opinion- I say this because sometimes there so many combinations and possibilities for the end-user that one needs to spent 3 whole days just making reports, reports and reports .

But wait a second, Is it necessary to do that? Is there a way to simplify this work by making report creationg customizable? Am I stupid?

Ok, I sense that there is a way to let the user customize the way he/she wants the reports, I just dont know how to do it. The same way (i.e say MS Acess) allows to make complicated reports from many many different combinations and options from the DataBase set of tables, I would like to provide some "similiar" feature to any program.

Finally, I want to hear from the people who knows and do, Im sure you have had this problems in the past and have worked them out, now I just want to know what can I do and what are my options!!

Getting Digital Data Form Sound Card.
I want to get help about getting the digital data from SoundCard When some one speaks in the microphone attached.

Please help me.

Getting Digital Data Form Sound Card.
I want to get help about getting the digital data from SoundCard When some one speaks in the microphone attached.

Please help me.

Brawl Card Game In VB (Card Deck Questions)
I wanted to make a TCP/IP online version of the card game Brawl by cheapass games.

I have some general questions, as I've been a VB programmer for 2-3 years, but haven't done much (anything) with game programming, or objects. (I was taught in college procedurally, so my Object creation isn't what is needs to be in my opinion.)

The short explanation of brawl (card-questions to follow) is this...

2 Players each with a 35 card deck which consists of the following cards:
Bases: Use to start a pile
Hits: (coming in 3 colors Red, Green, Blue)
Blocks: (also in the 3 colors) These stop your oppoent from playing anymore hits on a pile
Press: (3 colors) counters the effect of a block
Freeze: Freezes a pile

You have up to 3 piles (which must start with a Base Card, the base card can only be played if there are less than 3 piles), and then play Hits on your end of the base in hopes of getting more hits on the base than your opponent does. Once a pile is frozen, you count up the hits, and whoever has more wins the base.
Whoever wins more bases, wins the game.
Blocks will prevent the opponent from playing any more hits on that pile. (can only be played on a Hit)
Presses will undo the effects of the block (can only be played on a Block)
So you have up to 3 piles to play on, and each player has a discard pile (which they can play the top card of, instead of the top card on their deck).


Ok, now the questions...

I have a Card Class which has:
Color: (red, green or blue)
Type: (hit, block, base, press, freeze)
Number: The number of this card in the deck. You may have for example, 8 Blue Hits, 2 Red Hits, 4 Green Hits, 2 Bases, 2 Blue Blocks, 1 Blue Press, etc.

Deck Class which has:
Array of Card (1 to 35)
Current: Pointer to the array slot holding the top most card.

Is the right way to do the deck really an array with a pointer? I'd need a Deck class for the Deck to draw from, an initialy empty deck to use as a discard pile as wel.

I was debating making the deck class in a collection instead of an array, but you really won't ever have more than 35 cards in the deck.

Now for each of the 3 piles, you could theoretically have between 0 and infinity (if I allow more than 2 players to play).

Comments?

How Can I Retrive The Infomation Of A Video Card &amp; Sound Card?
Friends,

Is there any possibility to retrive the information of a Video Card & Sound Card? Please help.

Copyright © 2005-08 www.BigResource.com, All rights reserved