[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

12/03/2001 at 04:46PM PST, ID: 20243257
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Getting all ActiveX objects that expose a method

Asked by anthonyc in Visual Basic Programming

Tags: expose, objects, typeinfo

I want to write a utility that will search for all registered activex objects, and then check the typelib for a particular property.  I am using this so I can provide users a list of valid "add-ins" to our applications.  All add-ins to our application must implement an interface, which contains a property indicating it is an add-in for our application.

I have the code, via www.vb2themax.com to search the typelib.  I want to get a list of all activex OCX/DLL/EXEs.  How can I do that?

Date: 8/26/2000
Versions: VB5 VB6
Author: The VB2TheMax Team

' return a collection with names of all the class names
' of a type library that implement a certain member.
'
' MEMBERNAME is the name of the property or method
' MEMBERTYPE is the type of the member (vbGet, vbLet, vbSet, vbMethod).
'    You can specify multiple types by ORing these constants
'
' Example:
'     Dim tlb As String
'     Dim retColl As Collection
'     tlb = "C:\MyServer.Dll"
'     ' returns all types with MyProp (Let, Set or Get) property
'     Set retColl = GetClassesByMember(tlb, "MyProp", VbLet Or VbSet Or VbGet)
'     ' returns all types with MyProp Let property
'     Set retColl = GetClassesByMember(tlb, "MyProp", VbLet)
'     ' returns all types with MyFunc function (or Sub)
'     Set retColl = GetClassesByMember(tlb, "MyFunc", VbMethod)

' Be sure that "TypeLib Information" type library (TlbInf32.tlb)
' is referenced in your VB project.

Function GetClassesByMember(ByVal TypeLibFile As String, _
    ByVal MemberName As String, MemberType As VbCallType) As Collection
    Dim TLI As New TLIApplication
    Dim TypeLibrary As TypeLibInfo
    Dim TypeInfo As TypeInfo
    Dim Results As SearchResults
    Dim Item As SearchItem
   
    ' raises an error if unable to open the type library
    ' (e.g. file not found or not a TLB)
    Set TypeLibrary = TLI.TypeLibInfoFromFile(TypeLibFile)

    ' prepare the result
    Set GetClassesByMember = New Collection

    ' search types containing the requested member
    Set Results = TypeLibrary.GetTypesWithMemberEx(MemberName, MemberType, , _
        tliStClasses)
   
    ' fill the return collection with found type names
    For Each Item In Results
        GetClassesByMember.Add Item.Name, Item.Name
    Next
End Function

[+][-]12/03/01 05:28 PM, ID: 6665065

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/05/01 05:01 PM, ID: 6668342

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/02 09:07 AM, ID: 7193952

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/01/02 09:10 AM, ID: 7193966

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/01/02 09:14 AM, ID: 7193980

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/10/02 10:01 AM, ID: 7211487

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/08/02 11:51 AM, ID: 7271065

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: expose, objects, typeinfo
Sign Up Now!
Solution Provided By: Netminder
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91