DrJeseuss Posted November 16, 2011 Share 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. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 16, 2011 Share 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 Link to comment Share on other sites More sharing options...
DrJeseuss Posted November 16, 2011 Author Share 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now