Solved

getting runtime info od referenced object library

Posted on 1998-10-20
10
178 Views
Last Modified: 2010-04-30
Is there any way to find out at run-time(!) if there is a reference to a particular object library in a VB project?
0
Comment
Question by:tbbrhun
[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
  • 5
  • 4
10 Comments
 

Author Comment

by:tbbrhun
ID: 1440825
Edited text of question
0
 
LVL 14

Expert Comment

by:waty
ID: 1440826
You would like to say when your program is compiled, you would like to find the references in your application, or you want to write an addins to find references in the design environment.
0
 
LVL 1

Expert Comment

by:zivf
ID: 1440827
There are tow things:
One is external library structure, which is available in VB.
Second is whether a library was referred to in design time, this is defineable in design time.
Because not run-time references are possible to create, why ask for them there?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tbbrhun
ID: 1440828
I'd like to write some generic procedure that would be passed a recordset/resultset etc. I'm going to use this procedure in different applications (possibly using different object libraries), and I'd like to use the  one that is already in the project. For example, if the project is using RDO, I'd like my procedure to be ready to accept a resultset, if the project is using DAO, I'd like my procedure to be ready to accept a recordset etc
0
 
LVL 1

Expert Comment

by:zivf
ID: 1440829
Therefore, the recieveing application must have them all libs referenced, so you can ask about the passed argument (of type Object or Variant, of course) the following
If (vArgObject Is RDO.rdoResultset) Then
.
Else If (vArgObject Is DAO.Recordset) Then
.
0
 

Author Comment

by:tbbrhun
ID: 1440830
Oh yea, thet's what's the whole thing is about. I DON'T want to overload the application with multiple refrences. Can you imagine the size of my executable if I reference RDO,DAO and ADO?
Thanks for trying anyway.
0
 
LVL 1

Expert Comment

by:zivf
ID: 1440831
One last question: How did you plan to manipulate your argument object without any references to a library?
(BTW: are you sure that a reference to a DYNAMIC link library costs in such a high price for 3 libraries?)
0
 

Author Comment

by:tbbrhun
ID: 1440832
Actually, I was giving an example rather than planning to manupulate a passed object. What I actually plan is to dimension a local object inside that procedure based on the existing reference in the application.
No, I'm not you sure that a reference to a Dll costs in such a high price, but I don't really feel like having an unused reference.
Anyway, I really appreciate your wish to help. THANKS
0
 

Author Comment

by:tbbrhun
ID: 1440833
thanks, I think I realize that this is the only way!
Anyway, your answer was actually a comment. Could you please make the answer so that I can give you the points promised.

THANKS AGAIN
0
 
LVL 1

Accepted Solution

by:
zivf earned 50 total points
ID: 1440834
OK?
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 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