Is there a question in there somewhere? Looks like it ran fine.

BTW, you should free up the memory you allocated to the dPtr pointer.