Page 1 of 1

Sound on Pocket PC

PostPosted: Sun Aug 02, 2009 8:14 am
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  Expand view

#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,

Re: Sound on Pocket PC

PostPosted: Sun Aug 02, 2009 1:46 pm
by Enrico Maria Giordano
Code: Select all  Expand view
#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

Re: Sound on Pocket PC

PostPosted: Sun Aug 02, 2009 2:57 pm
by Raymond Fischbach
Hello Enrico,

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

Thank you,
Raymond