/// <summary>
/// Marshals the given pointer to a string.
/// </summary>
/// <param name="pNativeData">The pointer to the data to marshal to a string.</param>
/// <param name="p_intSize">The length of the array to marshal.</param>
/// <returns>The marshaled string.</returns>
public string[] MarshalNativeToManaged(IntPtr pNativeData, Int32 p_intSize)
{
if (pNativeData == IntPtr.Zero)
{
return(null);
}
string[] strStrings = new string[p_intSize];
for (Int32 i = 0; i < p_intSize; i++)
{
IntPtr ptrString = Marshal.ReadIntPtr(pNativeData, i * IntPtr.Size);
List <byte> lstString = StringMarshaler.GetStringBytes(ptrString, m_encEncoding);
strStrings[i] = m_encEncoding.GetString(lstString.ToArray(), 0, lstString.Count);
}
return(strStrings);
}