Note that scalar values have to be passed by reference:
int i,*ii; NMDSetValue(nmd,....,&i); // use an ampersand here NMDSetValue(nmd,....,ii,length); // no ampersand needed here! NMDGetValue(nmd,....,&i); NMDGetValue(nmd,....,&ii,&length);
Furthermore, see NMDCopyItemValues(), NMDGetDataType(), NMDIsArrayType().