Wc_File_Write; Wc_File_Write_Line; Wc_Find_String - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

NetLinx UniCode Functions
NetLinx UniCode Functions (Cont.)

WC_FILE_WRITE

WC_FILE_WRITE_LINE

WC_FIND_STRING

178
This function writes a block of widechar data to the specified file.
SLONG WC_FILE_WRITE (LONG hFile, WIDECHAR Buffer[ ], LONG
BufLen)
Parameters:
• hFile: Handle to the file returned by WC_FILE_OPEN.
• Buffer: Buffer containing the data to write.
• BufLen: Number of characters to write.
Result:
• >0: The number of bytes actually written
• -1: Invalid file handle
• -5: Disk I/O error
• -6: Invalid parameter (buffer length must be greater than zero)
• -11: Disk full. The data will overwrite or append to the current contents of the
file depending on the current position of the file pointer.
WIDECHAR wcBuffer[1024]Result = WC_FILE_WRITE (hFile,
wcBuffer,1024)
This function writes a line of widechar data to the specified file.
SLONG FILE_WRITE_LINE (LONG hFile, WIDECHAR Line[ ], LONG
LineLen)
Parameters:
• hFile: Handle to the file returned by WC_FILE_OPEN.
• Line: Buffer containing the line of data to write.
• LineLen: Number of characters to write.
Result:
• >0: The number of bytes actually written
• -1: Invalid file handle
• -5: Disk I/O error
• -6: Invalid parameter (LineLen must be greater than zero)
• -11: Disk full. A <CR><LF> character pair is automatically appended to the
end of the line.
WIDECHAR wcLine[80]Result = FILE_WRITE_LINE (hFile,
wcLine, 80)
This function searches through a string for a specified sequence of characters.
INTEGER WC_FIND_STRING (WIDECHAR STRING[ ], WIDECHAR
Seq[ ], INTEGER Start)
Parameters:
• STRING: The string of character to search.
• Seq: The sequence of characters to search for.
• Start: The starting character position for the search.
Result:
A 16-bit unsigned integer representing the character location of Seq in
STRING. If the character string is found at the beginning of the string, this
function returns 1; any error condition returns 0.
POS = WC_FIND_STRING(STRING, _WC('ABC'), 1)
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents