Solved

TLB problem

Posted on 2000-03-08
7
635 Views
Last Modified: 2013-11-20
While implementing a ActiveX DLL, I've used COM interfaces, defined in interfaces.tlb file.
After this, I need to somehow register information from the TLN file. Regsvr32 dosn't do the job.
How can I distribute information from TLB?
Thanks!
0
Comment
Question by:ekc
7 Comments
 
LVL 5

Expert Comment

by:vachooho
Comment Utility
What you need register from TLB file?
Run OleView
Select File->View typelib
Is This what you need?

0
 
LVL 5

Expert Comment

by:Wyn
Comment Utility
->While implementing a ActiveX DLL, I've used COM interfaces, defined in interfaces.tlb file.
After this, I need to somehow register information from the TLN file. Regsvr32 dosn't do the job.
How can I distribute information from TLB?
================================
what you need to register for a COM/ACTIVEX component are through calling an exported function DllRegisterServer() of that dll.
Generally speaking,TLB is used by compilers to extract prototype of interfaces ,member functions,class definitons and so on to support type checking or so when you use that dll.
Also some tools for viewing com objects.
 

->How can I distribute information from TLB?
No need to store data in TLB into registry .All you need it ship it together with server or contain it into server as resource.
Regards
W.Yinan
0
 
LVL 5

Author Comment

by:ekc
Comment Utility
> ->How can I distribute information from TLB?
> No need to store data in TLB into registry .All you need it ship it together with server or contain it into server as resource.

Could you provide me with some more precise example? Do I need to add some code in DllRegisterServer(), or this is done automaticly (after importing *.TLB via #import directive)?
I've also tried to use LoadTypeLib() API to load and later register my TLB, but it always returns with CANTLOADLIBRARY error (although path, one and only parameter, is correct). Don't know what's the problem... Do you have any ideas?
Thanks!
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 5

Expert Comment

by:Wyn
Comment Utility
->Could you provide me with some more precise example? Do I need to add some code in DllRegisterServer(), or this is done automaticly (after importing *.TLB via #import directive)?
===============================
for automation? if not ,no need and #import do all.
I will try to elaborate later.
0
 
LVL 5

Expert Comment

by:Wyn
Comment Utility
->LoadTypeLib() API to load and later register my TLB, but it always returns with CANTLOADLIBRARY error
=================
This is hard to me to answer.



0
 
LVL 1

Accepted Solution

by:
timop earned 100 total points
Comment Utility
You have to add the interfaces.tlb to the .rc file and then register it.

Follow these steps:
1) Open "Resource Includes" dialog box ( View | Resource Includes… menu item )
2) Add to the ListBox "Compile-time directives" the following line:
  2 TYPELIB " interfaces.tlb "
3) in DllRegisterServer() add register type library through calling
  _Module.RegisterTypeLib( _T("\\2" ));

0
 
LVL 5

Author Comment

by:ekc
Comment Utility
Thanks!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now