Solved

Type Libraries (tlb)

Posted on 2000-04-13
1
298 Views
Last Modified: 2011-08-18
I've only just started programming but really need to use a tlb for one of the projects i am working on.

The question is if i used the following declaration in Visual Basic

Dim iAcc as nfdataclient.IAccess

how would i perform the same declaration in C++.

I have imported (#import) the tlb into the program are there any other steps that are required to make it accessible?

Edgark@mintek.co.za
0
Comment
Question by:ratimics
1 Comment
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 100 total points
Comment Utility
I tend to use #import with the options no_namespace and named_guids

That way I don't need to mess with the namespaces (only really - I think - useful when you have the same interface in several different libraries)

to access your interface you can then use the smart pointers - in your case this interface could be

IAccessPtr ptrAccess;

and you then create it

ptrAccess.CreateInstance(CLSID_???);

the #import statement creeates 2 files in your output directory called .tli and .tlh and are always worth a look to see what has been created.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

763 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

7 Experts available now in Live!

Get 1:1 Help Now