I have created a custom COM dll say “WMInterface.dll” in VC++ using ATL Project. It is a unmanaged dll that is dependent on N no. of third party dll’s both managed and unmanaged. The WMinterface.dll contains interface functions that act as wrapper to functions exported from third party dll.
I have written a codeunit in Dynamics NAV 5.0 containing some functions and automation server variables created for my COM dll. Each of these functions access the thrid party functions by calling the interface functions exposed by my COM dll.
Say WM is an automation variable for WMInterface.dll and lets say there is an interface function called Init() exposed by this COM dll. Assume that Init() wraps Initialize() function of third party dll then a statement such as
would call the Initialize() function of third party dll.
In order to make the above functionality work i am currently facing the restriction of copying my COM dll as well as all my third party dll’s on which COM depends to Client folder of NAV i.e. where finsql.exe resides. I have to register my COM dll from this path only.
Is there any way to avoid this restriction such that i do not have to copy my dll’s to Client folder?
I tried setting the path of my COM dll through environment variables to the path where my third party dll resides i.e. other than Client folder.
But this doesn’t work.
Thanks in advance,