Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8175865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:55:45+00:00 2026-06-06T22:55:45+00:00

I am writing a java smart card application in windows MFC. How do i

  • 0

I am writing a java smart card application in windows MFC. How do i find the drive name( name display in “My Computer”) of the connected smart card. For eg. once i connect the smart card(even though it a smart card, it will work as memory card ) it will come as “** Removable Disk(F:)**” . I am able to connect to smart card using SCardConnect function. from the handle return from SCardConnect function, can i get the drive name .

Or is there any way to find out whether a particular drive is smart card. ie. we can easily find out the removable disks in the machine and from that is it possible to find out whether its a smart card or not.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:55:47+00:00Added an answer on June 6, 2026 at 10:55 pm

    I have written code to enumerate SmartCard devices, in C; here is the code I use;

    Cheers,
    Con

    int findDevice(){
    hContext = NULL;
    
    log("\nSearching for the following device: XXX eKrypto Pinpad\n");
    
    //Get a context to the resource manager 
    lReturn = SCardEstablishContext(SCARD_SCOPE_USER,NULL,NULL,&hContext);
    log("Context established.\n");
    if(lReturn != SCARD_S_SUCCESS){
      logBytes("SCardEstablishContext failed with error: ", (byte *)&lReturn, sizeof(LONG));
      return 0;
    }
    
    contextEstablished = true;
    
    //Get the readers list
    DWORD chReaders = 250;
    lReturn = SCardListReaders(hContext,NULL,readerNames,&chReaders);
    log("Reader List obtained.\n");
    if(lReturn != SCARD_S_SUCCESS){
        logBytes("  SCardListReaders failed with error: \n", (byte *)&lReturn, sizeof(LONG));
        return 0;
    }
    
    //Search for device
    char *pReaders = readerNames;
    log(pReaders);
    while(strlen(pReaders) != 0 && deviceFound == false){
        if(!memcmp(pReaders, "ETS eKrypto Pinpad", 18)){
            deviceFound = true;
            memcpy(currentReader, pReaders, strlen(pReaders));
        }
        pReaders += strlen (pReaders)+1;
    }
    if(deviceFound == false){
        log("  Specified ETS device not found\n");
        return 0;
    }
    
    log("  Successful\n");
    return 1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an application to interact with smart card currently using Java. I
I am writing java code. which will work on windows and linux. some code
I usually C++ applications. The only web-application development I've done is writing Java Applets.
I am writing a Java client/server GUI application using sockets and here is the
I'm writing (under linux or windows+cygwin) a java program that needs to run a
I'm writing a java application that reads input, populates data structures, and then does
I'm writing a new Java 6 Swing application and want to have a Show
I'm writing my Java app a update mechnism. I create a windows batch file,exit
I'm writing a load-testing application in Java, and have a thread pool that executes
I'm writing an emulator of an old computer in Java/Swing, and I think I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.