Hello friends,
I have some issues in understanding accessing objects via its adress.
this is my scenario:
[CODE]
#lang racket
(require ffi/com
ffi/unsafe
ffi/unsafe/define
ffi/winapi
racket/string
racket/format)
(define _BOOL (make-ctype _int (lambda (v) (if v 1 0)) (lambda (v) (not (zero? v)))))
(require ffi/com
ffi/unsafe
ffi/unsafe/define
ffi/winapi
racket/string
racket/format)
(define _BOOL (make-ctype _int (lambda (v) (if v 1 0)) (lambda (v) (not (zero? v)))))
(define-ffi-definer define-testdll (ffi-lib "test.dll"))
(define-testdll GetTestObject(_fun
(pObj : (_ptr io _intptr))
-> (r : _BOOL)
-> (values r pObj)))
(define p (malloc 'atomic _int32))
(define i (cast p _pointer _intptr))
(define-values (res pObj) (GetTestObjecti))
(~r pObj#:base 16)
(pObj : (_ptr io _intptr))
-> (r : _BOOL)
-> (values r pObj)))
(define p (malloc 'atomic _int32))
(define i (cast p _pointer _intptr))
(define-values (res pObj) (GetTestObjecti))
(~r pObj#:base 16)
[CODE]
I run the script: res is #t and pObj is something like "3d14b008".
How can I access the members and Functions of the Object with the given pObj adress?
First of all , is it possible?
Can I map the Object in the address to a real Racket Object, on which I can work?
Yours,
____________________ Racket Users list: http://lists.racket-lang.org/users

