rapid7/metasploit-framework — pull request #740 by dmaloney-r7 (2012-08-29 22:19:43+00:00)
Title: Feature/railgun/error msg

This pull request adds the actual text represented by the GetLastError code. it is included in the return hash under ErrorMessage. It works in 32 and 64 bit.
Also, it will look for the error message in the specific module being called by Railgun, if it doesn't find the erro code defined in an error table inside that module it then reverts to looking it up in the system error table. This means that DLL specific error codes should still return the correct result.