DDE with C#
-
do any body knows a good reference on how to use DDE by C# i tried to do that using DDEML (APIs) but am stucked with the getdata method, it takes a pointer paramenter to a data type that should be a string, and i don't think that we can make a pointer to a string in C#...ref and out gives a null reference exipition. please help me...i will be very thankful
-
do any body knows a good reference on how to use DDE by C# i tried to do that using DDEML (APIs) but am stucked with the getdata method, it takes a pointer paramenter to a data type that should be a string, and i don't think that we can make a pointer to a string in C#...ref and out gives a null reference exipition. please help me...i will be very thankful
Hello, I work on the same think. To make DDE working for C#. It is very difficult. For getdata I use following declaration [DllImport("user32.dll")] public unsafe static extern int DdeGetData(IntPtr hData, sbyte *pDst, int cbMax, int cbOff); and in the code I do arry = new Byte[cb]; fixed(Byte result = arry) { User.DdeGetData(hData, result, cb, 0); ppsz = new StringBuilder(new string(result)); } Did you have some progress or did you gave up. So far my class is working for some time, but fails later with a illegal memory access error, which is probably caused by the GC in C#. Hope that helps, Wolfram wolfram.rinke@inode.at
-
Hello, I work on the same think. To make DDE working for C#. It is very difficult. For getdata I use following declaration [DllImport("user32.dll")] public unsafe static extern int DdeGetData(IntPtr hData, sbyte *pDst, int cbMax, int cbOff); and in the code I do arry = new Byte[cb]; fixed(Byte result = arry) { User.DdeGetData(hData, result, cb, 0); ppsz = new StringBuilder(new string(result)); } Did you have some progress or did you gave up. So far my class is working for some time, but fails later with a illegal memory access error, which is probably caused by the GC in C#. Hope that helps, Wolfram wolfram.rinke@inode.at
look for http://www.codeplex.com/ndde.
jiugarte brasil