I'm using elite el el net version. We buy this dongle from senselock europa but there is not e4nmgr.exe in our dongle trial kit.Where I can find it. I download sdk from this forum but it is not work because it is russich.
And I write codes in tutorial like below. and write uvision codes for dongle but when ı want to run it. it give an error "Execute elite el exe failed".Is this about e4nmgr.exe or different ı use mt library and ı work in 64 bit.
Is net version dongles can not support execution.
This is my main code:
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include "sense4.h"
/*bubble sort function removed. Add Elite EL invoking code. */
void call_sense4(char *, unsigned char *, int);
/*main procedure*/
void main()
{
unsigned char test[] = { 4,3,8,2,9,7,1,5,0,6 };
int len = sizeof(test);
int i;
call_sense4("d001", test, len);
printf("result:\n");
for (i = 0; i < len; i++)
{
printf("%d ", test[i]);
}
_getch();
}
void call_sense4(char *fid, unsigned char *buff, int len)
{
SENSE4_CONTEXT ctx = { 0 };
SENSE4_CONTEXT *pctx = NULL;
unsigned long size = 0;
unsigned long ret = 0;
S4Enum(pctx, &size);
if (size == 0)
{
printf("Elite EL not found!\n");
return;
}
pctx = (SENSE4_CONTEXT *)malloc(size);
if (pctx == NULL)
{
printf("Not enough memory!\n");
return;
}
ret = S4Enum(pctx, &size);
if (ret != S4_SUCCESS)
{
printf("Enumerate Elite EL error!\n");
free(pctx);
return;
}
memcpy(&ctx, pctx, sizeof(SENSE4_CONTEXT));
free(pctx);
pctx = NULL;
ret = S4Open(&ctx);
if (ret != S4_SUCCESS)
{
printf("Open Elite EL failed!\n");
return;
}
ret = S4ChangeDir(&ctx, "\\");
if (ret != S4_SUCCESS)
{
printf("No root directory found!\n");
S4Close(&ctx);
return;
}
ret = S4VerifyPin(&ctx, "12345678", 8, S4_USER_PIN);
if (ret != S4_SUCCESS)
{
printf("Verify user PIN failed!\n");
S4Close(&ctx);
return;
}
ret = S4Execute(&ctx, fid, buff, len, buff, len, &size);
if (ret != S4_SUCCESS)
{
printf("Execute Elite EL exe failed!\n");
S4Close(&ctx);
return;
}
S4Close(&ctx);
return;
}
and this is my code for usb I use uvision c51 for below code.
#include "ses_v3.h"
void bubble_sort(unsigned char *p, int len)
{
int i,j;
unsigned char tmp;
for (i=0; i<len-1; i++)
{
for (j=0; j<len-i-1; j++)
{
if (p[j] < p[j+1])
{
tmp = p[j];
p[j] = p[j+1];
p[j+1] = tmp;
}
}
}
}
/*Senselock ELmain procedure*/
void main()
{
unsigned char *test = pbInBuff;
int len = bInLen;
bubble_sort(test, len);
_set_response(len,test);
_exit();
}