1. Please show the exact error messages.
2. Read MSDN about CTypedPtrArray and its using (particularly, Requirements section)