mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
1
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include <stdio.h>
|
||||
#include "tier1/interface.h"
|
||||
#include "ilaunchabledll.h"
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
const char *pModuleName = "vtex_dll.dll";
|
||||
|
||||
CSysModule *pModule = Sys_LoadModule( pModuleName );
|
||||
if ( !pModule )
|
||||
{
|
||||
printf( "Can't load %s.", pModuleName );
|
||||
return 1;
|
||||
}
|
||||
|
||||
CreateInterfaceFn fn = Sys_GetFactory( pModule );
|
||||
if ( !fn )
|
||||
{
|
||||
printf( "Can't get factory from %s.", pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
ILaunchableDLL *pInterface = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, NULL );
|
||||
if ( !pInterface )
|
||||
{
|
||||
printf( "Can't get '%s' interface from %s.", LAUNCHABLE_DLL_INTERFACE_VERSION, pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
int iRet = pInterface->main( argc, argv );
|
||||
Sys_UnloadModule( pModule );
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user