Re: FORTH accessing Tcl/Tk functionality via DLL in WinXP

From: Leon Wagner <leon_at_forth.com>
Date: Fri, 5 Oct 2007 17:04:49 -0700

Here's the approach I would take:

1) Use a free tool like DLL Export Viewer (http://www.nirsoft.net/utils/dll_export_viewer.html) to list the functions exported by
the DLL you're interested in. The DLLs are in the /Tcl/bin directory.

2) Look at the prototypes in the corresponding .h file(s) in /Tcl/include for the arguments to pass to each function.

3) Open the DLL with LIBRARY in SwiftForth

4) Use Function: or CFunction: to import the desired functions. (The first makes Pascal-style calls; the second is C-style. I
don't know which are used by the Tcl binaries, but you can figure that out either by reading the .h files or trial and error.)

Good luck and let us know what you come up with!

--Leon

> -----Original Message-----
> From: sftalk-bounce_at_forth.com
> [mailto:sftalk-bounce_at_forth.com] On Behalf Of Richard Owlett
> Sent: Friday, October 05, 2007 4:20 PM
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: FORTH accessing Tcl/Tk functionality
> via DLL in WinXP
>
> Ron Oliver wrote:
>
> > Richard Owlett wrote:
> >
> >>My *IMMEDIATE* question
> >> After making a calculation in FORTH how do i display it in Tcl/Tk?
> >>
> >>I make *ABSOLUTELY* _NO_ claim that a sane person would do
> this. It is
> >>just a question of how each may talk to other. I've got
> some VAGUE ideas
> >>of how that might be useful.
> >>
> >>Said ideas *_NOT_* open to discussion ;\
> >
> >
> > Since your ideas are vague and unmentionable, [ *SNIP much* ;]
>
> Please note my sanity disclaimer ;]
>
> SwiftForth has mechanism to access routines in DLL's.
> I have Tcl/Tk DLL's.
>
> How do I access Tcl/Tk functionality from SwiftForth
>
> USING *DLL's* ?
>
> That there a probably better ways are *_ABSOLUTELY irrelevant_* !!!!!!
>
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
> bug reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Oct 05 2007 - 17:06:36 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.