Hi, I’m trying to compile a blueprint plugin that uses winsock.
Here’s the code in the constructor:
WSADATA wsa;
//Initialise winsock
printf("\nInitialising Winsock...");
if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0)
{
printf("Failed. Error Code : %d", WSAGetLastError());
return;
exit(EXIT_FAILURE);
}
printf("Initialised.\n");
//create socket
if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == SOCKET_ERROR)
{
printf("socket() failed with error code : %d", WSAGetLastError());
exit(EXIT_FAILURE);
}
slen = sizeof(si_other);
//setup address structure
memset((char *)&si_other, 0, sizeof(si_other));
si_other.sin_family = AF_INET;
si_other.sin_port = htons(PORT);
si_other.sin_addr.S_un.S_addr = inet_addr(SERVER);
The error is:
UE4Editor-Cmd: [2017.08.28-13.41.42:616][ 0]LogWindows:Error: begin: stack for UAT
UE4Editor-Cmd: [2017.08.28-13.41.42:617][ 0]LogWindows:Error: === Critical error: ===
UE4Editor-Cmd: [2017.08.28-13.41.42:628][ 0]LogWindows:Error:
UE4Editor-Cmd: [2017.08.28-13.41.42:639][ 0]LogWindows:Error: Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp] [Line: 83]
UE4Editor-Cmd: [2017.08.28-13.41.42:649][ 0]LogWindows:Error: SECURE CRT: Invalid parameter detected.
UE4Editor-Cmd: [2017.08.28-13.41.42:660][ 0]LogWindows:Error: Expression: Unknown Function: Unknown. File: Unknown Line: 0
Can someone help?
Thank you.