# How to get handle to the dynamic link library?

**URL:** <https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244>\
**Category:** Newbie\
**Created:** [September 1, 2020, 5:01pm UTC](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244 "2020-09-01T17:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhenhao](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/zhenhao/32/23177_2.png) [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Post date:** [September 1, 2020, 5:01pm UTC](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244/1 "2020-09-01T17:01:15Z")

</div>

Hi,

I have a dynamic link library which can be loaded to ROOT using `gSystem->Load ()`. Then I need to apply `GetProcAddress(handle, "FunctionName")`. How can I get handle to the dynamic link library?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 1, 2020, 5:59pm UTC](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244/2 "2020-09-01T17:59:32Z")

</div>

Hi,

You should try [TSystem::DynFindSymbol()](https://root.cern/doc/master/classTSystem.html#a1427a41f0a38d4904e72efd9c58fbaa0).

Regards,  
Sergey

---

<div class="post-metadata">

**Author:** ![Zhenhao](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/zhenhao/32/23177_2.png) [@Zhenhao](https://root-forum.cern.ch/u/Zhenhao)\
**Post date:** [September 1, 2020, 7:34pm UTC](https://root-forum.cern.ch/t/how-to-get-handle-to-the-dynamic-link-library/41244/3 "2020-09-01T19:34:13Z")

</div>

Thank you! It’s amazing. I am surprised by root again.
