.

解决方案 »

  1.   

    回调函数也就是由操作系统调用的函数!一般在高级WINDOWS SDK编程序的时候会用到!
    你需要形式上声明一个WINDOWS所要求的函数,然后把函数的地址传给WINDOWS,也就是让
    WINDOWS知道你需要执行的指令的地址,当某种特定的情况下,WINDOWS会调用你写的这个函数!
    从而使你获得控制权.例如:
    HHOOK SetWindowsHookEx(
        int idHook, // type of hook to install
        HOOKPROC lpfn, // address of hook procedure <--此处就要求给出一个回调函数的地址给OS;
        HINSTANCE hMod, // handle of application instance
        DWORD dwThreadId // identity of thread to install hook for 
       );
    这个API函数允许程序员监视一些特定的系统事件!
      

  2.   

    实现流动线的效果Timer1.Interval = 200;var
      Form1: TForm1;
      Counter :Byte;implementation{$R *.DFM}procedure MovingDots(X,Y: Integer; TheCanvas: TCanvas); stdcall;
    begin
      Counter := Counter shl 1;              // Shift the bit left one
      if Counter = 0 then Counter := 1;      // If it shifts off left, reset it
      if (Counter and 224) > 0 then          // Are any of the left 3 bits set?
        TheCanvas.Pixels[X,Y] :=clBtnFace   // Erase the pixel
      else
        TheCanvas.Pixels[X,Y] :=clBlack;    // Draw the pixel
    end;procedure TForm1.Timer1Timer(Sender: TObject);
    begin
      LineDDA(30,30,200,30,@MovingDots,LongInt(Canvas));
      LineDDA(200,30,200,150,@MovingDots,LongInt(Canvas));
      LineDDA(200,150,30,150,@MovingDots,LongInt(Canvas));
      LineDDA(30,150,30,30,@MovingDots,LongInt(Canvas));
    end;以上的LineDDA就是我们说得内部函数,而它调用的MovingDots就是自己定义的外部函数,
    也就是回调函数
      

  3.   

    利用SocketConnection实现的回调例程谁能贴出来!
      

  4.   

    SocketConnection不支持回调,DcomConnection可以