[racket] ffi/com->typeconlict?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jan 24 15:52:17 EST 2013

I think "IsNull" and "StringData" must be parameterized properties that
expect an integer index.

The `ffi/unsafe/com' library did not support parameterized properties
as of version 5.3.1, but we have added support for the next release.

In a nightly build [1] or the v5.3.2 release candidate [2], try

 (com-get-property* RECORD "IsNull" 0)
 (com-get-property* RECORD "StringData" 0)


[1] Nightly build:
      http://pre.racket-lang.org/installers/
[2] Current release candidate:
      http://pre.racket-lang.org/release/installers/

At Thu, 24 Jan 2013 11:21:55 +0100, "murat demirtas" wrote:
> Hello friends,
> 
> during getting a property I get an typconflict.
> 
> [code_begin]
> #lang racket/base
> (require ffi/unsafe
> ffi/unsafe/com)
> (define MSIFILE "D:\\_Setups\\7z920-x64.msi")
> (define INSTALLER (com-create-instance "WindowsInstaller.Installer"))
> (define DB (com-invoke INSTALLER "OpenDatabase" MSIFILE 0))
> 
> (define VIEW (com-invoke DB "OpenView" "SELECT Name FROM _Tables"))
> 
> (define RECORD (com-invoke VIEW "Execute"))
> (set! RECORD (com-invoke VIEW "Fetch"))
> 
> 
> ;(com-get-property RECORD "FieldCount")
> (com-get-property RECORD "IsNull")
> 
> ;(define s (com-get-property RECORD "StringData"))
> [code_end]
> 
> The "FieldCount" Property is getting 1
> and "IsNull" or "StringData" gives:
> 
> com-get-property: failed for "IsNull" (80020005; Typkonflikt.) or
> com-get-property: failed for "StringData" (80020005; Typkonflikt.)
> 
> so whats wrong here? The MDSN says it is an property an getting property on com 
> in racket is trivial like above code shows, I think. 
> 
> 
> Yours,
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.