ASP and DLL


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: ASP and DLL

  1. #1
    john Guest

    ASP and DLL


    I have a VB DLL. When I reference it in a VB project...it calls everything
    from the DLL and executes correctly. Now I would like to use this DLL with
    an ASP page to cut down on the ASP code. How do I do this? I will be sending
    one piece of information to the DLL. There it runs it's route. That's it.

  2. #2
    SmithRR Guest

    Re: ASP and DLL


    Register the component on the web server. Instantiate the object in your
    asp code using the Server.CreateObject("")
    Set the new object and then use it just as you would in vb.

    "john" <bytexbyte@hotmail.com> wrote:
    >
    >I have a VB DLL. When I reference it in a VB project...it calls everything
    >from the DLL and executes correctly. Now I would like to use this DLL with
    >an ASP page to cut down on the ASP code. How do I do this? I will be sending
    >one piece of information to the DLL. There it runs it's route. That's it.




  3. #3
    John Guest

    Re: ASP and DLL


    I am pretty sure I have done that. Here is what I am trying:

    Number = Request.Form("Number")
    ToEmail = Request.Form("ToEmail")
    dim objDll
    set objDll = server.createobject("MyDLL.clsMyDLL")
    objDll.SendMail (Number),(ToEmail) 'Type Mismatch error on this line.
    set objDll = nothing

    Inside the dll, it takes the "Number" and finds the matching record in an
    Access database. It does all of this fine. Then it should send an email with
    the record information to the "ToEmail" from the original posting page. The
    function in the dll is set to variant, as well as the passing variables.
    I can't get past this type mismatch error. I set the variables to variant
    from information I gathered from searching the web. I have been at this for
    quite some time. Thanks for any help.

  4. #4
    Somnath Guest

    Re: ASP and DLL


    Try using the Data Type Conversion Function.

    for example:-

    objDll.SendMail CInt(Number),CStr(ToEmail)

    Somnath

    "John" <bytexbyte@hotmail.com> wrote:
    >
    >I am pretty sure I have done that. Here is what I am trying:
    >
    >Number = Request.Form("Number")
    >ToEmail = Request.Form("ToEmail")
    >dim objDll
    >set objDll = server.createobject("MyDLL.clsMyDLL")
    >objDll.SendMail (Number),(ToEmail) 'Type Mismatch error on this line.
    >set objDll = nothing
    >
    >Inside the dll, it takes the "Number" and finds the matching record in an
    >Access database. It does all of this fine. Then it should send an email

    with
    >the record information to the "ToEmail" from the original posting page.

    The
    >function in the dll is set to variant, as well as the passing variables.
    >I can't get past this type mismatch error. I set the variables to variant
    >from information I gathered from searching the web. I have been at this

    for
    >quite some time. Thanks for any help.



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center