call dll in javascript ??

4 posts, 0 answers
  1. hendy
    hendy avatar
    2 posts
    Member since:
    Mar 2007

    Posted 26 Mar 2007 Link to this post

    Dear friend,
     
    1.
    we have a dll from a card reader...
    we encapsulate this dll into a VB .NET Class Library...
    and we compile it into ACR120.dll
     
    2.
    this VB .NET Class library has events, methods, also timer function...

    3.
    the card reader will be connected in client computer..
    Since it's on client side, i can not use ASP .NET to call and use the Class Library
     
    4.
    i asked in some forums, some suggested AJAX, some suggested JavaScript...
    but nobody gives sample code..
     
    5.
    i don't know how to call this Class Library using JavaScript or AJAX...or whatever ?
    i try to use object tag but it does work...
    ......
      <object id="ndcObj" classid=file:///C:\Inetpub\wwwroot\EventACR120\DLL\ACR120DLL.dll height="356" width="367" VIEWASTEXT>
      </object>
    .........
     
    6.
    somebody suggested me to use ActiveX control in client side programming ,
    but i can not find ActiveX control project in Visual Studio .NET 2003....
    i can only find ClassLibrary and Web Control Library for this purpose but no ActiveX Control.........
     
    Pls help me .
     
    Thank you,
    hendy
     
     

     
  2. Johan
    Johan avatar
    617 posts
    Member since:
    Mar 2007

    Posted 26 Mar 2007 Link to this post

    ACR120DLL.dll is most probably a COM / ActiveX library. What you need to do first is to create a .NET wrapper which can execute calls against this library. This can be server-side VB.NET code - just make sure you have a method which can call the library.

    Then, client-side, drop an asp:button control and wrap it inside rad AjaxPanel. In the server-side OnClick event of the button, call the method responsible for calling the respective DLL method.


                <rada:RadAjaxPanel
                    id="RadAjaxPanel1"
                    runat="server" >
                        <asp:Button runat="server" ID="Button1" Text="Some Text" OnClick="ButtonClick" />                  
                </rada:RadAjaxPanel>
           
             protected void ButtonClick(object sender, System.EventArgs e)
            {
            // call your DLL here
             }


  3. Raufrz
    Raufrz avatar
    1 posts
    Member since:
    Aug 2007

    Posted 13 Aug 2007 Link to this post

    Dear friend
    I read your comment about  ACR120.dll for cart reader.
    I write web application.Application works with kart reader. Every client also works with kart reader. I want to install .dll to client mashine. But I cannot get dll from client side.

    If you solve this problem could you help me please?
    raufrz@gmail.com
  4. punitharaj singaram
    punitharaj singaram avatar
    1 posts
    Member since:
    Feb 2010

    Posted 03 May 2010 Link to this post

    i have the same problem ...
    i have one dll file that dll  file has lot of methods and one of the method retrieves a local COM Port details
    i try to get Com Ports details from local machine but it shows server COM Port details

    And i followed ur comment but still it shows only server side result
    am using this code in aspx design page

    <body>  
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
              <asp:Button runat="server" ID="Button1" Text="Some Text" OnClick="ButtonClick" />                  
              <asp:DropDownList ID="ddPorts" runat="server" Width="246px">
            </asp:DropDownList>
            </telerik:RadAjaxPanel>
        </form>
    </body>
    my code behind Code ...

    protected void ButtonClick(object sender, System.EventArgs e)
            {
           //here my code is working but shows Server details
             }

Back to Top