How to make my com object can be used by C# using add reference operation?
-
Im a newbie for com programming. If i create my com object by ATL wizards, the target com dll can be easily added by C# project using Add Reference operation. But, if i build my com dll by handle, writting all classes and idl file by hands, i will find it can't be added by C#. the error message says:"*** couldn't be added. Please make sure that the file is accessible,and that is a valid assembly or COM component". Of course the target dll is a COM component! I can use it in any C++ projects successfully. Why? Regards.
-
Im a newbie for com programming. If i create my com object by ATL wizards, the target com dll can be easily added by C# project using Add Reference operation. But, if i build my com dll by handle, writting all classes and idl file by hands, i will find it can't be added by C#. the error message says:"*** couldn't be added. Please make sure that the file is accessible,and that is a valid assembly or COM component". Of course the target dll is a COM component! I can use it in any C++ projects successfully. Why? Regards.
Its probably because the type library information is not available inside the COM DLL. You will have to include the library information as a resource for this. Please read the document on how this is done.
«_Superman_» I love work. It gives me something to do between weekends.
-
Its probably because the type library information is not available inside the COM DLL. You will have to include the library information as a resource for this. Please read the document on how this is done.
«_Superman_» I love work. It gives me something to do between weekends.