DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Itai Raz Guest

    late binding problem

    Hi. Long time no see.

    Here's my problem:

    I'm trying to invoke a method from within a dll I've created in VB (in ASP,
    of course).

    The object is created just fine and everything goes smoothly (everything
    being changing properties of the object), but, when I try invoking the
    method that takes as an argument an object, I get a "type mismatch". When I
    try running this code from VB using early binding, it works fine, but when I
    use late binding, just like in ASP, it fails the same way.

    HEEEEELLLLLLPPP!

    Thanks,

    Itai

    P.S.

    The code looks like this:
    set dlist=server.CreateObject("dllName.className")
    set dlistPers=server.CreateObject("dllName2.className")
    dlistPers.methodInvoked xmlRoot, dlist


    (xmlRoot is an IXMLDOMELEMENT)



  2. #2
    Dev Ashish Guest

    Re: late binding problem

    Is dlistPers the default interface for the class? Have you tried defining
    the params As Variants and recompiling?

    -- Dev

    Itai Raz wrote in message <38e3a088$1@news.devx.com>...
    :Hi. Long time no see.
    :
    :Here's my problem:
    :
    :I'm trying to invoke a method from within a dll I've created in VB (in ASP,
    f course).
    :
    :The object is created just fine and everything goes smoothly (everything
    :being changing properties of the object), but, when I try invoking the
    :method that takes as an argument an object, I get a "type mismatch". When I
    :try running this code from VB using early binding, it works fine, but when
    I
    :use late binding, just like in ASP, it fails the same way.
    :
    :HEEEEELLLLLLPPP!
    :
    :Thanks,
    :
    :Itai
    :
    :P.S.
    :
    :The code looks like this:
    :set dlist=server.CreateObject("dllName.className")
    :set dlistPers=server.CreateObject("dllName2.className")
    :dlistPers.methodInvoked xmlRoot, dlist
    :
    :
    xmlRoot is an IXMLDOMELEMENT)
    :
    :



  3. #3
    Itai Raz Guest

    Re: late binding problem

    defining the variables as variants would work just fine. However, this dll
    is being used by other platforms, such as VB, so I don't want to just strike
    out all objects declarations. Anyway, the solution we finally came up with
    was creating another method that will take a variant instead of an object,
    and this method will call the original method, after converting the variant
    to be an object.

    Thanks,

    Itai



  4. #4
    Dev Ashish Guest

    Re: late binding problem


    Itai Raz wrote in message <38e8df4e$2@news.devx.com>...
    :Anyway, the solution we finally came up with
    :was creating another method that will take a variant instead of an object,
    :and this method will call the original method, after converting the variant
    :to be an object.
    :

    That's probably what I would've suggested also, given the typeless problems
    here, FWIW.

    -- Dev



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