Ayuda con codigo C

Ayuda con codigo C

Postby csincuir » Thu Mar 11, 2021 12:13 am

Hola a todos.
Quiero molestarles ahora, si alguien sabe como poder usar este codigo C con FWH por favor:

Code: Select all  Expand view
--------------------------------------------------------------
| Codigo para lectura / registro de la huella
|
--------------------------------------------------------------

#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <fstream>

using namespace std;

int main(int argc, char *argv[])
{
    string resultado = "";

    if(argc==1)
    {
        resultado = system("biometrico\\bspdemo_cs.exe  adndigital2021");
        ifstream file("biometrico\\biometricohuella.txt");
        string content;

        //--------------------------------------
        // Lee el resultado del archivo
        // La huella leida por el biometrico
        //--------------------------------------
        while(file >> content)
        {
            cout << content << ' ';
        }

    }

    return 0;
}


--------------------------------------------------------------
| Codigo para comparar la huella contra una ya registrada
|
--------------------------------------------------------------

#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <fstream>

using namespace std;

int main(int argc, char *argv[])
{
    string resultado = "";

    if(argc==2)
    {
        std::string cmd = "biometrico\\bspdemo_cs.exe  adndigital2021";

        //
        // argv[1] --> contiene el string de la huella a comparar
        //
        cmd += argv[1];

        resultado = system(cmd.c_str());

        ifstream file("biometrico\\biometricoresultado.txt"); string content;

        //--------------------------------------
        // Lee el resultado del archivo
        // Matched
        // Not Matched
        //--------------------------------------
        while(file >> content)
        {
            cout << content << ' ';
        }
    }

    return 0;
}


Gracias anticipadas.

Carlos
csincuir
 
Posts: 397
Joined: Sat Feb 03, 2007 6:36 am
Location: Guatemala

Re: Ayuda con codigo C

Postby Antonio Linares » Thu Mar 11, 2021 8:04 am

Carlos,

Prueba asi:

WinExec( "biometrico\\bspdemo_cs.exe adndigital2021" )
MsgInfo( MemoRead( "biometrico\\biometricohuella.txt" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Ayuda con codigo C

Postby csincuir » Thu Mar 11, 2021 12:20 pm

Antonio, gracias por tu respuesta.
Yo hago las pruebas y comento luego.
Este es un requerimiento de un cliente, que quiere utilizar los lectores biométricos Hamster IV

Saludos cordiales.

Carlos
csincuir
 
Posts: 397
Joined: Sat Feb 03, 2007 6:36 am
Location: Guatemala


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 27 guests