I just replaced
\harbour\lib\win\bcc\hbwin.lib
with the new hbwin.lib.
Now it is working for me.
G. N. Rao.
Hyderabad, India
I just replaced
\harbour\lib\win\bcc\hbwin.lib
with the new hbwin.lib.
Now it is working for me.
Error: Unresolved external '_hb_iswinsp' referenced from C:\HARBOUR\LIB\WIN\BCC\HBWIN.LIB|win_osci use FWH 23.07 and harbour 3.2.0 Dev (r1801051438)
Error: Unresolved external '_HB_FUN_HB_OSISWIN7' referenced from C:\HARBOUR\LIB\WIN\BCC\HBWIN.LIB|win_os
聽 聽 聽 聽 lOleError = HB_VTBL( pDisp )->Invoke( HB_THIS_(pDisp) dispid, HB_ID_REF(IID_NULL),
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽LOCALE_USER_DEFAULT,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽( V_VT( dispparam.rgvarg ) == VT_DISPATCH ) ? DISPATCH_PROPERTYPUTREF : DISPATCH_PROPERTYPUT,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽&dispparam, NULL, &excep, &uiArgErr );function main()
聽 聽local oVoice := CreateObject( "Sapi.SPVoice", "WithEvents" )
聽 聽
聽 聽// oVoice:WithEvents = .T.
聽 聽oVoice:EventInterests = 327679
聽 聽oVoice:__hSink := __axRegisterHandler( oVoice:__hObj, { | ... | QOut( ... ) } )
聽 聽// oVoice:voice = oVoice:GetVoices():Item( 0 )
聽 聽oVoice:Speak( "harbour and xharbour" )
聽 聽oVoice:Speak( "another" )
return nilAntonio Linares wrote:Dear Jimmy,Hola Antonio Linares con su permiso voy a responder en espa帽ol , no recordaba estar registrado en su sitio y lo abr茅 hecho para leer el foro.
I have reviewed the topic at https://hmgforum.com/viewtopic.php?t=7505 I have requested to join the forums so maybe we can solve it together.
I have been trying to use the events and it seems as something is missing:function main() 聽 聽local oVoice := CreateObject( "Sapi.SPVoice", "WithEvents" ) 聽 聽 聽 聽// oVoice:WithEvents = .T. 聽 聽oVoice:EventInterests = 327679 聽 聽oVoice:__hSink := __axRegisterHandler( oVoice:__hObj, { | ... | QOut( ... ) } ) 聽 聽// oVoice:voice = oVoice:GetVoices():Item( 0 ) 聽 聽oVoice:Speak( "harbour and xharbour" ) 聽 聽oVoice:Speak( "another" ) return nil
HB_FUNC( WIN_OLEAUTO___ONERROR )
{
聽 聽IDispatch * 聽pDisp;
聽 聽const char * szMethod;
聽 聽wchar_t 聽 聽 聽szMethodWide[ HB_SYMBOL_NAME_LEN + 1 ];
聽 聽OLECHAR * 聽 聽pMemberArray;
聽 聽DISPID 聽 聽 聽 dispid;
聽 聽DISPPARAMS 聽 dispparam;
聽 聽VARIANTARG 聽 variant;
聽 聽EXCEPINFO 聽 聽excep;
聽 聽UINT 聽 聽 聽 聽 uiArgErr;
聽 聽HRESULT 聽 聽 聽lOleError;
聽 聽HB_USHORT 聽 聽uiClass;
聽 聽int 聽 聽 聽 聽 聽iPCount;
聽 聽hb_oleInit();
聽 聽uiClass = hb_objGetClass( hb_stackSelfItem() );
聽 聽if( uiClass == 0 )
聽 聽 聽 return;
聽 聽/* Get object handle */
聽 聽hb_vmPushDynSym( s_pDyns_hObjAccess );
聽 聽hb_vmPush( hb_stackSelfItem() );
聽 聽hb_vmSend( 0 );
聽 聽pDisp = hb_oleParam( -1 );
聽 聽if( ! pDisp )
聽 聽 聽 return;
聽 聽iPCount = hb_pcount();
聽 聽szMethod = hb_itemGetSymbol( hb_stackBaseItem() )->szName;
聽 聽AnsiToWideBuffer( szMethod, szMethodWide, ( int ) HB_SIZEOFARRAY( szMethodWide ) );
聽 聽/* Try property put */
聽 聽if( szMethod[ 0 ] == '_' && iPCount >= 1 )
聽 聽{
聽 聽 聽 pMemberArray = &szMethodWide[ 1 ];
聽 聽 聽 lOleError = HB_VTBL( pDisp )->GetIDsOfNames( HB_THIS_( pDisp ) HB_ID_REF( IID_NULL ), &pMemberArray,
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽1, LOCALE_USER_DEFAULT, &dispid );
聽 聽 聽 if( lOleError == S_OK )
聽 聽 聽 {
聽 聽 聽 聽 聽DISPID lPropPut = DISPID_PROPERTYPUT;
聽 聽 聽 聽 聽memset( &excep, 0, sizeof( excep ) );
聽 聽 聽 聽 聽GetParams( &dispparam, 0, HB_FALSE, 0, NULL, NULL );
聽 聽 聽 聽 聽dispparam.rgdispidNamedArgs = &lPropPut;
聽 聽 聽 聽 聽dispparam.cNamedArgs = 1;
聽 聽 聽 聽 聽lOleError = HB_VTBL(pDisp)->Invoke(HB_THIS_(pDisp) dispid, HB_ID_REF(IID_NULL),
聽 聽 聽 聽 聽 聽 聽LOCALE_USER_DEFAULT,
聽 聽 聽 聽 聽 聽 聽(V_VT(dispparam.rgvarg) == VT_DISPATCH) ? DISPATCH_PROPERTYPUTREF : DISPATCH_PROPERTYPUT,
聽 聽 聽 聽 聽 聽 聽&dispparam, NULL, &excep, &uiArgErr);
聽 聽 聽 聽 聽FreeParams( &dispparam ); 聽 聽 聽 聽 lOleError = HB_VTBL(pDisp)->Invoke(HB_THIS_(pDisp) dispid, HB_ID_REF(IID_NULL),
聽 聽 聽 聽 聽 聽 聽LOCALE_USER_DEFAULT,
聽 聽 聽 聽 聽 聽 聽(V_VT(dispparam.rgvarg) == VT_DISPATCH) ? DISPATCH_PROPERTYPUTREF : DISPATCH_PROPERTYPUT,
聽 聽 聽 聽 聽 聽 聽&dispparam, NULL, &excep, &uiArgErr);Hola Antonio Linares:
con su invalorable ayuda pude despues de estudiar y modificar olecore.c el cual me costo entender el fix pude compilar la libreria Contrib de HBWIN que descargue desde el repositio de Harbour en GITHUB mediante el bin HBMK2 y el compilador MinGW.
desde ya quedo muy agradecido como muchos otros de la comunidad HMGForum un saludo y abrazo a la distancia
function main()
聽 聽local oVoice := CreateObject( "Sapi.SPVoice", "WithEvents" )
聽 聽
聽 聽// oVoice:WithEvents = .T.
聽 聽oVoice:EventInterests = 327679
聽 聽oVoice:__hSink := __axRegisterHandler( oVoice:__hObj, { | ... | QOut( ... ) } )
聽 聽// oVoice:voice = oVoice:GetVoices():Item( 0 )
聽 聽oVoice:Speak( "harbour and xharbour" )
聽 聽oVoice:Speak( "another" )
return nilAntonio Linares wrote:Estimado Daniel,Hola Antonio Linares :
Lo que no hemos conseguido que funcione son los eventos.
A ver si entre todos descubrimos como hacerlo funcionar:function main() 聽 聽local oVoice := CreateObject( "Sapi.SPVoice", "WithEvents" )
Eventos de vozvoy a ver como hacer un ejemplo en Harbour/HMG que es lo que utilizo, ya que nunca utilize FiveWin que es su producto.
A medida que una voz habla texto, puede generar eventos cuando detecta ciertas condiciones en el flujo de entrada. Estos eventos est谩n contenidos en la enumeraci贸n SpeechVoiceEvents. Ejemplos de estos eventos son la finalizaci贸n de fonemas, palabras u oraciones, as铆 como cambios de voz o la presencia de marcadores. La gama de condiciones que SpeechVoiceEvents puede informar es lo suficientemente amplia como para que la mayor铆a de las aplicaciones utilicen s贸lo algunas de ellas. Para evitar que el motor TTS genere eventos que la aplicaci贸n ignorar谩, utilice la propiedad EventInterests para especificar los eventos de inter茅s. S贸lo se plantear谩n estos eventos.
El punto en el flujo de texto de entrada en el que se ha completado un evento potencial se denomina l铆mite de evento. En cada l铆mite de evento, el tipo de evento se compara con los EventInterests actuales. Si el tipo de evento es de inter茅s, se genera un evento de ese tipo. Los eventos de voz devuelven el n煤mero de flujo de entrada para asociarlos con el flujo apropiado.
function main()
聽 聽local oVoice := TOleAuto():New( "Sapi.SPVoice" )
聽 聽
聽 聽// oVoice:WithEvents = .T.
聽 聽oVoice:EventInterests = 327679
聽 聽oVoice:__hSink := __axRegisterHandler( oVoice:__hObj, { | ... | QOut( ... ) } )
聽 聽oVoice:Speak( "harbour and xharbour" )
聽 聽oVoice:Speak( "another" )
return niltest.prg(7) Error E0030 聽Syntax error "syntax error at '...'"Dear Enrico,
xHarbour does not support "..." syntax, so such line should be:
oVoice:__hSink := __axRegisterHandler( oVoice:__hObj, { | x, y | QOut( x, y ) } )
but function __axRegisterHandler() is available in Harbour and not in xHarbour, if I am correct
I compiled your sample with latest Harbour, not xHarbour.