3d surface on device to float on host

Hi! there is a problem how to transfer 3d surface from device to float(any type) on host…

cudaError_t error = cudaSuccess;
const cudaExtent my_size = make_cudaExtent(width, height, depth);
cudaMemcpy3DParms copyParams = {0};
copyParams.srcArray = d_pointer; //(cudaArray)
copyParams.dstPtr = make_cudaPitchedPtr((void*)h_pointer, width*sizeof(float), width, height); 
copyParams.extent   = my_size;
copyParams.kind     = cudaMemcpyDeviceToHost;

error = cudaMemcpy3D(&copyParams);

h_pointer - type float* and memory is allocated

Compile is ok, but execution gives the error: cudaErrorInvalidValue.