src/arch/platform.c
/*=================================================
 * GetWinSysError -- Get description of system error
 * returned value must be freed with LocalAlloc
 *===============================================*/
- Get description of system error
returned value must be freed with LocalAlloc
- Get description of system error returned value must be freed with LocalAlloc
static const char *
GetWinSysError (INT nerr)
{
	const char * str = 0;
	LPVOID lpMsgBuf;
	if (FormatMessage( 
		FORMAT_MESSAGE_ALLOCATE_BUFFER | 
		FORMAT_MESSAGE_FROM_SYSTEM | 
		FORMAT_MESSAGE_IGNORE_INSERTS,
		NULL,
		nerr,
		0, 
		(LPTSTR) &lpMsgBuf,
		0,
		NULL 
		))
	{
		str = (LPCTSTR)lpMsgBuf;
	}
	return str;
}
static const char * GetWinSysError ( INT nerr ) { const char * str = 0 ; LPVOID lpMsgBuf ; if ( FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS , NULL , nerr , 0 , ( LPTSTR ) & lpMsgBuf , 0 , NULL ) ) { str = ( LPCTSTR ) lpMsgBuf ; } return str ; }
GetWinSysError -- Get description of system error
 returned value must be freed with LocalAlloc
GetWinSysError -- Get description of system error returned value must be freed with LocalAlloc
/* Get user language description of error, if available */ /* Default language */ /* caller must call LocalFree on string */