Salvador,
Prueba a cambiar esta línea:
pW3 = AnsiToWide( ( LPSTR ) LockResource( hglb ) );
por:
pW3 = AnsiToWide( ( LPSTR ) hglb );
I want the use wave files
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
De esta manera funciona:
Gracias.
De esta manera funciona:
Code: Select all
LPWSTR AnsiToWide( LPSTR );
HB_FUNC( PLAYSOUNDRESOURCE )
{
LPWSTR pW = AnsiToWide( hb_parc( 1 ) ) ;
hb_retl( PlaySound( pW, GetModuleHandle(NULL), ( ( hb_pcount() > 1 ) ? hb_parni( 2 ) : SND_ASYNC ) | SND_RESOURCE | SND_NODEFAULT ) );
}
Saludos
Salvador
Salvador
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: