Einstieg.cpp 595 B

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