Use of read/write functions with SNMP

When I use the manVarType.varPointer field to nominate a function for handling integers, all works well; when I use it for strings I get garbage in the ‘buffer’ parameter of the manAccessFunctionType function during write and a zero length string returned to the network during read. Any ideas as to why? Thanks Phil