Re: generating self-contained dlls: sf or swiftx?

From: Leon Wagner <leon_at_forth.com>
Date: Fri, 29 Jan 2010 09:17:55 -0800

BTW, the exact same source code sample below can be used to make a DLL in SwiftX-Win32 with one exception: SwiftX uses
SAVE-CODE instead of PROGRAM. I just tried both DLLs and they work.

> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of Leon Wagner
> Sent: Friday, January 29, 2010 9:10 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Re: generating self-contained dlls: sf or swiftx?
>
> The instructions for making a DLL in SwiftForth are in Section 8.2.2 of the SwiftForth-Win32 reference manual.
> Here's
> an example of a DLL that exports a function called AskQuestion:
>
>
> : AskQuestion ( hwnd -- n )
> Z" Could this be any easier?" Z" Question" MB_YESNO MessageBox ;
>
> 1 EXPORT: AskQuestion
>
> PROGRAM DEMO.DLL
>
>
> Any program in any language can call this Forth word via its DLL interface. The function prototype would look
> something
> like this (I'm not a C programmer, so correct as necessary):
>
> int AskQuestion(HWND hWnd);
>
>
> Perhaps someone who knows how will show me how much simpler the above example is to code in C.
>
> --Leon
>
>
>
>
> > -----Original Message-----
> > From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of Appert, Kevin
> > Sent: Friday, January 29, 2010 7:57 AM
> > To: 'sftalk_at_forth.com'
> > Subject: [sftalk] Re: generating self-contained dlls: sf or swiftx?
> >
> > If you're writing for Windows boxes, SwiftForth is the environment you want. I suspect it might be easier to
> > write a auto-DLL-maker in C, except for Leon or Rick, who might very well finished writing one while I wrote
> > this.
> >
> > I believe if you're doing an embedded implementation, you'll probably have to write your own DLL-maker for
> > SwiftX.
> >
> >
> > -----Original Message-----
> > From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of Joel Reymont
> > Sent: Friday, January 29, 2010 5:37 AM
> > To: sftalk_at_forth.com
> > Subject: [sftalk] generating self-contained dlls: sf or swiftx?
> >
> > I want to have a GUI app where I can paste some code and get a DLL as a result.
> >
> > Should I use SwiftForth or SwiftX for this?
> >
> > The context is compiling trading strategies written in EasyLanguage
> > [1] to machine code, to be loaded back into TradeStation [2] as a DLL.
> > Think improvement in security, speed, etc. This type of a small
> > self-contained Forth runtime can be loaded into all types of other
> > trading applications that normally don't understand EasyLanguage.
> >
> > Thanks, Joel
> >
> > [1] http://lambda-the-ultimate.org/node/2201
> > [2] http://www.tradestation.com
> >
> > --
> > http://es.linkedin.com/in/joelreymont
> > ----------------------------------------------------------------------
> > 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
> > ----------------------------------------------------------------------
>
>
> ----------------------------------------------------------------------
> 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 Jan 29 2010 - 09:18:13 PST


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.