Fwd: Re: COM. Questions and Bugs
this lot may help with creating .exe servers......
please forward to lisp-hug
1. package requires
(require "com")
(require "automation")
2 defsys example
(defsystem "XXX-COM"
(:default-pathname "XXX:COM;"
:object-pathname (proper-binary-directory #P"XXX:COM;")
:default-type :system)
:members (("a-tlb-file" :type :midl-type-library-file :package "XXX-COM")
"A-lisp-file"
)
:rules ((:in-order-to :compile :all
(:requires (:load :previous))
(:caused-by (:compile "a-typelib-file")))))
3. define server co class
(com:define-automation-component XXXXX-impl (com:standard-i-dispatch
com:standard-i-connection-point-container
;;your-super classes go here
)
;; implementation slots
((my-slot :initform nil :initarg :my-slot :accessor my-slot)
(:coclass Application) ;; idl co class
;; single instance in development image...
(:coclass-reusable-p t)
)
4. define methods
(define-com-method (i-XXX-application howdy)
((this watson-impl)
(p-workfiles :out))
;; do somethind
)
5. dont forget to have ur app call co initialize and start factories if /embedding is in commandline
(com:co-initialize)
(com:start-factories)
comple and register...
(com:register-server :clsctx com:clsctx_local_server)