DDE Call back and it's parameters and values

From: Sonnich Jensen (sonnich.jensen_at_elektrobit.com)
Date: 02/27/04


Date: 27 Feb 2004 06:22:21 -0800

Hi all!

I am playing around with DDE inspired by the article here:
http://bdn.borland.com/article/0,1410,16177,00.html
(correct TCallBack to TFNCallBack - other changes can be done too)

Also, I have problems when having more than 14 items on a
TDDEClientConv. (I run 42 at the moment)

I have a connection and can get data and poke them too. I use Excel as
a server for now. But I cannot get my programme to respond when data
changes.

My problem is that CallType is always 0 or 1 in:

function CallbackProc(CallType, Fmt: Word; Conv: HConv; hsz1, hsz2:
HSZ;
  Data: HDDEData; Data1, Data2: Longint): HDDEData; export;

Even when looking at Delphi own's function (in DdeMan) I am convinced
that it should work, but not. I tried to look for a detailed
describtion of this function and it parameters, is there such on the
net?
I also found that Conv seems to hold the parameter I need sometime.
When CallBack is 1, it is when data changes, when callback is 0 it is
when the connection is closed, or - sometimes just at random?

This has been mentioned before here, in 1997, but there is no answer.

BR
Sonnich Jensen



Relevant Pages

  • Re: Is connection pooling obsolete given MARs?
    ... the command or connection object while you are waiting for the callback, ... (*If you were not using the callback and where using the waitone/all you can ... This problem is going to be there for all non thread safe objects, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Thread safety of asynchronous sockets, also - documentation vs reality
    ... worker thread for each client connection and then use synchronous ... think-type delay, and when your callback function was ... watches that port for input *without* creating an additional thread. ...
    (microsoft.public.dotnet.framework)
  • Event Machine - callbacks from different connections
    ... "You can also call send_data to write to a connection other than the one ... whose callback you are calling send_data from. ... I want a packet of data to be sent out on port 1700 when a packet ... puts "Port = #" ...
    (comp.lang.ruby)
  • Re: sockets : Writing and reading on the same thread with events ?
    ... but the BeginReceive method use another thread even when you don't specify a callback. ... then there is no performance optimization you can make that will matter when it comes to network i/o. ... The cost of the network i/o itself (i.e. the bandwidth of the actual network connection) is so much higher than that of any code that will handle moving the data into or out of that connection that optimizing the latter is pointless. ...
    (microsoft.public.dotnet.framework)