Char* as parameter

Hi, I’m using C# to code my program, and I’ve done a function in CUDA that takes a char* as a parameter.
I can’t pass a char array directly from my C# code because it will throw a nullReferenceException, so I’ve tried to pass an int array and convert from int * to char * inside the CUDA code, but I’ve been unable to do it.
How can I, pass a char* parameter from C# or convert from int* to char* on CUDA?

Thanks in advance.

If what you want is to access the content of the host memory at your char * from a kernel you need to cudaMemcpy first, to transfer the host memory contents in to the video card memory…
kernel parameters are passed as copies, so if you are passing char * or int * values as arguments that really doesnt make too much of a difference you’re still copying a 4 byte (probably) sized pointer.