If it's a byte array, you can convert the array to string with StrConv function, if it's an array of any other type, you can calculate the total ammount of memory in bytes, then with CopyMemory API, you can copy the memory to a byte array, and then conver to string.
Obviously when you receive the data, you have to do the reverse...