Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26219

lectura de un DLL -

$
0
0
Buenas amigos listeros saludes a la distancia. Haber quien m epuede echar una mano. Miren est funcion es de un lector sin contacto necsito leer los parametreos de este api y aprender un poco mas utilza una libreria ctacs.DLL Como podria utilizar hacer esto para utilizar la dll agradezco desde ya la ayuda No tengo conicimiento en est ar ea. [color=#0000FF:1vk7gnt0]Calling CT-API Functions[/color:1vk7gnt0] Esta es funcion en C #include #include int main(int argc, char *argv[]) { char ret; unsigned short ctn; unsigned short pn; unsigned char sad; unsigned char dad; // REQUEST ICC unsigned char command[] = { 0x20, 0x12, 0x01, 0x00, 0x00 }; unsigned short lenc = sizeof(command); unsigned char response[300]; unsigned short lenr = sizeof(response); unsigned short i; ctn = 1; pn = 1; // Initialize card terminal ret = CT_init(ctn, pn); if (ret != OK) { printf("Error: CT_init failed with error %d\n", ret); return 1; } sad = 2; // Source = Host dad = 1; // Destination = Card Terminal // Send command ret = CT_data(ctn, &dad, &sad, lenc, command, &lenr, response); if (ret != OK) printf("Error: CT_data failed with error %d\n", ret); else { // Display response printf("Response: "); for (i = 0; i < lenr; i++) printf("%02X ", response[i]); printf("\n"); } // Close card terminal ret = CT_close(ctn); if (ret != OK) printf("Error: CT_close failed with error %d\n", ret); return 0; } Ahora esta manera pero el programa entra no muestra nada y sale sin errores. Function Milagros() Local ctn :=1 , pn := 1 hDLL := LoadLibrary( "ctacs.DLL") ?? CT_init(ctn, pn) FreeLibrary( hDLL ) return nil [color=#BF0000:1vk7gnt0][size=150:1vk7gnt0][b:1vk7gnt0]DLL FUNCTION CT_init( ctn AS PTR , pn AS PTR ) AS LONG LIB "ctacs.DLL"[/b:1vk7gnt0][/size:1vk7gnt0] [/color:1vk7gnt0]

Viewing all articles
Browse latest Browse all 26219

Trending Articles