Hi,
Has anyone ever tryed to implement the WinInet Api
"InternetGetLastResponseInfo"? I tried the code that you kindly gave me
to send files via FTP, but I have some trobles that I'm not able to
understand with the ftp server. Using the "by-hand" method (e.g. with
the FTP command) I don't have any problem, but when I use the windows
api, the server I'm connecting to responses with error code 12003
(extended information).
To retrieve these "extended information" I should call the
"InternetGetLastResponseInfo" API, I tryed to declare the DLLFunction,
but I'm not able to make it work! Any help? I'll be really grateful!

PS. The code for FTP works using a local-intranet machine configured as
ftp server,so it sholud be correct!

This is the declaration:

    _getExtendedError = new
DLLFunction(_winInet,"InternetGetLastResponseInfoA");
    _getExtendedError.returns(ExtTypes::DWord);
    _getExtendedError.arg(ExtTypes::Pointer);
    _getExtendedError.arg(ExtTypes::Pointer);
    _getExtendedError.arg(ExtTypes::Pointer);


This is the call:

str getExtendedError()
{
    int errLen=255;
    int error;
    binary _errBuff=new binary(errlen);

    int state;
    ;

    state=_getExtendedError.call(error,_errbuff,errlen);
    return _errBuff.string(0);
}


And these are the specifics for that API

InternetGetLastResponseInfo


Retrieves the last error description or server response on the thread
calling this function.

BOOL InternetGetLastResponseInfo(
  LPDWORD lpdwError,
  LPTSTR lpszBuffer,
  LPDWORD lpdwBufferLength
);


Parameters


      lpdwError
      [out] Pointer to a variable that receives an error message
pertaining to the operation that failed.
      lpszBuffer
      [out] Pointer to a buffer that receives the error text.
      lpdwBufferLength
      [in, out] Pointer to a variable that contains the size of the
lpszBuffer buffer, in TCHARs. When the function returns, this parameter
contains the size of the string written to the buffer, not including the
terminating zero.



[Non-text portions of this message have been removed]





Yahoo! Groups Links

Reply via email to