22 May '13 - 17:11 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Can't initialize BASS  (Read 1580 times)
Beatfox
Posts: 6


« on: 13 Jun '01 - 22:37 »
Reply with quoteQuote

I'm modifying a program that came with VC++, and I'm trying to use BASS (0.9) in it, but I can't get it to initialize for some reason.  It gives an Unknown Error (eek).  Can anyone figure out what might be wrong?  I have the source stuff here:
http://www.beatfox.com/sonic_midimon.zip

Just unzip it into an empty folder and open "sonic midimon.dsw" -- everything should be set up there.  BASS_Init is called in BGM::Init (in bgm.cpp), which is called in WinMain (in midimon.cpp).

I compiled the Basstest program that comes with BASS, and that ran just fine.  In both Basstest and my program, BASS_Init is one of the first things that's called (as far as I can tell -- I'm still not very experienced in VC++ and Windows programming).  So where might the problem be?
Logged
Ian @ un4seen
Administrator
Posts: 15266


« Reply #1 on: 14 Jun '01 - 01:08 »
Reply with quoteQuote

The problem is you have not created the application's window before calling BASS_Init, so hMainWnd = 0 when you make the BASS_Init call.
Logged
Beatfox
Posts: 6


« Reply #2 on: 14 Jun '01 - 01:47 »
Reply with quoteQuote

Ah yes, that was indeed the problem -- thanks for pointing that out!  I guess I've still got a long way to go with Windows programming Roll Eyes
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines