From J Wiki
Jump to: navigation, search

This script File:Ooo.ijs demonstrates how to open OOo calc using ole32 api. Save the following picture to your computer, rename it to and extract the bu2.dll file.

example of usage of function vtable in bu2
vtable itself is always cdecl because variable number of arguments
'bu2 vtable + i i i i i i'&cd 0 ; Release ; 1 ; pdisp_vtbl ; pdisp
0 : stdcall (1 = cdecl but not yet used)
Release : 0-base vtable index
1 : number of parameter (here 1 because pdisp is also counted)
pdisp_vtbl : address of vtable
pdisp : first parameter ( this )

Alternatively, you may use Oleg Kobchenko's pcall.dll general/pcall

Contributed by Bill Lam