Page 1 of 1

Convert kitchen-screen VB.NET to FWH

Posted: Sat Dec 08, 2007 4:50 pm
by Otto
Convert VB.NET to FWH

Hello Antonio,

I am trieing to convert my kitchen screen to Fivewin. Now I have problems with playing wav-files.
The kitchen screen has for each meal a wav-file and plays this file to announce the order.

The error is on loading MMSYSTEM.DLL .
This runs on a VISTA PC.

Regards,
Otto

Image

Posted: Sat Dec 08, 2007 6:31 pm
by Antonio Linares
Otto,

Code: Select all

#include "FiveWin.ch"

function Main()

   SndPlaySound( "test.wav" )

return nil

DLL FUNCTION SndPlaySound( cFile AS LPSTR, nType AS WORD ) AS BOOL ;
  PASCAL FROM "sndPlaySoundA" LIB "WINMM.DLL"

Posted: Sat Dec 08, 2007 7:26 pm
by driessen
Antonio,

I use SndPlaySound() in my application, but I don't have DLL FUNCTION SndPlaySound().

Why is that ? Difference between Harbour and xHarbour ?

Thanks.

Posted: Sat Dec 08, 2007 7:47 pm
by Antonio Linares
Michel,

> Why is that ? Difference between Harbour and xHarbour ?

Its a difference between XP and Vista.

XP uses "MMSYSTEM.DLL" and Vista uses "WINMM.DLL"

Posted: Sat Dec 08, 2007 8:04 pm
by driessen
Antonio,

I habe FWH 7.12 and xHarbour Project Builder Nov. 2007. In my application SNDPLAYSOUND() is working fine on XP and on Vista.

So, to tell you the thruth : I don't understand.

Thanks anyway.

Posted: Sat Dec 08, 2007 8:12 pm
by Antonio Linares
Michel,

It may be a difference caused by the use of Borland C.

Here testing on Vista Ultimate, FWH SndPlaySound() does not work.
But the example code that I have posted is working fine.

Posted: Sat Dec 08, 2007 8:57 pm
by Otto
With WINMM.DLL it works on my VISTA business .
Thank you.
Best regards,
Otto