Slava, Doug,
Thanks for the tips.
I've now ensured that the arguments are consumed.
Using print flush instead of . flush makes no difference
in this case, unfortunately. I get the same result; "callbacked"
is printed only once.
I'll keep working on it.
I have a little test DLL to test callbacks, so I'll refine my
Factor callback skills on that.
I take it that there is no problem returning the integer 1
and that it will be converted to a char for me by the
definition below.
Thanks again,
Anton.
> Anton,
>
> . does not flush; perhaps that's what Slava was getting at.
>
> However, you are also doing things way wrong...your function expects
> four arguments yet you leave them on the stack!
>
> : stream-callback ( -- object )
> "char" { "void*" "void*" "int" "void*" } "stdcall" [
> "callbak'd!" print flush
> 4drop
> 1
> ] alien-callback ;
>
> Doug
> >> This doesn't print anything; try "callbacked" print flush
> >>
> >> Slava
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk