API C/C++
HSM Dinamo
Loading...
Looking for...
No entries found
sc_erase.c

Example of removing information from the smart-card.

See Note on examples.
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <dinamo.h> /* header do Dinamo */
int main()
{
int nRet = 0;
const char *szPin = "12345678";
/*
Inicializa as bibliotecas do Dinamo
*/
nRet = DInitialize(0);
if (nRet){
printf("Falha na funcao: DInitialize \nCodigo de erro: %d\n", nRet);
goto clean;
}
printf("Bibliotecas inicializadas.\n");
/*
Apaga as informações do cartão.
*/
nRet = DSCErase(szPin, 0);
if (nRet)
{
printf("\nFalha na funcao: DSCErase\nCodigo de erro: %d\n\n", nRet);
goto clean;
}
printf("Informacoes do cartao apagadas com sucesso.\n");
clean:
printf("Bibliotecas finalizada.\n");
return nRet;
}
Application Programming Interface (API) do HSM Dinamo.
int AAP_API DSCErase(const char *szPIN, DWORD dwReserved)
int AAP_API DInitialize(DWORD dwReserved)
int AAP_API DFinalize()