From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- vstdlib/xbox/___FirstModule.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vstdlib/xbox/___FirstModule.cpp (limited to 'vstdlib/xbox/___FirstModule.cpp') diff --git a/vstdlib/xbox/___FirstModule.cpp b/vstdlib/xbox/___FirstModule.cpp new file mode 100644 index 0000000..f37a6e9 --- /dev/null +++ b/vstdlib/xbox/___FirstModule.cpp @@ -0,0 +1,19 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// MUST BE THE FIRST MODULE IN THE LINK PROCESS TO ACHIEVE @1 +// +// This is a 360 specific trick to force this import library and the new 360 +// link option /AUTODEF to put CreateInterface at @1 (360 lacks named exports) and +// first in sequence. Otherwise, the valve interface techique that does a +// GetProcAddress( @1 ) gets the wrong function pointer. All other exported +// functions can appear in any order, but the oridnals should be autogened sequential. +//===========================================================================// + +#include "tier1/tier1.h" + +// Should be the first function that the linker 'sees' as an export +void* CreateInterfaceThunk( const char *pName, int *pReturnCode ) +{ + // descend into the real function + return CreateInterface( pName, pReturnCode ); +} -- cgit v1.2.3