When I use the _inp() and _outp() function in Win98, the application works well. But in NT workstation, it can not work. Why, and how to solve this problem? I use these two functions to read from and write to the Serial Port register.

I use these two functions as following:
unsigned char result;
unsigned short ppport = 0x2EB;

result = _inp( ppport );
_outp( ppport, (result | 0x80));
_outp( 0x2E8, 21 );
_outp( 0x2E9, 0x00 );
_outp( 0x2EB, (result & 0x7F));