Skip to content

Instantly share code, notes, and snippets.

@vstebunov
Created February 16, 2016 20:48
Show Gist options
  • Save vstebunov/07383352899eed6f868e to your computer and use it in GitHub Desktop.
Save vstebunov/07383352899eed6f868e to your computer and use it in GitHub Desktop.
Look internals of COM object in Lua
--ss COM Объект
--COM work
local ss_info = luacom.GetTypeInfo(ss)
local ss_doc = ss_info:GetDocumentation()
for k,v in pairs(ss_doc) do
print(k,v)
end
local ss_attr = ss_info:GetTypeAttr()
for k,v in pairs(ss_attr) do
print(k,v)
end
local func_count = ss_attr.Funcs
for i = 0, func_count - 1 do
memid, invkind, Params, ParamsOpt, description, helpfile, helpcontext, name = ss_info:GetFuncDesc(i)
print(memid, name, Params, ParamsOpt)
end
for k,v in pairs(ss_attr.flags) do
print(k,v)
end
local ss_impl_type = ss_info:GetImplType(0)
local ss_impl_doc = ss_impl_type:GetDocumentation()
--END COM work
@vstebunov
Copy link
Author

Иногда требуется посмотреть под капот lua com объекту, этот снипет позоляет это сделать для объекта ss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment