Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
I got one dll(name KioskPinPad) ,so from JavaScript I need to call a function(GenPinBlock) which is in dll.
Kindly help me out to find a solution.
Previously they were using some dynamicwrapperx dll..it is nt working in windows 7..so they asked to call directly.. Here is code for it.
XML
<html>
<script language="javascript">
function Transmit_click(){
try{

    DX = new ActiveXObject("DynamicWrapperX"); // Create an object instance.
    DY = new ActiveXObject("DynamicWrapperX"); // Create an object instance.
    alert("Initialising DLLPath");
    var DLLPath="";
    try{
        var wshshell = new ActiveXObject("wscript.shell");
        DLLPath = wshshell.ExpandEnvironmentStrings("%DLLPATH1%");
    }catch(err){
        alert("Error in getting DLL Path "+err.description);
    }

C#
DY.Register(DLLPath+"/kioskCardReader", "SwipeCard", "r=s");      // This function has no parameters.

    //Pinpad Keyu 3688A
    DX.Register(DLLPath+"/kioskPinPad", "DownloadWorkKey", "i=s","r=s");
    DX.Register(DLLPath+"/kioskPinPad", "GenPinBlock", "i=ss","r=s");

C#
PinBlock = DX.GenPinBlock("",CardDetails);

Thanks in advance.
Posted
Updated 7-Nov-12 23:33pm
v3
Comments
Sergey Alexandrovich Kryukov 8-Nov-12 2:09am    
There is not such thing as "Java script" -- Java is not a scripting language.
--SA
Naveen_143 8-Nov-12 2:43am    
JavaScript is present and is used for client side operation in web applications. You can search in net for java script.
jim lahey 8-Nov-12 4:34am    
Java script != JavaScript
TorstenH. 8-Nov-12 5:34am    
how about that? I changed tags. Now the JS people can find it.
Sergey Alexandrovich Kryukov 8-Nov-12 14:28pm    
You are way too nice. OP resists it as hard as one can, but you keep seeding the Good. :-)
And the question makes no sense anyway. It looks not that OP does not understand what is "Java", but also what is "call".
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900