-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Sitaraman
Message 7 in Discussion

Hi   Can you pls confirm whether this is ur requirement a) You have the path of the 
Interop DLL b) You will pass it at run time c) For that InterOp DLL you want the 
actual version number of the corresponding Original COM DLL   I have tried to do this 
in the following way   a) Accept the InterOp DLL Path b) Load the assembly thru 
Assembly.LoadFrom c) Enumerate the types in that assembly d) Get one instantiatable 
type and create an instance e) Get the version thru the version property of the COM 
object   Attached is a sample solution,  which does the above.  Im printing the 
Version of various COM DLLs in my machine like Excel 9.0, CDONTS Library1.2, ADODB, 
Office9 Office10 etc and it shows me the correct vwersion.  In addition im also 
printing the Version Number based on the InterOp DLL Check out whether it helps u.  
You might get some instantiation problems in case u dont have any of the 6 components 
i have used for testing(Excel, Office9, Office10, ADODB2.7, UMLVCAddin, CDONTS1.2), so 
u can change the InterOPDLLs in the winform code and also place the necessary DLLs in 
the AppPath\InteropDLLs directory   So i think that will help u get the version info   
Still havent been able to get the Path of the Actual COM Component.  Tried to 
introspect the assembly,   but have not been able to get the path. Probably need to 
somehow get the guid of the component,  and based on that check the HKCL hive clsid in 
the registry and get the InProcServer32 or LocalServer32 value.  Dirty but probably 
effective. Will get back if i can break it   regards,   sr  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to