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