I want the use wave files

Postby Antonio Linares » Tue Jul 29, 2008 10:04 pm

Salvador,

Prueba a cambiar esta línea:

pW3 = AnsiToWide( ( LPSTR ) LockResource( hglb ) );

por:

pW3 = AnsiToWide( ( LPSTR ) hglb );
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Salvador » Wed Jul 30, 2008 9:39 am

Antonio,
De esta manera funciona:
Code: Select all  Expand view
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 ) );
                     
}


Gracias.
Saludos
Salvador
Salvador
 
Posts: 144
Joined: Sun Dec 18, 2005 3:18 pm
Location: España

Postby Antonio Linares » Wed Jul 30, 2008 10:09 am

Salvador,

Hace falta una última llamada a hb_xfree( pW ); para liberar la memoria creada.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Salvador » Wed Jul 30, 2008 10:41 am

Ok, gracias
Saludos
Salvador
Salvador
 
Posts: 144
Joined: Sun Dec 18, 2005 3:18 pm
Location: España

Previous

Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 11 guests