From e4e0e1c1894475a594fc361ec7d9ddc3b513a69e Mon Sep 17 00:00:00 2001 From: Pontus Fransson Date: Mon, 16 Dec 2013 19:58:31 +0100 Subject: [PATCH] Network - Fixed delay loading dll. --- Code/Network/NetworkAPI/NetworkAPI.vcxproj | 6 ++++- Code/Network/NetworkAPI/NetworkClient.cpp | 2 +- .../OysterNetworkClient/ClientMain.cpp | 8 ------ .../OysterNetworkClient.vcxproj | 27 +++++++++++-------- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Code/Network/NetworkAPI/NetworkAPI.vcxproj b/Code/Network/NetworkAPI/NetworkAPI.vcxproj index 78e11523..fe2f5c09 100644 --- a/Code/Network/NetworkAPI/NetworkAPI.vcxproj +++ b/Code/Network/NetworkAPI/NetworkAPI.vcxproj @@ -78,7 +78,7 @@ true C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) - C:\Program Files %28x86%29\Visual Leak Detector\lib\Win32;$(LibraryPath) + C:\Program Files %28x86%29\Visual Leak Detector\lib\Win64;$(LibraryPath) $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(SolutionDir)..\Bin\DLL\ $(ProjectName)_$(PlatformShortName)D @@ -88,12 +88,16 @@ $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(SolutionDir)..\Bin\DLL\ $(ProjectName)_$(PlatformShortName) + C:\Program Files %28x86%29\Visual Leak Detector\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath); + C:\Program Files %28x86%29\Visual Leak Detector\lib\Win32;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86); false $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(SolutionDir)..\Bin\DLL\ $(ProjectName)_$(PlatformShortName) + C:\Program Files %28x86%29\Visual Leak Detector\lib\Win64;$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSDK_LibraryPath_x64); + C:\Program Files %28x86%29\Visual Leak Detector\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath); diff --git a/Code/Network/NetworkAPI/NetworkClient.cpp b/Code/Network/NetworkAPI/NetworkClient.cpp index e99ab502..9fa033f1 100644 --- a/Code/Network/NetworkAPI/NetworkClient.cpp +++ b/Code/Network/NetworkAPI/NetworkClient.cpp @@ -236,7 +236,7 @@ void NetworkClient::Send(CustomProtocolObject& protocol) void NetworkClient::SetRecieverObject(RecieverObject recvObj, NetworkProtocolCallbackType type) { - if (type == NetworkProtocolCallbackType_Unknown) return; + if (type == NetworkProtocolCallbackType_Unknown) return; //It should probably still be set even if it is unknown. privateData->data->recvObjMutex.lock(); privateData->data->recvObj = recvObj; diff --git a/Code/Network/OysterNetworkClient/ClientMain.cpp b/Code/Network/OysterNetworkClient/ClientMain.cpp index 6191bf3d..a04294c6 100644 --- a/Code/Network/OysterNetworkClient/ClientMain.cpp +++ b/Code/Network/OysterNetworkClient/ClientMain.cpp @@ -1,22 +1,14 @@ #include -#include #include #include "../NetworkDependencies/WinsockFunctions.h" #include "..\NetworkDependencies\Protocols.h" #include "../NetworkDependencies/OysterByte.h" -#include "../../Misc/ThreadSafeQueue.h" -#include "../NetworkDependencies/ThreadedClient.h" #include "../../Misc/WinTimer.h" #include "../../Misc/Utilities.h" #include "../NetworkAPI/NetworkClient.h" -#pragma comment(lib, "ws2_32.lib") - using namespace std; -using namespace Oyster::Network::Protocols; using namespace Oyster::Network; -using namespace Utility; -using namespace Utility::DynamicMemory; void proc(CustomNetProtocol& protocol) { diff --git a/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj b/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj index 459c0513..81d1d6ee 100644 --- a/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj +++ b/Code/Network/OysterNetworkClient/OysterNetworkClient.vcxproj @@ -69,15 +69,15 @@ $(SolutionDir)..\Bin\Executable\ $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName)D - $(SolutionDir)..\External\Include\;$(IncludePath);$(IncludePath);C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) - $(OutDir)..\DLL\;$(LibraryPath);$(SolutionDir)..\External\Lib\NetworkAPI;C:\Program Files (x86)\Visual Leak Detector\lib\Win32 + C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) + $(LibraryPath);$(SolutionDir)..\External\Lib\NetworkAPI;C:\Program Files (x86)\Visual Leak Detector\lib\Win32;C:\Program Files %28x86%29\Visual Leak Detector\lib\Win32;$(OutDir)..\DLL\ $(SolutionDir)..\Bin\Executable\ $(SolutionDir)..\Obj\$(ProjectName)\$(PlatformShortName)\$(Configuration)\ $(ProjectName)_$(PlatformShortName) C:\Program Files %28x86%29\Visual Leak Detector\include;$(IncludePath) - C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath);$(OutDir)..\DLL\ + C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath);$(OutDir)..\DLL\;C:\Program Files %28x86%29\Visual Leak Detector\lib\Win32 $(SolutionDir)..\Bin\Executable\ @@ -99,11 +99,13 @@ Disabled true %(AdditionalIncludeDirectories) + _MBCS;%(PreprocessorDefinitions) true - NetworkAPI_$(PlatformShortName)D.dll - NetworkAPI_$(PlatformShortName)D.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + NetworkAPI_$(PlatformShortName)D.dll;%(DelayLoadDLLs) + NetworkAPI_$(PlatformShortName)D.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;%(AdditionalDependencies) + Console @@ -115,8 +117,9 @@ true - NetworkAPI_$(PlatformShortName)D.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - NetworkAPI_$(PlatformShortName)D.dll + NetworkAPI_$(PlatformShortName)D.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);delayimp.lib + NetworkAPI_$(PlatformShortName)D.dll;%(DelayLoadDLLs) + Console @@ -132,8 +135,9 @@ true true true - NetworkAPI_$(PlatformShortName).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - NetworkAPI_$(PlatformShortName).dll + NetworkAPI_$(PlatformShortName).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);delayimp.lib + NetworkAPI_$(PlatformShortName).dll;%(DelayLoadDLLs) + Console @@ -149,8 +153,9 @@ true true true - NetworkAPI_$(PlatformShortName).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - NetworkAPI_$(PlatformShortName).dll + NetworkAPI_$(PlatformShortName).lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);delayimp.lib + NetworkAPI_$(PlatformShortName).dll;%(DelayLoadDLLs) + Console