COM

  • Thread starter Sam Gentile [MVP - C#/.NET]
  • Start date
S

Sam Gentile [MVP - C#/.NET]

I wrote an assembly in c# and i need to use it in my vc++ project so i
build
a tlb from it using regasm.exe and import it in my project i also put the
Well, regasm's real job is to create the necessary registry settings for
COM. The CCW actually does not need a TLB to do it's job, it's purely for
development purposes in COM IDEs. The TLB is only generated if you used
regasm /tlb
i also put the
dll under the directory of my exe file but it failes when i try to all the
createinstance function why???
Typically Microsoft recommends that CCWs are strongly signed and put in the
GAC so it can be found. The other way is to strong name it and use a
Codebase setting for a private directory.
It work fine in my xp computer when i develop it but when i install it in
another computer i get error access denined in the create instance why???
It's a unmanaged COM component to COM so it needs to be registered on each
machine.
code
using com???
Rather than repeat the steps, I would like to point you to my 2nd COM
Interop article on MSDN that covers the steps and details in sequence:
http://msdn.microsoft.com/netframew...brary/en-us/dndotnet/html/useframewktools.asp

--
----------------------------------
Sam Gentile
MVP - C#/.NET
INETA Speaker http://www.ineta.org/DesktopDefault.aspx
Read my blog at http://samgentile.com/blog/
------------------------------------------------------
 
D

Dave

Hi,
I wrote an assembly in c# and i need to use it in my vc++ project so i build
a tlb from it using regasm.exe and import it in my project i also put the
dll under the directory of my exe file but it failes when i try to all the
createinstance function why???
It work fine in my xp computer when i develop it but when i install it in
another computer i get error access denined in the create instance why???

now in my dev computer i get the same problem i try to register the dll in
the GAC but it didnt help (do i must reg assembly dll`s in the gac for
inerop??)

can you tell me the correct steps to connect assembly dll from unmanage code
using com???
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top