chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Calling routines in kernel32.DLL


From: Kon Lovett
Subject: Re: [Chicken-users] Calling routines in kernel32.DLL
Date: Sun, 9 Jul 2006 10:06:40 -0700

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
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]