node-activex icon indicating copy to clipboard operation
node-activex copied to clipboard

add an interface to export the enumeration constants of typelib to a object?

Open litlight opened this issue 5 years ago • 0 comments

As the com implementation of lua, luacom has a method called luacomE.ExportConstants, which can export the enumeration constants of the ActiveX object to a new table. now when the typelib export enumeration constants, we cannot use the enumeration constant name, but use the integer value instead. for example: in the excel, constant xlUp = -4162 if we can use something like ActiveX = require("node-activex") excel = new ActiveX.Object("Excel.Application") ec = {} ActiveX.ExportConstants(excel, ec) now we call use xlUp As ec.xlUp, instead of -4162. the implementaion of lua ExportConstants is in here https://github.com/davidm/luacom/blob/9962eb574ddb34692eb4503fe67fd7d363ff20a0/src/library/tLuaTLB.cpp

litlight avatar Dec 05 '19 03:12 litlight