Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Publishing Com Component

Status
Not open for further replies.

safraser

Programmer
Apr 12, 2001
76
NZ
I'm sorry if this has all been hashed out before. I've spent the best part of the last two days trying to figure this out and got no where.

I've created a vb project which I need to publish as a com object. I've been through MSDN so many times now I can't count

I've set <Assembly: ComVisible(True)> in my assemblyinfo.vb
I've used regasm to register the components
I've used regasm with the tlb switch to register the types
I've used gacutil to add it to the GAC
I can see the types in the registry under the HKCR branch

But I can't see them when I use the ole/com objectview from the VS tools
Iv'e created an new test project and tried to add it in as a reference but I can't find it.

Is there anything I've missed? Like I said I'm stuck and would really appreciate any help



 
Did you try adding the item to the toolbox?
Tools > Choose ToolBox Items > Browse...?


Zameer Abdulla
 
Thanks for the quick reply.
I hadn't thought about that, but sadly no. It doesn't appear
 
Do you have usercontrols/components in the dll? It's name will appear in the toolbox. Normally under the General Tab

Zameer Abdulla
 
Again Zameer, thanks for the response. However I think one of us is way off track here.

What I'm attempting to do is create a com library that can be called from any com capable application (Like word, excel etc)

I believe you are pointing me to a .net user control that can be added to forms and such. Correct me if I'm wrong
 
yes. a usercontrol. When it is compiled / build as a class library then it becomes a dll. Then it can be easily added to other projects.

Zameer Abdulla
 
I don't want to sound rude here, and I do applicate the effort, but have you even read the question?

I have been attempting publish a com (Component Object Model) library.

Building and using user controls is something had great success within the past, but for this application not what's required.
 
I normally just add the project to the solution which it will be used in, then add a project reference to it. This allows me to step in/through with the debugger if I have any problems.

I'd try this way first, to ensure you have your namespaces as you expect them.

HTH,
Lodlaiden

If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Thanks for the info guys, though since I've been able to find a nice resolution I taken a slightly different route to solve my problem

Qik3Coder, The intent was to make a com library that was callable from other environments such as excel, word etc

Zameer, as I said in my first post. I had my com object created, compiled and registered but it was't available to use anyway, so the article that you pointed me to all though very good was (Wish I found it myself when I started this) didn't help any
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top