Solved

TLB problem

Posted on 2000-03-08
7
638 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

920 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

17 Experts available now in Live!

Get 1:1 Help Now