cbDeclareRevision()
Initializes the Universal Library with the revision number of the library used to write your program. Must be the first Universal Library function to be called by your program.
Function Prototype
C/C++
int cbDeclareRevision(float* RevNum);
Visual Basic
Function cbDeclareRevision(RevNum!) As Long
Arguments
RevNum
Revision number of the Universal Library used to interpret function arguments.
Default setting: Any program using the 32-bit library and not containing this line of code will be defaulted to revision 5.4 argument assignments.
Returns
Notes
- As new revisions of the library are released, bugs from previous revisions are fixed and occasionally new functions are added. It is Measurement Computing's goal to preserve existing programs you have written and therefore to never change the order or number of arguments in a function. Sometimes this is not possible, as in the changes from revision 3.2 to 3.3. In revision 3.3, we added support for multiple background tasks, a feature that users have requested.
- Allowing multiple background tasks required adding the argument BoardNum to several functions. Doing so would have meant that programs written for version 3.2 would not run with 3.3 if they called those functions. If not for the cbDeclareRevision() function, the programs would have had to be rewritten in each line where the affected functions are used, and the program recompiled.
- The revision control function initializes the DLL so that the functions are interpreted according to the format of the revision you wrote and used to compiled your program. This function is new in revision 3.3. To take advantage of it, the function must be added to your program and the program recompiled.
- The function works by interpreting the UL function call from your program and filling in any arguments needed to run with the new revision. For example, the function cbAConvertData() had the argument BoardNum added in Revision 3.3.
- The two revisions of the function look like this:
- Rev 3.2:
int cbAConvertData(long NumPoints, unsigned ADData[], int ChanTags[])
int cbAConvertData(int BoardNum, long NumPoints, unsigned ADData[], int ChanTags[])
- If your program has declared you are running code written for revision 3.2, and you call this function, the argument BoardNum is ignored. If you want the benefits afforded by BoardNum, you must rewrite your program with the new argument and declare revision 3.3 (or higher) in cbDeclareRevision().
- If a revision less than 3.2 is declared, revision 3.2 is assumed.