[racket] Bug. ffi/com + MSScriptControl.ScriptControl
#lang racket
(require ffi/com)
(displayln
(let ([com (com-create-instance "MSScriptControl.ScriptControl")])
(com-set-property! com "Language" "VBScript")
(com-invoke com "AddCode" "Function Test1() \n Test1=false \n End Function")
(com-invoke (com-get-property com "CodeObject") "Test1")))
(displayln
(let ([com (com-create-instance "MSScriptControl.ScriptControl")])
(com-set-property! com "Language" "VBScript")
(com-invoke com "AddCode" "Function Test(x) \n Test=(x>2) \n End Function")
(com-invoke (com-get-property com "CodeObject") "Test" 1)))
(displayln
(let ([com (com-create-instance "MSScriptControl.ScriptControl")])
(com-set-property! com "Language" "VBScript")
(com-invoke com "AddCode" "Function Test2() \n Test2=false \n End Function")
(com-invoke (com-get-property com "CodeObject") "Test2")))
-----
First run:
#f
#t
#t
Second run (from the same DrRacket)
#t
#t
#t
And no good results from booleans (always #t) until DrRacket reset.
Tested on WinXP SP3 x32. Can someone test on another Windows?
--
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140323/d9f37c3d/attachment.html>