How to get serial number of a SD CARD?
Thanks in advance
Otto
serial number SD CARD
serial number SD CARD
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: serial number SD CARD
Otto
test anyfile on the sd
sample
NSER := NumserieTarjeta(Fopen(curdir()+"\CBATIPKSAV.EXE") )
hth
Richard
test anyfile on the sd
sample
NSER := NumserieTarjeta(Fopen(curdir()+"\CBATIPKSAV.EXE") )
hth
Richard
Code: Select all
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
#include <aygshell.h>
HB_FUNC( NUMSERIETARJETA )
{
BY_HANDLE_FILE_INFORMATION bHinfo;
memset( &bHinfo, 0 , sizeof(bHinfo) );
GetFileInformationByHandle( (HANDLE) hb_parnl(1), &bHinfo );
hb_retnl( bHinfo.dwVolumeSerialNumber );
}
#pragma ENDDUMP
Re: serial number SD CARD
Hello Richard,
Thank you for your help. I get back a number. It is working.
Do I understand the code right: F_open creates a file handle which you pass to GetFileInformationByHandle.
DwVolumeSerialNumber is a volume serial number, all files on that volume will have the same dwVolumeSerialNumber.
Do you know what happens if you xCopy one SDCARD to another.
Does the dwVolumeSerialNumber remain on the copy the same?
Thanks again,
Otto
Thank you for your help. I get back a number. It is working.
Do I understand the code right: F_open creates a file handle which you pass to GetFileInformationByHandle.
DwVolumeSerialNumber is a volume serial number, all files on that volume will have the same dwVolumeSerialNumber.
Do you know what happens if you xCopy one SDCARD to another.
Does the dwVolumeSerialNumber remain on the copy the same?
Thanks again,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: serial number SD CARD
Otto
Every SD card has its own serial number
if you "xcopy" all the files from one to another, you do not copy the serial number , you can just retreive it
HTH
Richard
Every SD card has its own serial number
if you "xcopy" all the files from one to another, you do not copy the serial number , you can just retreive it
HTH
Richard
Re: serial number SD CARD
Richard, thank you. That is good, that is what I need.
So I can use this number to protect the software.
Thanks again,
Otto
So I can use this number to protect the software.
Thanks again,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************