各位:有没有关于 WSAIoctl 的使用方法?我找了DELPHI里面没有关于此的定义,从VC中得到定义:
int WSAIoctl(
  SOCKET s,
  DWORD dwIoControlCode,
  LPVOID lpvInBuffer,
  DWORD cbInBuffer,
  LPVOID lpvOutBuffer,
  DWORD cbOutBuffer,
  LPDWORD lpcbBytesReturned,
  LPWSAOVERLAPPED lpOverlapped,
  LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
); 却不知道每个参数的具体结构?有没谁写过这方面的程序,望告之,不胜感谢!

解决方案 »

  1.   

    WSAIoctl
    The Windows Sockets WSAIoctl function controls the mode of a socket.int WSAIoctl (
      SOCKET s,                                               
      DWORD dwIoControlCode,                                  
      LPVOID lpvInBuffer,                                     
      DWORD cbInBuffer,                                       
      LPVOID lpvOUTBuffer,                                    
      DWORD cbOUTBuffer,                                      
      LPDWORD lpcbBytesReturned,                              
      LPWSAOVERLAPPED lpOverlapped,                           
      LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionROUTINE  
    );
     
    Parameters

    [in] A descriptor identifying a socket. 
    dwIoControlCode 
    [in] The control code of operation to perform. 
    lpvInBuffer 
    [in] A pointer to the input buffer. 
    cbInBuffer 
    [in] A number indicating the size of the input buffer. 
    lpvOutBuffer 
    [out] A pointer to the output buffer. 
    cbOutBuffer 
    [in] A number indicating the size of the output buffer. 
    lpcbBytesReturned 
    [out] A pointer to actual number of bytes of output. 
    lpOverlapped 
    [in] A pointer to a WSAOVERLAPPED structure (ignored for non-overlapped sockets). 
    lpCompletionRoutine 
    [in] A pointer to the completion routine called when the operation has been completed (ignored for non-overlapped sockets).
      

  2.   

    谢谢linx88(haozi) ,不过你给的我都知道。关键是里面的参数结构我得不到。不过现在已经有了。