1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <windows.h>
#include "winio.h"
#include <time.h>
#include <conio.h>
using namespace std;
int main(int argc, char* argv[])
{
char LszNbArgc[2];
bool bResult;
string LszPathFile;
ifstream FilePJL;
unsigned char Char1;
cout << "RECUPERATION INFORMATIONS IMPRIMANTE" << endl;
LszPathFile = argv[1];
cout << "LOADING WINIO ..." << endl;
bResult = InitializeWinIo();
if (bResult)
{
cout << "WINIO LOADED" << endl;
FilePJL.open(LszPathFile.data(), ios_base::binary);
FilePJL.seekg(0, ios_base::beg);
do{
FilePJL.read(reinterpret_cast<char*>(&Char1), 1);
_outp(888, Char1);
//SetPortVal(0x378, Char1, 1);
} while (!FilePJL.eof());
FilePJL.close();
ShutdownWinIo();
cout << "WINIO UNLOADED" << endl;
cin>>LszNbArgc;
return 0;
}
else
{
cout<<"Error during initialization of WinIo."<<endl;
return -1;
}
cin>>LszNbArgc;
} |
Partager