NetMsg Sample: Displaying Error Text

Click to open or copy the files for the NetMsg sample.

This sample illustrates how to display error text associated with networking-related error codes, in addition to displaying error text associated with system related error codes.

If the supplied error number is in a specific range, the Netmsg.dll message module is loaded and used to look up the specified error number with the FormatMessage Win32 API.

Building SDK Samples

This sample uses the following keywords:

atoi; displayerrortext; formatmessagea; fprintf; freelibrary; getstdhandle; loadlibraryex; localfree; makelangid; text; writefile