// Test read access of memory try { c = ( (char*) pvMemory )[0]; c = ( (char*) pvMemory )[iNLen - 1]; } catch( ... ) { return -1; }