Skip to content

Commit

Permalink
Merge pull request #86 from Xottab-DUTY/dll_suffix
Browse files Browse the repository at this point in the history
Remove ".dll" suffix from LoadModule calls. Close #78.
  • Loading branch information
Pavel Kovalenko committed Nov 20, 2015
2 parents c9d84c1 + 9b789e6 commit c6387d7
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/Layers/xrRender/HW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ void CHW::CreateD3D ()
//#ifndef DEDICATED_SERVER
// LPCSTR _name = "d3d9.dll";
//#else
// LPCSTR _name = "xrd3d9-null.dll";
// LPCSTR _name = "xrD3D9-Null";
//#endif

LPCSTR _name = "xrd3d9-null.dll";
LPCSTR _name = "xrD3D9-Null";

#ifndef _EDITOR
if (!g_dedicated_server)
Expand Down
4 changes: 2 additions & 2 deletions src/editors/ECore/Editor/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ void CEngine::Initialize(void)
#ifdef _EDITOR
// Bind PSGP
ZeroMemory (&PSGP,sizeof(PSGP));
hPSGP = LoadLibrary("xrCPU_Pipe.dll");
R_ASSERT2 (hPSGP,"Can't find 'xrCPU_Pipe.dll'");
hPSGP = LoadLibrary("xrCPU_Pipe");
R_ASSERT2 (hPSGP,"Can't find 'xrCPU_Pipe'");

xrBinder* bindCPU = (xrBinder*)GetProcAddress(hPSGP,"xrBind_PSGP"); R_ASSERT(bindCPU);
bindCPU (&PSGP, CPU::ID.feature /*& CPU::ID.os_support*/);
Expand Down
2 changes: 1 addition & 1 deletion src/editors/LevelEditor/Edit/ESceneSpawnTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "EditLibrary.h"

static HMODULE hXRSE_FACTORY = 0;
static LPCSTR xrse_factory_library = "xrSE_Factory.dll";
static LPCSTR xrse_factory_library = "xrSE_Factory";
static LPCSTR create_entity_func = "_create_entity@4";
static LPCSTR destroy_entity_func = "_destroy_entity@4";
Tcreate_entity create_entity;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xrAI/xrAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
Debug._initialize (false);
Core._initialize ("xrai",0);
HMODULE hFactory;
LPCSTR g_name = "xrSE_Factory.dll";
LPCSTR g_name = "xrSE_Factory";
Log ("Loading DLL:",g_name);
hFactory = LoadLibrary (g_name);
if (0==hFactory) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xrLC/xrLC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void Startup(LPSTR lpCmdLine)
if (bModifyOptions)
{
Logger.Phase("Project options...");
HMODULE L = LoadLibrary ("xrLC_Options.dll");
HMODULE L = LoadLibrary ("xrLC_Options");
void* P = GetProcAddress (L,"_frmScenePropertiesRun");
R_ASSERT (P);
xrOptions* O = (xrOptions*)P;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/xrSE_Factory/properties_list_helper_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef IPropHelper& (__stdcall *TPHelper) ();

TPHelper _PHelper = 0;
HMODULE prop_helper_module = 0;
LPCSTR prop_helper_library = "xrEPropsB.dll", prop_helper_func = "PHelper";
LPCSTR prop_helper_library = "xrEPropsB", prop_helper_func = "PHelper";
CScriptPropertiesListHelper *g_property_list_helper = 0;

void load_prop_helper ()
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/xrCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void xrCore::_initialize(LPCSTR _ApplicationName, LogCallback cb, BOOL init_fs,
string_path fn, dr, di;

// application path
GetModuleFileName(GetModuleHandle(MODULE_NAME), fn, sizeof(fn));
GetModuleFileName(GetModuleHandle("xrCore"), fn, sizeof(fn));
_splitpath(fn, dr, di, 0, 0);
strconcat(sizeof(ApplicationPath), ApplicationPath, dr, di);
#ifndef _EDITOR
Expand Down
1 change: 0 additions & 1 deletion src/xrCore/xrCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
#endif

#include <time.h>
#define MODULE_NAME "xrCore.dll"

// Warnings
#pragma warning (disable : 4251 ) // object needs DLL interface
Expand Down
4 changes: 2 additions & 2 deletions src/xrEngine/Device_Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ extern LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
#ifdef INGAME_EDITOR
void CRenderDevice::initialize_editor()
{
m_editor_module = LoadLibrary("xrWeatherEditor.dll");
m_editor_module = LoadLibrary("xrWeatherEditor");
if (!m_editor_module)
{
Msg("! cannot load library \"xrWeatherEditor.dll\"");
Msg("! cannot load library \"xrWeatherEditor\"");
return;
}
m_editor_initialize = (initialize_function_ptr)GetProcAddress(m_editor_module, "initialize");
Expand Down
18 changes: 9 additions & 9 deletions src/xrEngine/EngineAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ bool is_enough_address_space_available()

void CEngineAPI::InitializeNotDedicated()
{
LPCSTR r2_name = "xrRender_R2.dll";
LPCSTR r3_name = "xrRender_R3.dll";
LPCSTR r4_name = "xrRender_R4.dll";
LPCSTR r2_name = "xrRender_R2";
LPCSTR r3_name = "xrRender_R3";
LPCSTR r4_name = "xrRender_R4";

if (psDeviceFlags.test(rsR4))
{
Expand Down Expand Up @@ -110,7 +110,7 @@ void CEngineAPI::Initialize(void)
{
//////////////////////////////////////////////////////////////////////////
// render
LPCSTR r1_name = "xrRender_R1.dll";
LPCSTR r1_name = "xrRender_R1";

#ifndef DEDICATED_SERVER
InitializeNotDedicated();
Expand All @@ -132,7 +132,7 @@ void CEngineAPI::Initialize(void)
}
// game
{
LPCSTR g_name = "xrGame.dll";
LPCSTR g_name = "xrGame";
Log("Loading DLL:", g_name);
hGame = LoadLibrary(g_name);
if (0 == hGame) R_CHK(GetLastError());
Expand All @@ -148,7 +148,7 @@ void CEngineAPI::Initialize(void)
tune_enabled = FALSE;
if (strstr(Core.Params, "-tune"))
{
LPCSTR g_name = "vTuneAPI.dll";
LPCSTR g_name = "vTuneAPI";
Log("Loading DLL:", g_name);
hTuner = LoadLibrary(g_name);
if (0 == hTuner) R_CHK(GetLastError());
Expand Down Expand Up @@ -197,9 +197,9 @@ void CEngineAPI::CreateRendererList()
bool bSupports_r3 = false;
bool bSupports_r4 = false;

LPCSTR r2_name = "xrRender_R2.dll";
LPCSTR r3_name = "xrRender_R3.dll";
LPCSTR r4_name = "xrRender_R4.dll";
LPCSTR r2_name = "xrRender_R2";
LPCSTR r3_name = "xrRender_R3";
LPCSTR r4_name = "xrRender_R4";

if (strstr(Core.Params, "-perfhud_hack"))
{
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/battleye_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ bool BattlEyeSystem::InitDLL( LPCSTR dll_name, string_path& out_file )
ft = fopen( out_file, "r" );
if( ft == NULL )
{
HMODULE h_game = GetModuleHandle("xrCore.dll");
HMODULE h_game = GetModuleHandle("xrCore");
R_ASSERT( h_game );

string_path cur_dir, full_dir;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_Available.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CGameSpy_Available::CGameSpy_Available()
{
m_hGameSpyDLL = NULL;
//-----------------------------------------------
LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_Browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CGameSpy_Browser::CGameSpy_Browser()
m_pGSBrowser = NULL;
m_pServerList = NULL;
//-------------------------
LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_Full.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CGameSpy_Full::~CGameSpy_Full()

void CGameSpy_Full::LoadGameSpy()
{
LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_GCD_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CGameSpy_GCD_Client::CGameSpy_GCD_Client()
{
m_hGameSpyDLL = NULL;

LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_GCD_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CGameSpy_GCD_Server::CGameSpy_GCD_Server()
{
m_hGameSpyDLL = NULL;

LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_HTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CGameSpy_HTTP::CGameSpy_HTTP()
m_hGameSpyDLL = NULL;
m_LastRequest = -1;

LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_Patching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CGameSpy_Patching::CGameSpy_Patching()
{
m_hGameSpyDLL = NULL;

LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/gamespy/GameSpy_QR2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CGameSpy_QR2::CGameSpy_QR2()
//-------------------------------
m_hGameSpyDLL = NULL;

LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
m_hGameSpyDLL = LoadLibrary (g_name);
if (0==m_hGameSpyDLL) R_CHK (GetLastError());
Expand Down
2 changes: 1 addition & 1 deletion src/xrGameSpy/GameSpy_Patching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CGameSpy_Patching::~CGameSpy_Patching()
};
void CGameSpy_Patching::LoadGameSpy()
{
LPCSTR g_name = "xrGameSpy.dll";
LPCSTR g_name = "xrGameSpy";
Log ("Loading DLL:",g_name);
hGameSpyDLL = LoadLibrary (g_name);
if (0==hGameSpyDLL) R_CHK (GetLastError());
Expand Down
26 changes: 12 additions & 14 deletions src/xrNetServer/NET_AuthCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,18 @@ void XRNETSERVER_API fill_auth_check_params(xr_auth_strings_t & ignore,
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_l85.dds")));
check.push_back (shared_str(FS.update_path(config, "$game_textures$", "wpn\\wpn_crosshair_rpg.dds")));

check.push_back (shared_str("xrd3d9-null.dll"));
check.push_back (shared_str("ode.dll"));
check.push_back (shared_str("xrcdb.dll"));
check.push_back (shared_str("xrcore.dll"));
// check.push_back (shared_str("xrcpu_pipe.dll"));
// check.push_back (shared_str("xrgame.dll"));
check.push_back (shared_str("xrgamespy.dll"));
check.push_back (shared_str("xrlua.dll"));
check.push_back (shared_str("xrnetserver.dll"));
check.push_back (shared_str("xrparticles.dll"));
check.push_back (shared_str("xrrender_r1.dll"));
check.push_back (shared_str("xrrender_r2.dll"));
check.push_back (shared_str("xrsound.dll"));
check.push_back (shared_str("xrxmlparser.dll"));
check.push_back (shared_str("xrD3D9-Null"));
check.push_back (shared_str("ODE"));
check.push_back (shared_str("xrCDB"));
check.push_back (shared_str("xrCore"));
// check.push_back (shared_str("xrGame"));
check.push_back (shared_str("xrGamespy"));
check.push_back (shared_str("xrNetserver"));
check.push_back (shared_str("xrParticles"));
check.push_back (shared_str("xrRender_R1"));
check.push_back (shared_str("xrRender_R2"));
check.push_back (shared_str("xrSound"));
check.push_back (shared_str("xrXMLParser"));
// check.push_back (shared_str("xrEngine.exe"));
}

Expand Down

0 comments on commit c6387d7

Please sign in to comment.