?
Solved

Type Libraries (tlb)

Posted on 2000-04-13
1
Medium Priority
?
314 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

765 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