Has anyone used or have a an example of the GetLastError function passing the error code to the FormatMessage function and producing an error message? The GetLastError function is very straight forward, but I'm having a hard time working with the FormatMessage function due to the way you must identify a buffer to store the error message in and then point to that buffer. Any help would be appreciated. Thanks.