i have a problem with using the parallel port to output signal to control devices or to receive data .
i know that winxp restrict access to the port, so i downloaded the inpout32.dll and i put it in the system32 folder then i used the inport ,outport functions but still there is no response from the port.
so i need to be guided what to do?

Use a compiler that is matched to your OS perhaps?

Seriously, just because the compatibility layer makes simple "hello world" programs work for these fossil compilers doesn't mean you can then use them to go rummaging through the dark corners of the system with impunity.

Judging from some other recent threads, Win7 simply tells you to take a hike if you try to use crusty old Turbo C.

Do you want to wait that long before being forced into an upgrade, or take the time now and make a big step forward.

Also, your description is pretty meaningless without code.

#include "stdafx.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "conio.h"
/* ----Prototypes of Inp and Outp--- */

short _stdcall Inp32(short PortAddress);
void _stdcall Out32(short PortAddress, short data);


int main(void)
    int data;
    printf("\n data read is %d",data);
    printf("\n data out is 25");
    printf("\n data read is %d",data);
        //too few command line arguments, show usage
        printf("Error : too few arguments\n\n***** Usage *****\n\nInpoutTest read <ADDRESS> \nor \nInpoutTest write <ADDRESS> <DATA>\n\n\n\n\n");
    else if(!strcmp(argv[1],"read"))

        data = Inp32(atoi(argv[2]));

        printf("Data read from address %s is %d \n\n\n\n",argv[2],data);

    else if(!strcmp(argv[1],"write"))
            printf("Error in arguments supplied");
            printf("\n***** Usage *****\n\nInpoutTest read <ADDRESS> \nor \nInpoutTest write <ADDRESS> <DATA>\n\n\n\n\n");
        printf("data written to %s\n\n\n",argv[2]);

    return 0;

this is the source file ,i tried to execute it in visual c++ and the error message informing that privileged instruction.

Edited 3 Years Ago by mike_2000_17: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.