Solved

getting runtime info od referenced object library

Posted on 1998-10-20
10
176 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
  • 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

813 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

12 Experts available now in Live!

Get 1:1 Help Now