This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / The Mathematica Book / Reference Guide / Listing of C Functions in the MathLink Library  /
MLGetByteString()

  • intMLGetByteString(MLINKlink,unsignedchar**s,long*n,longspec) gets a string of characters from the MathLink connection specified by link, storing the codes for the characters in s and the number of characters in n. The code spec is used for any character whose Mathematica character code is larger than 255.
  • MLGetByteString() allocates memory for the array of character codes. You must call MLDisownByteString() to disown this memory.
  • MLGetByteString() is convenient in situations where no special characters occur.
  • The character codes used by MLGetByteString() are exactly the ones returned by ToCharacterCode in Mathematica.
  • The array of character codes in MLGetByteString() is not terminated by a null character.
  • Characters such as newlines are specified by their raw character codes, not by ASCII forms such as \n.
  • See the Mathematica book: Section 2.12.5.
  • See also: MLGetStringMLGetStringMainBookLinkOldButtonDataMLGetString, MLGetUnicodeStringMLGetUnicodeStringMainBookLinkOldButtonDataMLGetUnicodeString.