#include <iostream.h>
#include <conio.h>
#include <windows.h>



//First You Must Put The File Inpout32.dll In The System32 Folder in the Windows Root,,,

typedef char (WINAPI *DllInp) (int);
typedef void (WINAPI *DllOut) (int, char);

        HINSTANCE hLibrary;
        DllInp Inp;
        DllOut Out;

		

void main()
{

	hLibrary = LoadLibrary("inpout32.dll");
        if (hLibrary!=0) {
                Inp = (DllInp) GetProcAddress(hLibrary, "Inp32");
                Out = (DllOut) GetProcAddress(hLibrary, "Out32");
        }
		else ::MessageBox(NULL,"HFGDH","hfgd",MB_OK);  
//////////////////////////////////////////////////////////////////////////////////
// START YOUR CODE AFTER HERE ,,,,,
//By Calling Out and In Functions ,,,
//////////////////////////////////////////////////////////////////////////////////

		unsigned char cData=7;
		int iAddress = 888;
//Enter Data To Port....
	Out(888,cData);

//Reciving Data From Port,,, The Result Will Be 7 !!
	cData = Inp(iAddress);

	cout <<(int)cData<<endl;

	cin>>iAddress;


}
