Moved GetLastErrorString to ntservice.c. I missed it before, thought it

was unused but it's needed in ntservice.c
This commit is contained in:
Howard Chu 2000-05-12 23:53:14 +00:00
parent 58cede64c1
commit 237b00049a
2 changed files with 17 additions and 28 deletions

View File

@ -83,30 +83,3 @@ char *ber_pvt_wsa_err2string( int err )
}
#undef __RETSTR
#if 0 /* No one seems to be using these */
char *ber_pvt_wsa_last_errstring( void )
{
return ber_pvt_wsa_err2string( WSAGetLastError() );
}
#include <windows.h>
char *GetErrorString( int err )
{
static char msgBuf[1024];
FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
msgBuf, 1024, NULL );
return msgBuf;
}
char *GetLastErrorString( void )
{
return GetErrorString( GetLastError() );
}
#endif

View File

@ -43,7 +43,6 @@ ldap_pvt_thread_t start_status_tid, stop_status_tid;
void (*stopfunc)(int);
/* in nt_err.c */
char *GetLastErrorString( void );
int srv_install(LPCTSTR lpszServiceName, LPCTSTR lpszDisplayName,
@ -429,4 +428,21 @@ void ReportSlapdShutdownComplete( )
}
}
char *GetErrorString( int err )
{
static char msgBuf[1024];
FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
msgBuf, 1024, NULL );
return msgBuf;
}
char *GetLastErrorString( void )
{
return GetErrorString( GetLastError() );
}
#endif