function Write_Socket(sockfd:TSocket; const s:string):Integer; 
//功能:将字符串S写入sockfd 
begin 
setwindowtext(win.hInfo,pchar(s)); 
Result:=Send(sockfd,pointer(s)^,Length(s),0) 
end; 问题:
1、setwindowtext(win.hInfo,pchar(s)); 里面的win.hInfo是什么意思?
2、帮忙解释一下Send(sockfd,pointer(s)^,Length(s),0) 这一行吧。
不好意思,菜鸟一个,对delphi和winsock都在学习当中...

解决方案 »

  1.   

    看MSDN,上面有API说明
    SetWindowText
    This function changes the text of the specified window’s title bar, if it has one. If the specified window is a control, the text of the control is changed. BOOL SetWindowText( 
    HWND hWnd, 
    LPCTSTR lpString ); 
      

  2.   

    win.hInfo 是个句柄?什么东西的句柄?
      

  3.   

    win.hInfo因该是Form的Handle,SetWindowText也既是像窗体的标题栏赋值
    Send应该是向sockfd传递字符串s
      

  4.   

    可是这段代码是在没有窗口的程序中啊?关键问题win.hInfo是干什么用的\?