Francois Gouget wrote:
>
> The first example in Programming Windows 95 is the 'hellowin'
> program. It display 'Hello Windows 95' and plays a wave file saying it.
>
> It works just fine in Wine but in Winelib there is no sound (and
> the program dies). So I investigated a bit and found that the winmm
> library is not initialized in Winelib mode: i.e. WINMM_LibMain is not
> called.
>
> Before I investigate more:
> - is this a (well) known problem? (somehow it feels like it)
> - any hint as to where the source of the problem might be
> (files/functions I should look at)
> - could it be the way I generate the winelib executable?
it's simply because your program doesn't import the WINMM DLL.
the .exe file has in its DLL import table WINMM.DLL, so WINMM.DLL is loaded
when .exe is loaded
to do the same thing on a winelib program, add an import directive to the
winelib .spec file
name your_petzold_program
mode guiexe
type win32
init WinMain
import WINMM.DLL
by default a winelib program only loads kernel, user, and gdi. if you need
any other lib (winmm, comctl, comdlg, shell...), you should import them
this may
it seems that you'd need to extend your makefile/ .spec file generator
HTH
A+
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle