#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)
int ConnectWithTimeout (SOCKET sock,struct sockaddr *addr,int addrlen,struct timeval *timeout){ int nRet = 0; unsigned long nonblocking = 1; unsigned long blocking = 0; if(!timeout) return connect(sock, addr, addrlen); ioctlsocket(sock, FIONBIO, &nonblocking); if(conn...
void ReconfigureService(LPSTR lpServiceName, LPSTR lpDesc) { SC_HANDLE schSCManager = ::OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if(schSCManager != NULL) { //Need to acquire database lock before reconfiguring. SC_LOCK sclLock = LockServiceDatabase(sch...