Reputation: 103
I have a COM dll(say Mydlib.dll) and an application (say myapp.exe). Now the global path of Mydlib.dll(which is commonprogramfiles/...) is kept in registry. But for this particular application i need a private version which is kept at different location. Actually it is the same copy but the application wants its private copy independent of the shared one. I did some research and landed on this great article of using manifest files to solve the problem. http://msdn.microsoft.com/en-us/library/ms973913.aspx#rfacomwalk_topic10
Using this i was successfully able to make two manifests(myapp.exe.manifest and Mydlib.X.manifest). Using this method i could keep Mydlib.dll in a sub folder inside myapp.exe root folder and specifying the path in the name attribute of file element of Mydlib.X.manifest. i.e.
|| file name= "/Mydlib.dll" ||
All works fine till here.
THE ISSUE:
Now due to some licensing issues i cannot keep this Mydlib.dll in the root folder. So i changed Mydlib.X.manifest and made file element to
|| file name=..//Mydlib.dll ||
i also tried absolute path
|| file name= /Mydlib.dll ||
Both of the above paths work fine in WindowsXP.
But starting from win2003 and on wards the path cannot be an absoulte path. Relative path must be a of a sub folder of root folder. Hence i am unable to get the similar behavior on Windows 2003 onwards. This has been mentioned in the troubleshooting part of the article.
IS THERE ANY WORKAROUND OR ANOTHER APPROACH TO ACHIEVE THE SAME RESULT.
PLEASE HELP. Thanks -U
Upvotes: 2
Views: 360
Reputation: 9817
The article you reference also discusses Activation Context API.
It may be possible to use this approach rather than just a manifest file. Potentially you could use this to point to the non child folder. It is not clear if the same 2003 restrictions apply, I suspect they might not. I haven't tried it but it's a suggestion.
There also some related information here: http://www.pcreview.co.uk/forums/question-regarding-activation-context-api-lpassemblydirectory-use-registration-free-com-t2656777.html
Upvotes: 1