public bool tryVectorChar(
string name,
ushort fid,
ref char[] result)
{
EnsurePeerCreated();
IntPtr array = IntPtr.Zero;
uint size = 0;
int code = NativeMethods.mamaMsg_getVectorChar(nativeHandle, name, fid,ref array, ref size);
if (CheckResultCodeIgnoreNotFound(code) != MamaStatus.mamaStatus.MAMA_STATUS_OK)
{
return false;
}
byte[] bRet = new byte[size];
Marshal.Copy(array, bRet, 0, (int)size);
char[] val = new char[size];
for (int i = 0; i < val.Length; i++)
{
val[i] = (char)bRet[i];
}
result = val;
return true;
}