Hi all C# gurus
I would like to call a library of C functions exported from a dll. I know the way to make this is to write un-managed code with DllImport attribute to write a C# wrapper function and call it.And its working good, but....the main problem i m facing is where in my exported functions have pointer as return types(pass by reference).

Ex: int GetPosition(int *pos);
Question1:
what should be the the C# function prototype for this and pls give an example of calling the function also.
Question2:
I have a function exported fron dll with prototype as given bellow where i use this char[] for out parameter:
int GetName(char name[]);
what should be its equivalent C# prototype and how should i call it to get 1st parameter as the output string.

Note : I will rate all help,suggestions,pointers, sample codes, links to any references or articles.

Regards
SKP

Be sure to rate answers if it helped, to encourage them.