DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: CallByName

  1. #1
    Carl Guest

    CallByName


    Is it possible to retrieve the parameters for a method so that I can dynamically
    display what a method is expecting when using CallByName ?

    I want to build a test harness so that the user can enter the object and
    method and then be asked to enter the required parameters

    Cheers

  2. #2
    Rohit Wason Guest

    Re: CallByName


    No,
    By default VB doesn't provide a Java-like interface to read the parameters
    etc. information for a method or the classes, but for a typelib (.tlb or
    .dll), you can query all the interfaces and the method details using TLIBInfo
    library that comes with VB.
    -Rohit

    "Carl" <carl.dickinson@wms-plc.com> wrote:
    >
    >Is it possible to retrieve the parameters for a method so that I can dynamically
    >display what a method is expecting when using CallByName ?
    >
    >I want to build a test harness so that the user can enter the object and
    >method and then be asked to enter the required parameters
    >
    >Cheers



  3. #3
    Matthew Curland Guest

    Re: CallByName

    > No,
    > By default VB doesn't provide a Java-like interface to read the parameters
    > etc. information for a method or the classes, but for a typelib (.tlb or
    > dll), you can query all the interfaces and the method details using

    TLIBInfo
    > library that comes with VB.
    > -Rohit


    The library shows up as 'TypeLib Information' in the project/references
    dialog, and is implemented in tlbinf32.dll. There's a tlbinf32.chm help file
    at http://msdn.microsoft.com/vbasic/downloads/addon.asp. Drop it in your
    system[32] directory with tlbinf32.dll for context sensitive help in VB.
    There's also a VBPJ article on this topic in November 1999 black-belt
    column. If you don't know the parameters up front, you'll need to use
    TLI.InvokeHook and TLI.InvokeHookArray instead of CallByName. -Matt




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links