Solved

TLB problem

Posted on 2000-03-08
7
640 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
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
Independent Software Vendors: 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET how to use the Vertical ScrollBar 5 119
ODBC Connection Logging, ADO.NET 6 71
has22 challenge 11 106
wait notify demo infinite loop 3 134
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

680 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