Dear developers!
Can you help me? I need to pass a xHarbour string from one Xailer
application to another through window message.
I send message with this code:
...
SendMessage(hAnotherAppWnd, WM_USER+55, 0, chr2ptr(cStr))
...
XA_FUNC( CHR2PTR )
{
hb_retnl( (long) hb_parc(1) );
}
I receive this message with this code:
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TSample
if nMsg==WM_USER+55
::oStatusBar:aItems[1]:cText:=chr2ptr(nLParam)
::oStatusBar:aItems[2]:cText:=str(nWParam,3,0)+'%'
return 1
endif
return NIL
.....
XA_FUNC( CHR2PTR )
{
char far * buf;
buf = (char *) hb_parnl(1);
hb_retcAdopt( hb_strdup(buf ) );
}
The message is catched by HandleEvent but chr2ptr returns garbage.
Regards, Oleg
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.