I am trying to do some ole calls:
the automation server(written in C++) has this public interface:
int addwellbyuwi([in] BSTR UWI, [out] long* WID);
So in LISP:
(ole:start-ole)
(setf wid -1)
(setq 3rd_app
(ole:ask-for-autotool "TApp.App"
ole:CLSCTX_LOCAL_SERVER) )
(setq 3rd_inst
(make-instance 'ole:remote-autotool
:dispatch
(ole:auto-getf 3rd_app :app) ))
(ole:auto-method 3rd_inst
"addwellbyuwi"
"100/07-01-011-16W4/00"
wid )
wid is a local variable, auto-method is running fine, and it returns
sucessfully.
But the problem is that wid value doesn't have the correct value in it.
So I am just wondering maybe wid should be a different data type, or
the calling syntax should be different?
how could I make it work?
thanks in advance.
<··········@hotmail.com> wrote in message
·····························@o13g2000cwo.googlegroups.com...
> I am trying to do some ole calls:
> the automation server(written in C++) has this public interface:
> int addwellbyuwi([in] BSTR UWI, [out] long* WID);
> So in LISP:
>
> (ole:start-ole)
> (setf wid -1)
> (setq 3rd_app
> (ole:ask-for-autotool "TApp.App"
> ole:CLSCTX_LOCAL_SERVER) )
> (setq 3rd_inst
> (make-instance 'ole:remote-autotool
> :dispatch
> (ole:auto-getf 3rd_app :app) ))
> (ole:auto-method 3rd_inst
> "addwellbyuwi"
> "100/07-01-011-16W4/00"
> wid )
>
You are showing an ordinary (vtable dispatch) interface method definition,
and then below you are using the automation interface. In oleview, if
you're using ole:auto-method, you want to look at the "dispinterface"
entries not the "interface" entries. However, unfortuanately it appears you
are using Franz, and ole:auto-method does not yet support [out] args. If
you want to use the IDispatch interface you have to write a C function which
calls IDispatch.Invoke for you and you have to fetch the [out] arg and
return it to lisp. The other alternative, which you would probably prefer,
is to use ole:def-ole-interface and ole:def-client-interface, where you can
set up to call the interface method like a foreign function call. In that
case you might want to use ole:with-foreign-data to allocate memory for your
long* and use ole:xeno-slot to fetch the :long.
AKW
> wid is a local variable, auto-method is running fine, and it returns
> sucessfully.
> But the problem is that wid value doesn't have the correct value in it.
>
> So I am just wondering maybe wid should be a different data type, or
> the calling syntax should be different?
> how could I make it work?
>
> thanks in advance.
>
sorry for posting to the newsgroup but since your email is invalid:
Andrew,
Those lisp machines (3650) and keyboards in the closet at UT Dallas
engineering department with your name on them, do you still want them?
-Jay
Andrew Wolven wrote:
> You are showing an ordinary (vtable dispatch) interface method
definition,
> and then below you are using the automation interface. In oleview,
if