Library SimpleDNSResolver![]()
[ Keywords | Classes | Data | Functions ]
Back to the top of SimpleDNSResolver
Back to the top of SimpleDNSResolver
Back to the top of SimpleDNSResolver
![]()
/* -----------------------------------------------------------------
Back to the top of SimpleDNSResolver
![]()
LPTSTR WindowsGetErrorText(DWORD dwErrorCode, LPTSTR lpszBuf, DWORD dwSize);
#include "WindowsErrorText.h"
Purpose: return the text for a given Windows Error Code
Parameters:
Description : This function is a wrapper for many error-handling functions from WIN32. It searches for error text in the following locations:
In the Operating System, using function FormatMessage (...FORMAT_MESSAGE_FROM_SYSTEM...)
| In an hard-coded table for Windows Socket (Winsock) error code (see function WindowsSocketGetErrorText())
| In specific modules, using function FormatMessage (...FORMAT_MESSAGE_FROM_HMODULE...):
|
In Extended Internet Errors, using function InternetGetLastResponseInfo()
| |
If no error text is found, this function still builds an error message with the format "Error Code 0x%X (%d)" (the error code is shown is hexadecimal and in decimal).
LPTSTR WindowsGetErrorText(DWORD dwErrorCode, LPTSTR lpszBuf, DWORD dwSize);
Back to the top of SimpleDNSResolver
![]()
DWORD WindowsSocketGetErrorText(DWORD dwErrorCode, LPTSTR *lplpszTemp);
#include "WindowsErrorText.h"
Purpose: return the clear-text message for a Windows Socket (winsock) error code.
Parameters:
Description : Winsock error codes cannot be correctly mapped to clear-text messages using WIN32 function FormatMessage (try it; you'll be surprised). This function uses an hard-coded table to map code to their real clear-text messages.
The calling application must free the string allocated in variable lplpszTemp (using WIN32 function LocalFree()).
DWORD WindowsSocketGetErrorText(DWORD dwErrorCode, LPTSTR *lplpszTemp);
Back to the top of SimpleDNSResolver
![]()
Report problems to jkotula@stratasys.com