Guest User

Untitled

a guest
Jan 21st, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <windows.h>
  2. #include <stdio.h>
  3.  
  4. #include "DummyWindow.h"
  5. #include "WinampShiz.h"
  6.  
  7. int main( const int count, const char* const* const pszCommandLine )
  8. {
  9.     const char* dllPath = pszCommandLine[ 0 ];
  10.     if( count > 1 )
  11.     {
  12.         dllPath = pszCommandLine[ 1 ];
  13.     }
  14.    
  15.     HMODULE hmod = LoadLibraryA( dllPath );
  16.  
  17.     winampVisHeader* (*pfn)() = reinterpret_cast< winampVisHeader* (*)() >( GetProcAddress( hmod, "winampVisGetHeader" ) );
  18.  
  19.     winampVisHeader& hdr = *pfn();
  20.     winampVisModule& mod = *( hdr.getModule( 0 ) );
  21.     mod.hwndParent = createDummyWindow();
  22.     mod.hDllInstance = hmod;
  23.     mod.Init(&mod);
  24.  
  25.     while( true )
  26.     {
  27.         mod.Render(&mod);
  28.         Sleep( 50 );
  29.     }
  30.     return 0;
  31. }
Add Comment
Please, Sign In to add comment