Einstieg.cpp 664 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifdef WIN32
  2. #include "Player.h"
  3. #include "Include/GSLDateiV.h"
  4. #else
  5. #include "Player.h"
  6. #include "GSLDateiV.h"
  7. #endif
  8. using namespace GSL;
  9. #ifdef WIN32
  10. extern GSLPlayer *_player;
  11. static int numInits = 0;
  12. int WINAPI DllMain( HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved )
  13. {
  14. switch( fdwReason )
  15. {
  16. case DLL_PROCESS_DETACH:
  17. delete _player;
  18. _player = 0;
  19. break;
  20. case DLL_PROCESS_ATTACH:
  21. _player = new GSLPlayer();
  22. return 1;
  23. }
  24. return 0;
  25. }
  26. #endif
  27. extern "C"
  28. {
  29. __declspec( dllexport ) GSLSoundV *getSound( SoundKopf &kpf )
  30. {
  31. return new GSLSound( kpf );
  32. }
  33. __declspec( dllexport ) GSLDateiV *getGSLDatei()
  34. {
  35. return new GSLDatei();
  36. }
  37. }