Use CUDA to do video processing

I’d like to code a kernel that processes a video. I used a directshow sample(VMR9Allocator) to allocate a Direct3D surface and got Direct3D Texture from this surface. Then I want to pass this texture to CUDA for processing video. But the result show that the texture can’t be passed into CUDA through DirectX interoperability API (cudaD3D9RegisterResource, cudaD3D9MapResources, cudaD3D9ResourceGetMappedPointer). Any ideas how to do this connect between VMR9 and CUDA? Thank you.