Here's my current 'work in progress' library for generating methods for using COM objects given a type library. Works with Corman Lisp 1.5 plus patches. It requires the patch described previously for fixing method dispatch. There is much work still to be done on this. In particular, lots of the generated code is incorrect and will not work (but will compile). Mainly in the area of TKIND_DISPATCH and property functions. Still, I do get a lot of the Microsoft XML Parser 3.0 working via code similar to the following: (import-type-library "c:\\windows\\system32\\msxml3.dll")
(setq a (create-domdocument30))
(setq b (query-interface a 'com-ixmldomdocument2))
(setq c (sysallocstring (lisp-string-to-unicode "Hello World")))
(setq d (malloc (sizeof '(DWORD *))))
(com-ixmldomdocument-loadxml (interface-pointer b) c d)
(setq e (malloc (sizeof '(BSTR *))))
(com-ixmldomnode-get-xml (interface-pointer b) e)
(win32::bstr-to-lisp-string (cref (BSTR *) e 0))
(com-ixmldomnode-get-text (interface-pointer b) e)
(win32::bstr-to-lisp-string (cref (BSTR *) e 0))
12:14:02 AM
|