Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include <stdio.h>
  8. #include "tier1/interface.h"
  9. #include "ilaunchabledll.h"
  10. #include "tier2/tier2.h"
  11. int main( int argc, char **argv )
  12. {
  13. InitCommandLineProgram( argc, argv );
  14. const char *pModuleName = "vtex_dll.dll";
  15. CSysModule *pModule = Sys_LoadModule( pModuleName );
  16. if ( !pModule )
  17. {
  18. printf( "Can't load %s.", pModuleName );
  19. return false;
  20. }
  21. CreateInterfaceFn fn = Sys_GetFactory( pModule );
  22. if ( !fn )
  23. {
  24. printf( "Can't get factory from %s.", pModuleName );
  25. Sys_UnloadModule( pModule );
  26. return false;
  27. }
  28. ILaunchableDLL *pInterface = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, NULL );
  29. if ( !pInterface )
  30. {
  31. printf( "Can't get '%s' interface from %s.", LAUNCHABLE_DLL_INTERFACE_VERSION, pModuleName );
  32. Sys_UnloadModule( pModule );
  33. return false;
  34. }
  35. int iRet = pInterface->main( argc, argv );
  36. Sys_UnloadModule( pModule );
  37. return iRet;
  38. }