![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Do you have try with CIMPORT: ?
Charles
----- Original Message -----
From: "Jeffrey Massung" <jma_at_mfire.com>
To: <sftalk_at_forth.com>
Sent: Monday, October 20, 2003 10:47 PM
Subject: [sftalk] Pointers to DLLs
> More DLL fun.. Hopefully someone can help me with this little problem. I =
> all
> boils down updating a pointer passed to a C++ function.
>
> Here's the C++:
>
> extern "C" DLL_EXPORT void increment(int *x)
> {
> (*x)++;
> }
>
> Now the Forth:
>
> LIBRARY mydll.DLL
> 1 IMPORT: increment
>
> VARIABLE x
> 1 x !
>
> x increment DROP
> x ?
>
> Well, this fails. No error is produced, but the results are invalid, and =
> SF
> spits out a value (to the console) after execution of 'increment'. Perhap=
> s I'm
> missing something or not doing this right?
>
> Any ideas appreciated, thanks!
>
> Jeff
>
>
> ----------------------------------------------------------------------
> 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 Tue Oct 21 2003 - 00:40:48 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:33 PST