Create .NET COM dll as existing C++ COM
-
Hi, I have to create .NET COM dll which will be used fro existing client applications. So what I need is : - create interface with SAME NAME AND GUID - create class implementing this interface ann have SAME NAME AND GUID as one in c++ - client should not rebuild or recompiled (save compatibility) Any help please
-
Hi, I have to create .NET COM dll which will be used fro existing client applications. So what I need is : - create interface with SAME NAME AND GUID - create class implementing this interface ann have SAME NAME AND GUID as one in c++ - client should not rebuild or recompiled (save compatibility) Any help please
Extract the type library from your COM DLL. Use tlbimp.exe to import this typelibrary (it will create this as a separate assembly which you might want to reintegrate back into your code using a tool such as Reflector).
This space for rent
-
Extract the type library from your COM DLL. Use tlbimp.exe to import this typelibrary (it will create this as a separate assembly which you might want to reintegrate back into your code using a tool such as Reflector).
This space for rent
-
thank you for response but can you tell me how extracting tlb from c++ com because tlbExp not works
Really? Your first thought wasn't to go to Google for this[^]?
This space for rent
-
thank you for response but can you tell me how extracting tlb from c++ com because tlbExp not works
A Batch file to make it more easy to Register the COM visible assembly and create the tlb: RegMyComVisible.bat
echo off
cd %~dp0rem The following two path you Need to adjust to your needs
set regasm_tool= "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
set assembly= "C:\YourProject\YourComVisible.dll"rem unregister previous version
%regasm_tool% %assembly% /urem Register actual Version and create a YourComVisible.tlb
%regasm_tool% %assembly% /codebase /tlbpause
Make sure to run it as admin: Right Click
RegMyComVisible.bat
and select "Run As Admin". I hope it helps. -
A Batch file to make it more easy to Register the COM visible assembly and create the tlb: RegMyComVisible.bat
echo off
cd %~dp0rem The following two path you Need to adjust to your needs
set regasm_tool= "C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
set assembly= "C:\YourProject\YourComVisible.dll"rem unregister previous version
%regasm_tool% %assembly% /urem Register actual Version and create a YourComVisible.tlb
%regasm_tool% %assembly% /codebase /tlbpause
Make sure to run it as admin: Right Click
RegMyComVisible.bat
and select "Run As Admin". I hope it helps.