Solved

TLB problem

Posted on 2000-03-08
7
641 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:vachooho
ID: 2598548
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
ID: 2599460
->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
ID: 2600331
> ->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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Wyn
ID: 2601112
->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
ID: 2601407
->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
ID: 2608199
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
ID: 2628066
Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 56
ffmpeg - "rtsp://...... Operation not permitted" 4 92
zeroMAx challenge 20 135
Problem to App 4 145
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

734 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