IntPtr in c#
Hi,
im new in c# and id like to work with winmm.dll from windows.
so i imported it this way:
[DllImport("winmm.dll")]
extern static int mciSendString(string command,
IntPtr responseBuffer, int bufferLength, int nothing);
which works fine for me. But now i want to read a string out of my responseBuffer and i dont know how to de-referncate. In good old "c" iwould have used the " * " operator, so plz tell me what to use/do in c#.
thx yas stefan
NatePosted Mar 29, 2006, 2:03 PM
cannot convert from 'ref string[]' to 'System.IntPtr'
I had something like this in my code.
string[] myStringArray = { "one", "two", "three", "four" };
function(ref myStringArray);
Is that what you said to do? There has got to be more, but I am not sure what it is.
Brandon TurnerPosted Mar 29, 2006, 1:48 PM
NatePosted Mar 29, 2006, 1:23 PM
Brandon TurnerPosted Mar 28, 2006, 3:53 PM
hansPosted Mar 28, 2006, 3:05 PM
Brandon TurnerPosted Mar 27, 2006, 8:56 PM
hansPosted Mar 27, 2006, 1:14 PM
Mike GoldPosted Mar 27, 2006, 9:45 AM
string
theString = Marshal.PtrToStringAnsi(ResponseBuffer);best,
Mike G.