Which version of the PicoScope 3000a SDK are you using? Please ensure that you have the latest SDK which you can download from http://www.picotech.com/software.html
In Step 1, select the PicoScope 3404B, and in step 2, select the option for the Software Development Kit.
One thing you may wish to do is add a library function call to ps3000aStop in the outer loop - this function stops the device collecting data.
Does the device work ok with the PicoScope 6 software?