Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DDE with C#

DDE with C#

Scheduled Pinned Locked Moved C#
csharphelptutorial
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mardawi
    wrote on last edited by
    #1

    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

    W 1 Reply Last reply
    0
    • M Mardawi

      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

      W Offline
      W Offline
      wolframrinke
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • W wolframrinke

        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

        J Offline
        J Offline
        jiugarte Brasil
        wrote on last edited by
        #3

        look for http://www.codeplex.com/ndde.

        jiugarte brasil

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups