Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Type Libraries (tlb)

Posted on 2000-04-13
1
Medium Priority
?
321 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
[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
1 Comment
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 300 total points
ID: 2715291
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

636 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