home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cenvi23.zip
/
PORTIO.LIB
< prev
next >
Wrap
Text File
|
1995-10-12
|
1KB
|
37 lines
// PortIO.lib - Beginning with version 2.00 of CEnvi for OS/2
// ver.2 the inport and outport functions stopped working.
// This file remedies that problem. If a Cmm script
// first includes this lib file, and if CENVI2IO.DLL
// is in a LIBPATH directory, then the port routines
// may be called. These functions match the
// protocols as defined in the OS/2 library chapter
// of the CEnvi manual. Not that this file must
// be in the same directory as the CEnvi executable.
//
// initiliaze full path and directory for the DLL, which must be
// in the same directory as the CEnvi executable
sprintf(gCENVI2IO_DLLpath,"%s%s",SplitFileName(_argv[-1]).dir,"CENVI2IO.DLL");
inport(pPortID)
{
lRet = DynamicLink(gCENVI2IO_DLLpath,"INPORT",BIT16,CDECL,pPortID);
return 0xFF & lRet;
}
inportw(pPortID)
{
lRet = DynamicLink(gCENVI2IO_DLLpath,"INPORTW",BIT16,CDECL,pPortID);
return 0xFFFF & lRet;
}
outport(pPortID,pValue)
{
DynamicLink(gCENVI2IO_DLLpath,"OUTPORT",BIT16,CDECL,pPortID,pValue);
}
outportw(pPortID,pValue)
{
DynamicLink(gCENVI2IO_DLLpath,"OUTPORTW",BIT16,CDECL,pPortID,pValue);
}