* calling ocaml from VBA
@ 2005-07-27 4:51 Lars Schouw
2005-07-27 7:51 ` [Caml-list] " James E. Scott
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lars Schouw @ 2005-07-27 4:51 UTC (permalink / raw)
To: caml-list
How I call ocaml code from VBA?
Can I warp the compiled ocaml code into a dll somehow?
Then I can use 'declare funcion' in VBA.
Lars
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] calling ocaml from VBA
2005-07-27 4:51 calling ocaml from VBA Lars Schouw
@ 2005-07-27 7:51 ` James E. Scott
2005-07-27 11:53 ` Richard Jones
2005-07-27 14:53 ` clement.capel
2 siblings, 0 replies; 4+ messages in thread
From: James E. Scott @ 2005-07-27 7:51 UTC (permalink / raw)
To: caml-list
Hi Lars!
we do something like the following:
- write a DLL which is a 'client' and which has a function
(eval_expression) callable from VBA (written in C and caml).
- write a server, which is an ocaml toplevel but which marshals it's IO.
Then the client runs the server and talks to it through stdin/stdout.
The client/server part is optional I suppose but it is nice not to share
the same address space as Excel.
All ocaml return data types get mapped into a VB variant type.
James
Lars Schouw wrote:
>How I call ocaml code from VBA?
>Can I warp the compiled ocaml code into a dll somehow?
>Then I can use 'declare funcion' in VBA.
>Lars
>
>
>
>____________________________________________________
>Start your day with Yahoo! - make it your home page
>http://www.yahoo.com/r/hs
>
>
>_______________________________________________
>Caml-list mailing list. Subscription management:
>http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
>Archives: http://caml.inria.fr
>Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] calling ocaml from VBA
2005-07-27 4:51 calling ocaml from VBA Lars Schouw
2005-07-27 7:51 ` [Caml-list] " James E. Scott
@ 2005-07-27 11:53 ` Richard Jones
2005-07-27 14:53 ` clement.capel
2 siblings, 0 replies; 4+ messages in thread
From: Richard Jones @ 2005-07-27 11:53 UTC (permalink / raw)
To: Lars Schouw; +Cc: caml-list
On Tue, Jul 26, 2005 at 09:51:13PM -0700, Lars Schouw wrote:
> How I call ocaml code from VBA?
> Can I warp the compiled ocaml code into a dll somehow?
> Then I can use 'declare funcion' in VBA.
I've no idea at all about VBA, but I know that it is possible to
generate a Windows DLL from an OCaml library using ODLL:
http://tech.motion-twin.com/odll.html
BTW, there is a beginners newsgroup for these sorts of questions:
http://groups.yahoo.com/group/ocaml_beginners/
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] calling ocaml from VBA
2005-07-27 4:51 calling ocaml from VBA Lars Schouw
2005-07-27 7:51 ` [Caml-list] " James E. Scott
2005-07-27 11:53 ` Richard Jones
@ 2005-07-27 14:53 ` clement.capel
2 siblings, 0 replies; 4+ messages in thread
From: clement.capel @ 2005-07-27 14:53 UTC (permalink / raw)
To: caml-list
yes, you can. but it's a little bit long and technical ...
- write you ocaml files.
- use the ocaml/C binding to generate C object files.
- create a C++ dll to call your C functions.
- In this dll you have to map C values to VBA values (COM objects).
- then (and finally), for instance:
Declare Your_function Lib "your_dll.dll" _
(ByRef argv() As String) As String
(the dll must be in the PATH)
regards
Clément
Quoting Lars Schouw <schouwla@yahoo.com>:
> How I call ocaml code from VBA?
> Can I warp the compiled ocaml code into a dll somehow?
> Then I can use 'declare funcion' in VBA.
> Lars
>
>
>
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-27 15:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-27 4:51 calling ocaml from VBA Lars Schouw
2005-07-27 7:51 ` [Caml-list] " James E. Scott
2005-07-27 11:53 ` Richard Jones
2005-07-27 14:53 ` clement.capel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox