Solved

getting runtime info od referenced object library

Posted on 1998-10-20
10
174 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
Comment Utility
Edited text of question
0
 
LVL 14

Expert Comment

by:waty
Comment Utility
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
Comment Utility
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
 

Author Comment

by:tbbrhun
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:tbbrhun
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
OK?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 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