On Jul 7, 2006, at 6:16 PM, Chess Player wrote:

In order to position the cursor in Windows' console
I've been doing this in newLisp:

(import "kernel32.DLL" "GetStdHandle")
(import "kernel32.DLL" "SetConsoleCursorPosition" )

(constant 'STD_OUTPUT_HANDLE 0xfffffff5)

(define (cons-output-handle)
  (GetStdHandle STD_OUTPUT_HANDLE))

(define (set-cursor-position position)
  (< 0 (SetConsoleCursorPosition
          (cons-output-handle) position)))

(define (at-xy x y)
  (setq x (max x 0))
  (setq y (max y 0))
  (set-cursor-position (| (<< y 16) x) ))

How would I call the DLL routine "SetConsoleCursorPosition"
in Chicken?

AFAIK you can't. The entire Chicken interface to dynamic loading is oriented to loading Chicken libraries.

FWIW I need an unspecialized dynld interface also so it will probably be available Real-Soon-Now.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users



_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to