Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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?
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?
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 🙂
But in this case I don't understand your initial question. If the DLL is loaded after start by Creo, the OS should know about.
Else check ProToolkitDLL.h here is maybe all you need:
ProToolkitDllLoad
ProToolkitDllIdGet
ProToolkitDllHandleGet
ProToolkitTaskExecute
ProToolkitDllUnload
...