How to get a list of used libraries (via CONTROL or via C++ extension API)

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
flindecke
Posts:69
Joined: Wed Jun 24, 2015 1:54 pm

How to get a list of used libraries (via CONTROL or via C++ extension API)

Post by flindecke »

In https://portal.etm.at/index.php?option= ... 16&id=6130 i have asked a question about inspecting a library about its defined functions.
I have written a CTRL C++ API Extension and it works great.

Now i want to inspect all loaded libraries of a process.
The use case is, that i need to write a simple tool to find all unit test functions of all loaded libraries and call them. Using the library inspection works as expected. But now i need to know all known libraries.

Iterating of the project and finding all library names is easy, but in such a case the test runner is unable to call those libraries, because they might not be loaded.

Does anybody know an API for this case?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: How to get a list of used libraries (via CONTROL or via C++ extension API)

Post by leoknipp »

With the CTRL debugger functionality you can get a list of loaded libraries. The datapoints of type _CtrlDebug are used by the CTRL debug functionaility.
It looks like it also works for managers which are not of type UI or CTRL.

E.g. I can get a list of libraries for the Event Manager by writing {"cmd":"info libs","id":"Event"} to the datapoint _CtrlDebug_EVENT_0.Command.
The result is written to _CtrlDebug_EVENT_0.Result

Best Regards
Leopold Knipp
Senior Support Specialist

flindecke
Posts:69
Joined: Wed Jun 24, 2015 1:54 pm

Re: How to get a list of used libraries (via CONTROL or via C++ extension API)

Post by flindecke »

Thanks for the hint.
My current solution is to find all libraries via file search and inspect them via my own CTRL API solution (as depicted in https://portal.etm.at/index.php?option= ... 16&id=6130).

Perhaps your solution might also work for my case. I will give it a try.

Best regards,
Frank

3 posts • Page 1 of 1