<HTML><BODY>#lang racket<br>(require ffi/com)<br>(displayln <br> (let ([com (com-create-instance "MSScriptControl.ScriptControl")])<br> (com-set-property! com "Language" "VBScript")<br> (com-invoke com "AddCode" "Function Test1() \n Test1=false \n End Function")<br> (com-invoke (com-get-property com "CodeObject") "Test1")))<br>(displayln <br> (let ([com (com-create-instance "MSScriptControl.ScriptControl")])<br> (com-set-property! com "Language" "VBScript")<br> (com-invoke com "AddCode" "Function Test(x) \n Test=(x>2) \n End Function")<br> (com-invoke (com-get-property com "CodeObject") "Test" 1)))<br>(displayln <br> (let ([com (com-create-instance "MSScriptControl.ScriptControl")])<br> (com-set-property! com "Language" "VBScript")<br> (com-invoke com "AddCode" "Function Test2() \n Test2=false \n End Function")<br> (com-invoke (com-get-property com "CodeObject") "Test2")))<br><br>-----<br><br>First run:<br>#f<br>#t<br>#t<br><br>Second run (from the same DrRacket)<br>#t<br>#t<br>#t<br><br>And no good results from booleans (always #t) until DrRacket reset.<br><br>Tested on WinXP SP3 x32. Can someone test on another Windows?<br><br>-- <br>Roman Klochkov</BODY></HTML>