viVSPrintf
Syntax
viVSPrintf(ViSession vi, ViPBuf buf, ViString writeFmt, ViVAList params);
Description
Same as viVPrintf, except data are written to a user-specified buffer rather than a device. This operation is similar to viVPrintf, except the output is not written to the device but is written to the user-specified buffer. This output buffer will be NULL terminated.
If the viVSPrintf operation outputs an END indicator before all the arguments are satisfied, the rest of the writeFmt string will be ignored and the buffer string will still be terminated by a NULL.
Parameters
Name |
Dir |
Type |
Description |
---|---|---|---|
vi |
IN |
ViSession |
Unique logical identifier to a session. |
buf |
OUT |
ViPBuf |
Buffer where data are to be written. |
writeFmt |
IN |
ViString |
The format string to apply to parameters in ViVAList. |
params |
IN |
ViVAList |
A list containing the variable number of parameters on which the format string is applied. The formatted data are written to the specified device. |
Return Values
Type ViStatus |
This is the function return status. It returns either a completion code or an error code as follows. |
Completion Code |
Description |
---|---|
VI_SUCCESS |
Parameters were successfully formatted. |
Error Code |
Description |
VI_ERROR_ALLOC |
The system could not allocate a formatted I/O buffer because of insufficient resources. |
VI_ERROR_INV_FMT |
A format specifier in the writeFmt string is invalid. |
VI_ERROR_INV_SESSION |
The given session or object reference is invalid (both are the same value). |
VI_ERROR_IO |
Could not perform read function because of I/O error. |
VI_ERROR_NSUP_FMT |
A format specifier in the writeFmt string is not supported. |
VI_ERROR_RSRC_LOCKED |
Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. |