Also: There have been other ocassions where getlasterror_() helped significantly.
im not doubting the usefulness of GetLastError_(), but only when you have control over it between each individual winapi call.
Also: If internally, one of a multi-winapi call of a PB function should fail, I'd expect the function to fail at that call, with LastError set correspondingly. Why should the PB function execute subsequent winapi calls after the failed winapi call and thus possibly reset LastError ?
who said anything about executing a subsequent function after a failure? some of the error codes are very cryptic, and unless you know the name of the function that caused it, you wont get far. by looking at the name of a pb function, you can pretty easily figure out the main winapi function thats being used internally. but that function might not be the one causing that error. it may be a function thats not that obvious, and is being called before or after the obvious one. in order for that error code to be useful, pb would also need to tell you which winapi function caused it. but then again pb could tell you all the winapi functions its using, or even better, make the whole language open source.
also some of the uninit winapi functions inside the pb function could overwrite the error code. so if you want this to work reliably, fred would have to add GetLastError_() between every single winapi call and preserve the results in case you want to debug them.
c ya,
nco2k