Skip to main content
Sep 10, 2025 6:44 AM UTC
Question

Get the Dll Handle for multiple Addin

I wanted to know if it's possible to get the dll handle of another application from a toolkit application if both the applications are registered using registry file Prodev.dat.

 

Scenario: Suppose I am loading two add-in/plug-in DLLs at a time through prodev.dat file.
Internally, i want to get the handle of each DLL, to communicate internally.
Is there a way, i can get the DLL handle of each plug-in.

Steps tried: Suppose, I am loading A.dll and B.dll through prodev.dat.
When both gets loaded, I called toolkit API ProToolkitDllLoad() and passed B.dll path to get the B's handle.
But, the API fails.
If I try to call, ProToolkitDllHandleGet() , I don't have the first argument i.e. ProName application_id
Query from PTC team: Is there a way, i can get the Handle of B's DLL?

5 replies

Sep 10, 2025 1:46 PM UTC

Maybe be I’m wrong here, but if both dll’s are loaded, they already share the same namespace in Creo. And you can try to call exported functions. Do you want to call functions without linking on build?

Praveen2Author
Sep 10, 2025 2:13 PM UTC
Yes, they are not linked during build.

Sep 16, 2025 8:48 AM UTC

Ok and how to you implement signature check of the calls and arguments? Do you want to import later. I think if the function in the other DLL is exported you can call it in your code if this is linked with the lib, else I'm out here 🙂