Lisp HUG Maillist Archive

COM LW Active Scripting: more progress...

Hi

ok.  This is what I end up getting with my implementation of Active 
Scripting Automation.

I am very, very close to getting it to work.

Please note that I have a deadline next wednesday (March 19th) to have 
this done at least as a show of feasability.  Let me repeat that this 
project is VITAL to the expanded use of Common Lisp in my lab (as well 
as possible future commercial ventures).

I managed to register all the necessary keys in the Window Registry, in 
order to make CLAXS (the .exe I deliver) known to COM as an Active 
Scripting Engine.

The class definition is below.  I couldn't make much sense out of the 
explanation given about the interplay between :COCLASS and :INTERFACES. 
So I may have done something wrong. (In particular factory registration 
is a rather mysterious process, as explained in the documentation).


> (com:define-automation-component active-script-impl (com:standard-i-dispatch)
>      ((script-site :accessor script-site
>                    :initform nil)
>       (script-state :accessor script-state
>                     :initform 'SCRIPTSTATE_UNINITIALIZED)
>       (named-items :accessor named-items
>                    :initform '())
>       (event-handlers :accessor event-handlers
>                       :initform '())
>       )
>      ;; Implemented interfaces
>      (:interfaces i-active-script i-active-script-parse)
>      )

Below is a trace of what happens when a C++ program launches the 
CLAX.exe program as an Automation server (I changed some formatting for 
readability).  Note that my understanding is that I should not need a 
type library for my component.


================================================================================
;;; Z:\lang\cl\cl-activex-scripting\CLAXS.exe -Embedding
;;; Here we go....

Error: NIL is not of type COM::BASIC-TYPE-INFO-DESCRIPTOR.
   1 (abort) Quit process.

Type :b for backtrace, :c <option number> to proceed,  or :? for other 
options

CL-USER 1 : 1 > :b

Call to COM::ENSURE-STANDARD-I-DISPATCH-TYPE-INFO
Call to (COM::COM-METHOD COM:NONDELEGATING-ADD-REF 
COM:STANDARD-I-UNKNOWN COM:I-NONDELEGATING-UNKNOWN)
Call to FLI::FOREIGN-CALLABLE-ENTRY-POINT-AUX-NESTED
Call to COM::|COM Member : (I-UNKNOWN ADD-REF)|
Call to (COM::COM-METHOD
             COM:NONDELEGATING-QUERY-INTERFACE
             COM:STANDARD-I-UNKNOWN COM:I-NONDELEGATING-UNKNOWN)
Call to (COM::COM-METHOD
             COM:QUERY-INTERFACE
             COM:STANDARD-I-UNKNOWN
             COM:I-UNKNOWN)
Call to COM:DEFAULT-COM-IMPLEMENTATION-CONSTRUCTOR
Call to (COM::COM-METHOD
             COM:CREATE-INSTANCE
             COM::C-GENERIC-CLASS-FACTORY
             COM::I-CLASS-FACTORY)
Call to FLI::FOREIGN-CALLABLE-ENTRY-POINT-AUX-NESTED
Call to WIN32:DISPATCH-MESSAGE
Call to WIN32::PROCESS-MESSAGES
Call to MP::WIN32-PROCESS-WAIT-FOR-EVENT
Call to MP:PROCESS-READ-EVENT
Call to CAPI-INTERNALS:LOOP-PROCESS-EVENTS
Call to CAPI::RUN-IN-PROCESS
Call to CAPI:DISPLAY
Call to CL.ACTIVEX-SCRIPTING::CL-ACTIVE-SCRIPTING-STARTUP-FUNCTION
Call to DELIVERY::MAYBE-RYB-TOP-LEVEL
Call to (SUBFUNCTION 1 MP::INITIALIZE-PROCESS-STACK)

CL-USER 2 : 1 > :v

Call to COM::ENSURE-STANDARD-I-DISPATCH-TYPE-INFO
   COM::THIS : #<CL.ACTIVEX-SCRIPTING::ACTIVE-SCRIPT-IMPL 2060B04C>
================================================================================


Please help.

Thanks

--
Marco Antoniotti


Re: COM LW Active Scripting: more progress...

Marco Antoniotti <marcoxa@cs.nyu.edu> writes:

> 
> I am very, very close to getting it to work.
> 
> Please note that I have a deadline next wednesday (March 19th) to have
> this done at least as a show of feasability.  Let me repeat that this
> project is VITAL to the expanded use of Common Lisp in my lab (as well
> as possible future commercial ventures).
Well I would like to help, you but I just have struggeled with COM
myself and not graped it, I just can recommend to contact Xanalys
directly and ask for help. Maybe you better be prepared to pay for
their consultancy. 

Regards
Friedrich


Updated at: 2020-12-10 09:00 UTC