File.
Returns the specified file board channel’s name.
DioFileGetChannelName (hFile, nChannel, pszChannelName, nMaxLength, pnStatus)
Name |
Type |
Comments |
hFile |
SHORT |
File board handle returned by the function DioFileOpen. |
nChannel |
SHORT |
Board’s channel number ranges from 0 to 31. |
pszChannelName |
PSTR |
Pointer to the string holding the Board’s channel name. |
nMaxLength |
SHORT |
Maximum length of pszChannelName. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The following example returns channel 0 name:
SHORT nStatus, hFile;
CHAR szChName[256];
DioFileOpen (szfilename, 1, &hFile, &nStatus);
if (hFile!=0 && nStatus==0)
DioFileGetChannelName (hFile, 0, szChName, 256,&nStatus);