FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC Sound on Pocket PC
Posts: 48
Joined: Sun Oct 30, 2005 09:29 AM
Sound on Pocket PC
Posted: Sun Aug 02, 2009 08:14 AM
Hello all,

I would like to play a wav file to give different sounds for various purposes and to replace the PC sound which is not very "attractive".

I tried to use the following function:
Code (fw): Select all Collapse
#define SND_SYNC      0
#define SND_ASYNC     1
SndPlaySound("\Start.wav",SND_ASYNC)


But it doesn't seem to be supporrted as I get the following message:

Fmesure.obj : error LNK2001: unresolved external symbol HB_FUN_SNDPLAYSOUND

Can someone tell me how I can overcome this problem?

Many thanks in advance,
Raymond Fischbach
www.mouches.org
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Sound on Pocket PC
Posted: Sun Aug 02, 2009 01:46 PM
Code (fw): Select all Collapse
#pragma BEGINDUMP

#include "windows.h"
#include "mmsystem.h"
#include "hbapi.h"


LPWSTR AnsiToWide( LPSTR );


HB_FUNC( SNDPLAYSOUND )
{
    LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
    hb_retnl( sndPlaySound( pW, hb_parni( 2 ) ) );
    hb_xfree( pW );
}

#pragma ENDDUMP


EMG
Posts: 48
Joined: Sun Oct 30, 2005 09:29 AM
Re: Sound on Pocket PC
Posted: Sun Aug 02, 2009 02:57 PM

Hello Enrico,

Once more you give me the right information.
It works perfectly.

Thank you,
Raymond

Raymond Fischbach
www.mouches.org

Continue the discussion