Newbie Spellweaver
- Joined
- Sep 28, 2015
- Messages
- 56
- Reaction score
- 5
Trying to build MSafeUDP but getting this error
The code line.
When I only try to build the matchserver I get this error.
Someone know the fix for this?
Posted in wrong section, my bad, can someone move the thread?
Code:
Error 11 error C2712: Cannot use __try in functions that require object unwinding c:\users\khuntjens.elitech\desktop\gunz\gunz 1.5 repack by jur13n #2 (clean)\clean source\safeudp\source\msafeudp.cpp 387 1 SafeUDP
The code line.
Code:
void MSocketThread::Run()
{
__try{
//throw(pThread);
while (true) { // Waiting for SafeUDP Settting...
DWORD dwVal = WaitForSingleObject(m_KillEvent.GetEvent(), 100);
if (dwVal == WAIT_OBJECT_0) {
return;
}
else if (dwVal == WAIT_TIMEOUT) {
if (m_pSafeUDP)
break;
}
}
WSAEVENT EventArray[WSA_MAXIMUM_WAIT_EVENTS];
WORD wEventIndex = 0;
bool bSendable = false;
WSANETWORKEVENTS NetEvent;
WSAEVENT hFDEvent = WSACreateEvent();
EventArray[wEventIndex++] = hFDEvent;
EventArray[wEventIndex++] = m_ACKEvent.GetEvent();
EventArray[wEventIndex++] = m_SendEvent.GetEvent();
EventArray[wEventIndex++] = m_KillEvent.GetEvent();
WSAEventSelect(m_pSafeUDP->GetLocalSocket(), hFDEvent, FD_READ | FD_WRITE);
while (TRUE) {
DWORD dwReturn = WSAWaitForMultipleEvents(wEventIndex, EventArray, FALSE, SAFEUDP_SAFE_MANAGE_TIME, FALSE);
if (dwReturn == WSA_WAIT_TIMEOUT) { // Time
m_pSafeUDP->LockNetLink();
SafeSendManage();
m_pSafeUDP->UnlockNetLink();
}
else if (dwReturn == WSA_WAIT_EVENT_0) { // Socket Event
WSAEnumNetworkEvents(m_pSafeUDP->GetLocalSocket(), hFDEvent, &NetEvent);
if ((NetEvent.lNetworkEvents & FD_READ) == FD_READ) {
// OutputDebugString("SUDP> FD_READ \n");
m_pSafeUDP->LockNetLink();
Recv();
m_pSafeUDP->UnlockNetLink();
}
if ((NetEvent.lNetworkEvents & FD_WRITE) == FD_WRITE) {
bSendable = true;
// OutputDebugString("SUDP> FD_WRITE \n");
}
}
else if (dwReturn == WSA_WAIT_EVENT_0 + 1) { // ACK Send Event
// OutputDebugString("SUDP> ACK_EVENT \n");
FlushACK();
}
else if (dwReturn == WSA_WAIT_EVENT_0 + 2) { // Packet Send Event
// OutputDebugString("SUDP> SEND_EVENT \n");
if (bSendable == true)
FlushSend();
}
else if (dwReturn == WSA_WAIT_EVENT_0 + 3) { // Kill the Thread
break; // Stop Thread
}
}
WSACloseEvent(hFDEvent);
// Clear Queues
LockSend();
{
for (SendListItor itor = m_SendList.begin(); itor != m_SendList.end();) {
delete (*itor);
itor = m_SendList.erase(itor);
}
}
{
for (SendListItor itor = m_TempSendList.begin(); itor != m_TempSendList.end();) {
delete (*itor);
itor = m_TempSendList.erase(itor);
}
}
UnlockSend();
LockACK();
{
for (ACKSendListItor itor = m_ACKSendList.begin(); itor != m_ACKSendList.end();) {
delete (*itor);
itor = m_ACKSendList.erase(itor);
}
}
{
for (ACKSendListItor itor = m_TempACKSendList.begin(); itor != m_TempACKSendList.end();) {
delete (*itor);
itor = m_TempACKSendList.erase(itor);
}
}
UnlockACK();
}
__except(this->CrashDump(GetExceptionInformation()))
{
#ifndef _PUBLISH
char szFileName[_MAX_DIR];
GetModuleFileName(NULL, szFileName, _MAX_DIR);
HANDLE hProcess = MProcessController::OpenProcessHandleByFilePath(szFileName);
TerminateProcess(hProcess, 0);
#endif
}
}
When I only try to build the matchserver I get this error.
Code:
Error 13 error C2712: Cannot use __try in functions that require object unwinding c:\users\khuntjens.elitech\desktop\gunz\gunz 1.5 repack by jur13n #2 (clean)\clean source\safeudp\source\msafeudp.cpp 387 1 SafeUDP
Error 14 error LNK1181: cannot open input file 'C:\Users\khuntjens.ELITECH\Desktop\Gunz\Gunz 1.5 Repack by Jur13n #2 (Clean)\Clean source\SafeUDP\lib\SafeUDPd.lib' C:\Users\khuntjens.ELITECH\Desktop\Gunz\Gunz 1.5 Repack by Jur13n #2 (Clean)\Clean source\MatchServer\LINK MatchServer
Someone know the fix for this?
Posted in wrong section, my bad, can someone move the thread?
Last edited: