def ErrorToString(ErrorCode):
 if (os.name == 'nt'):
  staticLib = ctypes.windll.LoadLibrary('labjackud')
  pString = ctypes.create_string_buffer(256)
  staticLib.ErrorToString(ctypes.c_long(ErrorCode), ctypes.byref(pString))
  return pString.value
 else:
  raise LabJackException(0, 'Function only supported for Windows')

def ErrorToString ( ErrorCode ) : if ( os . name == 'nt' ) : staticLib = ctypes . windll . LoadLibrary ( 'labjackud' ) pString = ctypes . create_string_buffer ( 256 ) staticLib . ErrorToString ( ctypes . c_long ( ErrorCode ) , ctypes . byref ( pString ) ) return pString . value else : raise LabJackException ( 0 , 'Function only supported for Windows' )
converts an labjackud valid error code to a string .