Sound on Pocket PC

Post Reply
User avatar
Raymond Fischbach
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium
Contact:

Sound on Pocket PC

Post by Raymond Fischbach »

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: Select all

#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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Sound on Pocket PC

Post by Enrico Maria Giordano »

Code: Select all

#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
User avatar
Raymond Fischbach
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium
Contact:

Re: Sound on Pocket PC

Post by Raymond Fischbach »

Hello Enrico,

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

Thank you,
Raymond
Raymond Fischbach
www.mouches.org
Post Reply