Applies To
General utility function.
Purpose
Converts a DIO file from one format to another.
Syntax
DioFileConvert (szSourceFile, szDestFile, nDestFileType, pnStatus)
Parameters
Name |
Type |
Comments |
szSourceFile |
LPSTR |
The source file name to convert from can have any of the following formats: *.DIO: DIOEasy version 2.x or version 1.x. *.ASC: raw ASCII or ASCII with commands DIOEasy version 2.x or version 1.x. |
szDestFile |
LPSTR |
The file name converted to. Can have any of the following formats: *.DIO: DIOEasy version 2.x. *.ASC: raw ASCII or ASCII with commands, DIOEasy version 2.x. |
nDestFileType |
SHORT |
The converted file type can be as follow: 0 DIOEasy version 2.x 1 Raw ASCII 2 DIOEasy version 2.x ASCII with commands. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Comments
The function identifies the source file type by its extension. The function will open DIOEasy 1.x files.
The function relies on the target file name having the appropriate extension according to the nDestFileType.
Example
The following example converts a DIOEasy 1.x file to DIOEasy 2.x format:
SHORT nStatus;
DioFileConvert (“OldDio.dio”, “NewDio.dio”, 0, &nStatus);
See Also
DioFileOpen, DioFileDeleteBoard, DioGetErrorString