int pidbufl;
static int MS_CALLBACK slg_write(BIO *b, char *in, int inl)	{	int ret= inl;	char* buf= in;	char* pp;#if defined(WIN32)	LPTSTR lpszStrings[2];	WORD evtype= EVENTLOG_ERROR_TYPE;	int pid = _getpid();	char pidbuf[20];	int pidbufl;#else	int priority;#endif	if((buf= (char *)Malloc(inl+ 1)) == NULL){		return(0);	}	strncpy(buf, in, inl);	buf[inl]= '\0';#if defined(WIN32)	if(strncmp(buf, "ERR ", 4) == 0){		evtype= EVENTLOG_ERROR_TYPE;		pp= buf+ 4;	}else if(strncmp(buf, "WAR ", 4) == 0){		evtype= EVENTLOG_WARNING_TYPE;		pp= buf+ 4;	}else if(strncmp(buf, "INF ", 4) == 0){		evtype= EVENTLOG_INFORMATION_TYPE;		pp= buf+ 4;	}else{		evtype= EVENTLOG_ERROR_TYPE;		pp= buf;	}	sprintf(pidbuf, "[%d] ", pid);	lpszStrings[0] = pidbuf;	lpszStrings[1] = pp;	if(b->ptr)		ReportEvent(b->ptr, evtype, 0, 1024, NULL, 2, 0,				lpszStrings, NULL);#else	if(strncmp(buf, "ERR ", 4) == 0){		priority= LOG_ERR;		pp= buf+ 4;	}else if(strncmp(buf, "WAR ", 4) == 0){		priority= LOG_WARNING;		pp= buf+ 4;	}else if(strncmp(buf, "INF ", 4) == 0){		priority= LOG_INFO;		pp= buf+ 4;	}else{		priority= LOG_ERR;		pp= buf;	}	syslog(priority, "%s", pp);#endif	Free(buf);	return(ret);	}