4.2.12 - StringToConstant() [U6 Datasheet] | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

Wednesday April 8th, 2020
Support: LabJack engineers available through email and chat.
Shipping: We are processing and shipping all orders.
Stock: 55/56 products in stock. More details.
Supply Chain: Some disruptions. More details.

4.2.12 - StringToConstant() [U6 Datasheet]

Converts the given string to the appropriate constant number. Used internally by the S functions, but could be useful to the end user when using the GetFirst/Next functions without the ability to include the header file. In this case a comparison could be done on the return values such as:

if (IOType == StringToConstant("LJ_ioANALOG_INPUT")) 

This function returns LJ_INVALID_CONSTANT if the string is not recognized.


long _stdcall StringToConstant (  const char *pString  )

Parameter Description:
Returns: Constant number of the passed string.

  • pString – A pointer to the string representation of the constant.


  • None