Solved

TLB problem

Posted on 2000-03-08
7
639 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASCII Non-Printable characters/codes and their HTML equivalents 6 114
abstract class with all non abstract mentods 6 76
FizzBuzz challenge 9 80
firstChar challenge 13 115
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 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