DrJeseuss 0 Posted November 16, 2011 Has anyone had experience using _WinNet_GetLastError? I'm trying to get extended error info for an FTP error I'm receiving. See my other post for details of this:If anyone can show an example of this command's usage, or at least explain the syntax beyond what the help shows I'd greatly appreciate it! I can figure it out as the ByRefs are what I'd expect the Return values to be, but the command appears to use them as inputs, not outputs. Share this post Link to post Share on other sites
AdmiralAlkex 125 Posted November 16, 2011 (edited) Why do you think they are inputs?Look at the actual code, only $iError is used in the DllCall() so it's the only one that could be an input, but if you lookup the function on MSDN, it's clearly just a output.I don't really like how the function is written, but it should work.Local $iErrorCode, $sErrorString, $sNetworkProvider _WinNet_GetLastError($iErrorCode, $sErrorString, $sNetworkProvider) MsgBox(0, "Error code is", $iErrorCode) ;etc... Edited November 16, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
DrJeseuss 0 Posted November 16, 2011 Admiral, I see my mistake with this. In my previous attempts to use this call I failed to declare the vars first and in frustration did not look closely at the error, which is ironic as I'm trying to get my own app to provide clear errors... though it appears I don't read them always. I'll give this a shot the next time I'm able. Thanks for the second pair of eyes! Share this post Link to post Share on other sites