char array[100] = {0x80, 8, 0xff, 0x7f, 2, 0x27};iResult = ::send(sock, array, 8, 0); if (iResult == SOCKET_ERROR) { return getLastErrorAsString(); } iResult = shutdown(sock, SD_SEND); iResult = ::recv(sock, array, 100, 0);
WriteFile(port, array, 2,&BytesCnt,NULL); ReadFile(port, &array[2], 34, &BytesCnt, NULL);